The library Controller Status allows to retrieve various error statuses, levels and error code from NJ or NX controller.
It also makes possible to display these statuses on NA serie HMI through an IAG (ControllerStatus.IAG) or through a web browser (FB WebControllerStatus).
Networks Reset are also available.
Restrictions:
- The library Controller Status could be used with controller including motion control axes excluding NJ101-90 !
- The EtherCat slave number is limited to 192 to enable compatibility of the library with all type of controller.
1- Function Block Controller Status
The Function block ControllerStatus expose in the structured variable following information:
- Status of EtherCAT, EthernetIP, Motion, bus CJ (CJ1W), bus NX-IO (NX)
- Slave and error code erreur
- Firmware Version of the controller
- Program Version of the controller
- User Program Version (to defined)

Input Variables
| Name | Type | values | Function |
| Execute | BOOL | OFF-ON | ON = FB execution |
Output variables
| Name | Type | values | Function |
| ENO | BOOL | OFF-ON | ON = executing |
Input/Output variables
| Name | Type | Function | ||
| StatusData | CS\sControlStatus | |||
| BOOL | Mode_RUN | ON when FB executed | ||
| BOOL | EC_Err | EtherCAT network error | ||
| UINT | ECSlave_Error | EtherCAT Slave N° in error | ||
| DWORD | EC_Code | EtherCAT error code | ||
| UINT | EC_Level | EtherCAT error level | ||
| BOOL | EIP_Err | EthernetIP network error | ||
| UINT | EIPNode_Error | EthernetIP Slave N° in error | ||
| DWORD | EIP_Code | EthernetIP error code | ||
| UINT | EIP_Level | EthernetIP error level | ||
| BOOL | MC_Err | Motion network error | ||
| UINT | MCAxe_Error | Motion slave N° in error | ||
| DWORD | MC_Code | Motion error code | ||
| UINT | MC_Level | Motion level error | ||
| BOOL | PLC_Err | PLC error | ||
| DWORD | PLC_Code | PLC error code | ||
| UINT | PLC_Level | PLC level error | ||
| BOOL | NX_Err | NX IO bus error | ||
| DWORD | NX_Code | NX IO bus error code | ||
| UINT | NX_Level | NX IO bus level error | ||
| UINT | NX_UnitErr | NX unit N° in error | ||
| BOOL | CJB_Err | CJ bus error | ||
| DWORD | CJB_Code | CJ bus error code | ||
| UINT | CJB_Level | CJ bus level error | ||
| UINT | CJB_UnitErr | CJ unit N° in error | ||
| BOOL | Alm_Battery | Battery low | ||
| BOOL | Error_Flag | At list, one error exist | ||
| WORD | Drive_Error | Servodrive error | ||
| STRING[21] | Drive_Type | ServoDrive Type | ||
| STRING[6] | FW_Version | Controller Firmware Version | ||
| STRING[6] | Project_Version | Controller Program Version | ||
| STRING[12] | Program_Version | User program Version * | ||
| UDINT | MaxExecTime | Maximum execution time of used task | ||
| UDINT | MinExecTime | Minimum execution time of used task | ||
| BOOL | Exceeded | Fixed period of used task exceeded | ||
| UDINT | TaskPeriod | Used task period defined | ||
| BOOL | Reset_PLC | Reset PLC error | ||
| BOOL | Reset_ECT | Reset EtherCAT network error | ||
| BOOL | Reset_MC | Reset Motion network error | ||
| BOOL | Reset_IObus | Reset CJ bus error | ||
| BOOL | Reset_NXbus | Reset NX IO bus error | ||
*: User program version is a custom program version number to be provided by the programmer.
2- IAG Controller Status
Displays the error status, the firmware and program versions of the NJ / NX controller provided by the ControllerStatus library. Displays additional information about the error based on the error code.

The Detail button execute a research in the file SysErrDef.doc included in the ressource of the IAG.
3- Function Block WebControllerStatus
Display error status and firmware/program versions on a web browser obtained by the ControllerStatus function block. Error code have hyperlink allowing to get the troubleshouter pdf file located on Industrial.omron web site and typing the error code in the search option.

Input variables
| Name | Type | values | Function |
| Start | BOOL | OFF-ON | ON = FB execution |
| StatusData | CS\sControlStatus | See definition above | |
| HTML_Port | UINT | 1-65535 | Local Port (80 and 21 not available) |
| ControllerName | String | Name to be displayed on the web page | |
| Password | String(8) | Password | |
| Check_Password | BOOL | OFF-ON | Password Activation |
| Refresh_Interval | UINT | 0-9999 | Read frequency (second) 0: no refresh |
| Logout_Delay | UINT | Delay of no activity before disconnection | |
| LogOut | BOOL | OFF-ON | Force to disconnect client |
Output variables
| Name | Type | values | Function |
| Listening | BOOL | OFF-ON | ON = FB listening for a client |
| Error | BOOL | OFF-ON | Execution error |
| ErrorID | WORD | 0-FFFF | Error Code |
| Logged | BOOL | OFF-ON | Incorrect password |
| Last_State | String(32) | Last error |
| Version | Date | information |
| 3.0 | 07/2024 | original |
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article