System Variable Comparison (KEYENCE KV-X / OMRON NJ/NX)
This table lines up, by function, the "system variables" of the KEYENCE KV-X500/X300 series and the "system-defined variables" of the OMRON NJ/NX series, both IEC 61131-3 compliant PLCs. Where NJ/NX has no system-defined variable, or the variable cannot be used directly from a user program, the instruction you can use instead is listed as "... instruction". Use it as a reference when migrating models or reading another manufacturer's PLC programs. For the meaning of the symbols, see the legend at the end of the page.
Clock
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| Current date and time | _CurrentDateTime | ARRAY[0..5] OF UINT | _CurrentTimeor GetTime instruction | DATE_AND_TIME | |
| Current date and time (year) | _CurrentDateTime[0] | UINT | _CurrentTime | DATE_AND_TIME | |
| Current date and time (month) | _CurrentDateTime[1] | UINT | _CurrentTime | DATE_AND_TIME | |
| Current date and time (day) | _CurrentDateTime[2] | UINT | _CurrentTime | DATE_AND_TIME | |
| Current date and time (hour) | _CurrentDateTime[3] | UINT | _CurrentTime | DATE_AND_TIME | |
| Current date and time (minute) | _CurrentDateTime[4] | UINT | _CurrentTime | DATE_AND_TIME | |
| Current date and time (second) | _CurrentDateTime[5] | UINT | _CurrentTime | DATE_AND_TIME | |
| Day of week | _DayOfWeek | UINT | GetDayOfWeek instruction | — | |
| Clock error | _ProgramInfo.TimeError | BOOL | — | — | |
Always ON/OFF and clock pulses
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| Always ON | _AlwaysOn | BOOL | P_On | BOOL | |
| Always OFF | _AlwaysOff | BOOL | P_Off | BOOL | |
| 10 ms clock pulse | _Clock10ms | BOOL | Get10msClk instruction | — | |
| 100 ms clock pulse | _Clock100ms | BOOL | Get100msClk instruction | — | |
| 1 s clock pulse | _Clock1s | BOOL | Get1sClk instruction | — | |
First scan and execution status
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| ON for 1 scan at start of operation | _FirstScanOn | BOOL | P_First_RunMode | BOOL | |
| OFF for 1 scan at start of operation | _FirstScanOff | BOOL | — | — | |
| Module/program first execution | _ProgramFirstRun | BOOL | — | — | |
| FB first execution | _ProgramFirstRun | BOOL | — | — | |
| ON for 1 scan when module execution starts | _ModuleFirstScanOn | BOOL | P_First_Run | BOOL | |
| OFF for 1 scan when module execution starts | _ModuleFirstScanOff | BOOL | — | — | |
| Module/program executing | _MD_(ModuleName) | BOOL | _<TaskName>_Activeor PrgStatusor Task_IsActive instruction | BOOL | |
Scan time and task time
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| Program execution information (structure) | _ProgramInfo | _PROGRAM_INFO | — | — | |
| Current scan time | .ScanTime | UDINT | _<TaskName>_LastExecTimeor GetMyTaskStatus instruction | TIME | |
| Minimum task execution time | .MinScanTime | UDINT | _<TaskName>_MinExecTimeor GetMyTaskStatus instruction | TIME | |
| Maximum scan time | .MaxScanTime | UDINT | _<TaskName>_MaxExecTimeor GetMyTaskStatus instruction | TIME | |
| Clear min/max scan time | .ScanTimeMaxMinClear | BOOL | — | — | |
| Measured END processing time | .EndProcTime | UDINT | — | — | |
| Constant scan time setting | .FixScanTimeSet | UDINT | GetMyTaskInterval instruction | — | |
| END processing time setting | .EndProcTimeSet | UDINT | — | — | |
| Constant scan time operation enabled | .FixScanTimeEnable | BOOL | — | — | |
| END processing time setting enabled | .FixEndProcTimeEnable | BOOL | — | — | |
| Set time exceeded | .FixTimeExcess | BOOL | _<TaskName>_Exceededor GetMyTaskStatus instruction | BOOL | |
| Scan time when setting exceeded | .ExcessConstantScanTime | UDINT | — | — | |
| END processing time when setting exceeded | .ExecssEndProcTime | UDINT | — | — | |
| Task execution count | — | — | _<TaskName>_ExecCountor GetMyTaskStatus instruction | UDINT | |
| Task period exceeded count | — | — | _<TaskName>_ExceedCountor GetMyTaskStatus instruction | UDINT | |
Free-running counter
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| 1 ms free-running counter | _FreeRunCounter1ms | UDINT | Get1msCnt instruction | — | |
| 10 µs free-running counter | _FreeRunCounter10us | UDINT | — | — | |
| 1 µs free-running counter | _FreeRunCounter1us | UDINT | Get1usCnt instruction | — | |
| 100 ns free-running counter | _FreeRunCounter100ns | UDINT | Get100nsCnt instruction | — | |
Errors and faults
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| Error control (structure) | _ErrorCtrl | _ERROR_CTRL | _ErrStaor GetPLCError instruction | WORD | |
| Major error occurring | .Error | BOOL | _ErrStaor Level=2 of the GetPLCError instruction | WORD | |
| Minor error occurring | .Warning | BOOL | _ErrStaor Level=3 of the GetPLCError instruction | WORD | |
| Clear current error | .ClearCurrentError | BOOL | ResetPLCError instruction | — | |
| Clear error history | .ClearHistory | BOOL | Clear the event log from Sysmac Studio or an HMI (no instruction) | — | |
| Operation error details | _ProgramInfo.ProgramErrorDetail | UINT | Check with the instruction's ErrorID output or the event log | — | |
| Latest major error details (structure) | _NewestError | _ERROR_DETAIL | GetPLCError instruction | — | |
| Latest major error: year/month | .YearMonth | UINT | — | — | |
| Latest major error: day | .Day | UINT | — | — | |
| Latest major error: hour | .Hour | UINT | — | — | |
| Latest major error: minute | .Minute | UINT | — | — | |
| Latest major error: second | .Second | UINT | — | — | |
| Latest major error: error code | .ErrorNumber | UINT | GetPLCError instruction | — | |
| Latest major error: number of valid data | .ValidCount | UINT | — | — | |
| Latest major error: detail information 01 to 20 | .Detail | ARRAY[0..19] OF UINT | — | — | |
| Latest minor error details (structure) | _NewestWarning | _ERROR_DETAIL | GetPLCError instruction | — | |
| Latest minor error: year/month | .YearMonth | UINT | — | — | |
| Latest minor error: day | .Day | UINT | — | — | |
| Latest minor error: hour | .Hour | UINT | — | — | |
| Latest minor error: minute | .Minute | UINT | — | — | |
| Latest minor error: second | .Second | UINT | — | — | |
| Latest minor error: error code | .ErrorNumber | UINT | GetPLCError instruction | — | |
| Latest minor error: number of valid data | .ValidCount | UINT | — | — | |
| Latest minor error: detail information 01 to 20 | .Detail | ARRAY[0..19] OF UINT | — | — | |
| User-defined error status | — | — | _AlarmFlagSetAlarm / GetAlarm / ResetAlarm instructions | WORD | |
| PLC Function Module error status | — | — | _PLC_ErrStaGetPLCError / ResetPLCError instructions | WORD | |
Self-diagnosis and power
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| Battery error | _ProgramInfo.BackupBattError | BOOL | _SelfTest_LowBattery | BOOL | |
| Overcurrent protection disabled | _ProgramInfo.OCPDisabled | BOOL | — | — | |
| CPU internal temperature too high | — | — | _SelfTest_HighTemperature | BOOL | |
| Fan speed low | — | — | _SelfTest_LowFanRevolution | BOOL | |
| Non-volatile memory life warning | — | — | _StorageDeteriorated | BOOL | |
| Power-on time | — | — | _PowerOnHouror PLC_ReadTotalPowerOnTime instruction | UDINT | |
| Number of power interruptions | — | — | _PowerOnCount | UDINT | |
| Power-interruption retention failed | — | — | _RetainFail | BOOL | |
| Power-interruption retention not executed | — | — | _RetainUnexec | BOOL | |
| Device output hold setting | — | — | _DeviceOutHoldCfg | WORD | |
| Device output hold status | — | — | _DeviceOutHoldStatus | BOOL | |
Operation flags and instruction errors
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| Comparison result (less than) | _CalcResultNeg | BOOL | Output of the Cmp instruction | — | |
| Comparison result (equal) | _CalcResultEqual | BOOL | Output of the Cmp instruction | — | |
| Comparison result (greater than) | _CalcResultPos | BOOL | Output of the Cmp instruction | — | |
| Carry flag | — | — | P_CY | BOOL | |
| Program execution error (module) | _ProgramError | BOOL | P_PRGER | BOOL | |
| Internal register (module) | _InternalRegister | ARRAY[0..3] OF UINT | — | — | |
| Program execution error (FB) | _ProgramError | BOOL | P_PRGER | BOOL | |
| Internal register (FB) | _InternalRegister | ARRAY[0..3] OF UINT | — | — | |
| Program execution error (FUN) | _ProgramError | BOOL | P_PRGER | BOOL | |
| Internal register (FUN) | _InternalRegister | ARRAY[0..3] OF UINT | — | — | |
| Function return value | FunctionName | (as defined by the FUN) | — | — | |
Logging and tracing
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| Logging and tracing (array of structures) | _LoggingTrace | ARRAY[0..9] OF _LOGGING_TRACE | — | — | |
| Logging/trace: operation enabled | .ExecEnable | BOOL | — | — | |
| Logging/trace: in progress | .InOperation | BOOL | — | — | |
| Logging/trace: file write finished | .FileWriteEnd | BOOL | — | — | |
| Logging/trace: buffer below 50% warning | .BufferHalfAlm | BOOL | — | — | |
| Logging/trace: buffer overflow | .BufferOverflow | BOOL | — | — | |
| Logging/trace: written during RUN | .WriteDuringRun | BOOL | — | — | |
| Logging/trace: logging/trace error | .LoggingTraceError | BOOL | — | — | |
| Logging/trace: insufficient memory error | .NoMemoryCapacity | BOOL | — | — | |
| Logging/trace: device/trigger setting error | .DeviceTriggerSetError | BOOL | — | — | |
| Logging/trace: file save trigger monitor | .FileSaveTriggerMonitor | BOOL | — | — | |
| Logging/trace: data acquisition complete | .DataAcquireComplete | BOOL | — | — | |
| Logging/trace: minimum free buffer space | .MinBufferSpace | UINT | — | — | |
| Logging/trace: ring buffer free space | .LoopBufferSpace | UINT | — | — | |
| Logging/trace: file save counter | .FileSavingCounter | UINT | — | — | |
| Logging/trace: ID 1 to 9 assignment | _LoggingTrace[1..9] | — | — | — | |
| Logging and tracing (array of structures) | — | — | _PLC_TraceSta[0..3]or GetTraceStatus / TraceSamp / TraceTrig instructions | _sTRACE_STA | |
| Logging/trace: in progress | — | — | .IsStartor GetTraceStatus | _sTRACE_STA BOOL | |
| Logging/trace: logging/trace error | — | — | .ParamError GetTraceStatus | _sTRACE_STA BOOL | |
| Trace trigger monitor flag | — | — | .IsTriggeror GetTraceStatus | _sTRACE_STA BOOL | |
| Trace completed flag | — | — | .IsCompleteor GetTraceStatus | _sTRACE_STA BOOL | |
| Safety data logging | — | — | _PLC_SFLogSta | ARRAY[0..1] OF _sSFLOG_STA | |
Operation recording
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| Operation recording (array of structures) | _OperationRecorder | ARRAY[0..3]OF _OPERATION_RECORDER | — | — | |
| Operation recording: save request | .SaveRequest | BOOL | — | — | |
| Operation recording: in progress | .InAction | BOOL | — | — | |
| Operation recording: file save trigger occurred | .SaveTriggerMonitor | BOOL | — | — | |
| Operation recording: saving file | .SaveBusy | BOOL | — | — | |
| Operation recording: collecting data | .Collecting | BOOL | — | — | |
| Operation recording: setting error | .SettingError | BOOL | — | — | |
| Operation recording: file save complete | .SaveComplete | BOOL | — | — | |
| Operation recording: file save error | .SaveError | BOOL | — | — | |
| Operation recording: insufficient recording buffer | .BufferShortage | BOOL | — | — | |
| Operation recording: save entire buffer mode | .BufferAllSaveMode | BOOL | — | — | |
| Operation recording: average sampling period | .AverageSamplingPeriod | DINT | — | — | |
| Operation recording: average number of changed devices | .AverageChangedDeviceNum | DINT | — | — | |
| Operation recording: collectable period | .MaxCollectingPeriod | DINT | — | — | |
| Operation recording: file save completion code | .SaveFinCode | UINT | — | — | |
| Operation recording: file save counter | .SaveCounter | UINT | — | — | |
| Operation recording: save progress detail 1 | .SaveProgressInfo1 | UINT | — | — | |
| Operation recording: save progress detail 2 | .SaveProgressInfo2 | UINT | — | — | |
| Operation recording: save progress | .SaveProgress | UINT | — | — | |
| Operation recording: save file path | .SavePath | STRING[320] | — | — | |
| Operation recording: ID 1 to 3 assignment | _OperationRecorder[1..3] | — | — | — | |
Automation Playback
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| Switch collection settings | — | — | APB_ChangeSamplingSettings instruction | UINT | |
| APB service status | — | — | _APB_Status.Status | UINT | |
| Date/time of latest save trigger | — | — | _APB_SysInfo.LatestTrigTime | DATE_AND_TIME | |
| APB service status | — | — | _APB_Status.Status | UINT | |
| APB instruction error code | — | — | _APB_Status.LatestErrorID | WORD | |
| Date/time of latest variable log output | — | — | _APB_Status.LatestLogTime | DATE_AND_TIME | |
| APB service event code | — | — | _APB_Status.LatestEventCode | DWORD | |
| Average sampling time | — | — | _APB_SmplInfo.SmplTimeAve | UDINT | |
| Average variable change rate | — | — | _APB_SmplInfo.VarChgRateAve | UINT | |
| Average variable log collectable time | — | — | _APB_SmplInfo.LogDurationTimeAve | UINT | |
| Variable log file save directory | — | — | _APB_SysInfo.LogFileDir | STRING[80] | |
Display (Access Window)
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| Access Window (structure) | _AccessWindow | _ACCESS_WINDOW | — | — | |
| Access Window: Up key pressed | .UpKeyPressed | BOOL | — | — | |
| Access Window: Down key pressed | .DownKeyPressed | BOOL | — | — | |
| Access Window: Left key pressed | .LeftKeyPressed | BOOL | — | — | |
| Access Window: Right key pressed | .RightKeyPressed | BOOL | — | — | |
| Access Window: MENU key pressed | .MenuKeyPressed | BOOL | — | — | |
| Access Window: ENTER key pressed | .EnterKeyPressed | BOOL | — | — | |
| Access Window: user message displayed | .UserMessageDisplayed | BOOL | — | — | |
| Access Window: blink | .BlinkLine | ARRAY[1..4] OF BOOL | — | — | |
| Access Window: display user message | .DisplayUserMessage | ARRAY[1..63] OF BOOL | — | — | |
| Access Window: user message number | .UserMessageDisplayID | UINT | — | — | |
| Access Window: initial display language setting | .InitialDispLangSetting | UINT | — | — | |
| Access Window: initial comment number setting | .InitialCommentNumberSetting | UINT | — | — | |
| Access Window: operation prohibit setting | .WindowOperationDisable | UINT | — | — | |
| Access Window: initial screen setting enabled | .InitScreenSetValid | UINT | — | — | |
| Access Window: initial screen device type | .InitScreenSetDeviceType | UINT | — | — | |
| Access Window: initial screen ID | .InitScreenSetScreenID | UDINT | — | — | |
| Access Window: initial screen device number | .InitScreenSetDeviceNumber | UDINT | — | — | |
| Access Window: initial screen display format | .InitScreenSetDisplayFormat | UINT | — | — | |
| Access Window: initial screen device notation | .InitScreenSetDeviceDisplay | UINT | — | — | |
| Access Window: initial screen key lock status | .InitScreenSetKeyLockStatus | UINT | — | — | |
Project information and versions
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| Project information (structure) | _ProjectInfo | _PROJECT_INFO | — | — | |
| Project name | .ProjectName | STRING[64] | — | — | |
| Number of sensor setting instructions executed | .SensorInstExecCount | UINT | — | — | |
| Consecutive project password authentication failures | .PrjPasswordCertFailCount | UINT | — | — | |
| Cumulative project password authentication failures | .PrjPasswordCertFailTotal | UINT | — | — | |
| Project password authentication prohibited | _ProgramInfo.ProjectPasswordAuthDisabled | BOOL | — | — | |
| CPU function version | .CpuFuncVersion | UINT | — | — | |
| Project function version | .ProjectVersion | UINT | — | — | |
| Unit version | — | — | _UnitVersion | ARRAY[0..1] OF USINT | |
| Configured unit version | — | — | _ProjectUnitVersion | ARRAY[0..1] OF USINT | |
| Hardware revision | — | — | _HardwareRevision | STRING[2] | |
Storage (memory card / SD card)
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| Storage (structure) | _Storage | _STORAGE | — | — | |
| Memory card mount request | .MemCardMountReq | BOOL | — | — | |
| Memory card unmount request | .MemCardUnmountReq | BOOL | — | — | |
| Memory card in use | .MemCardInUse | BOOL | _Card1Access | BOOL | |
| Memory card recognition complete | .MemCardRecognized | BOOL | _Card1Ready | BOOL | |
| Memory card present | .MemCardExist | BOOL | — | — | |
| CPU memory mount request | .CpuMemoryMountReq | BOOL | — | — | |
| CPU memory unmount request | .CpuMemoryUnmountReq | BOOL | — | — | |
| CPU memory in use | .CpuMemoryInUse | BOOL | — | — | |
| CPU memory recognition complete | .CpuMemoryRecognized | BOOL | — | — | |
| Auto load | .AutoLoad | _AUTOLOAD_CTRL | — | — | |
| Folder number | .FolderNumber | UINT | — | — | |
| Completed folder number | .CompleteFolderNumber | UINT | — | — | |
| Completion code | .FinCode | UINT | — | — | |
| Run load | .RunLoad | _AUTOLOAD_CTRL | — | — | |
| Folder number | .FolderNumber | UINT | — | — | |
| Completed folder number | .CompleteFolderNumber | UINT | — | — | |
| Completion code | .FinCode | UINT | — | — | |
| Project save | .ProjectSave | _PROJECT_RECIPE_SAVE_LOAD | — | — | |
| Execute request | .Request | BOOL | — | — | |
| Executing | .Busy | BOOL | — | — | |
| Execution complete | .Complete | BOOL | — | — | |
| Execution failed | .Error | BOOL | — | — | |
| Drive number | .DriveNumber | UINT | — | — | |
| Folder number | .FolderNumber | UINT | — | — | |
| Completed drive number | .CompleteDriveNumber | UINT | — | — | |
| Completed folder number | .CompleteFolderNumber | UINT | — | — | |
| Completion code | .FinCode | UINT | — | — | |
| Project load | .ProjectLoad | _PROJECT_RECIPE_SAVE_LOAD | — | — | |
| Execute request | .Request | BOOL | — | — | |
| Executing | .Busy | BOOL | — | — | |
| Execution complete | .Complete | BOOL | — | — | |
| Execution failed | .Error | BOOL | — | — | |
| Drive number | .DriveNumber | UINT | — | — | |
| Folder number | .FolderNumber | UINT | — | — | |
| Completed drive number | .CompleteDriveNumber | UINT | — | — | |
| Completed folder number | .CompleteFolderNumber | UINT | — | — | |
| Completion code | .FinCode | UINT | — | — | |
| Recipe save | .RecipeSave | _RECIPE_SAVE | FileWriteVar instruction | — | |
| Execute request | .Request | BOOL | — | — | |
| Executing | .Busy | BOOL | — | — | |
| Execution complete | .Complete | BOOL | — | — | |
| Execution failed | .Error | BOOL | — | — | |
| Drive number | .DriveNumber | UINT | — | — | |
| Reference folder number | .InputFolderNumber | UINT | — | — | |
| Output folder number | .OutputFolderNumber | UINT | — | — | |
| Completion code | .FinCode | UINT | — | — | |
| Recipe load | .RecipeLoad | _PROJECT_RECIPE_SAVE_LOAD | FileWriteVar instruction | — | |
| Execute request | .Request | BOOL | — | — | |
| Executing | .Busy | BOOL | — | — | |
| Execution complete | .Complete | BOOL | — | — | |
| Execution failed | .Error | BOOL | — | — | |
| Drive number | .DriveNumber | UINT | — | — | |
| Folder number | .FolderNumber | UINT | — | — | |
| Completed drive number | .CompleteDriveNumber | UINT | — | — | |
| Completed folder number | .CompleteFolderNumber | UINT | — | — | |
| Completion code | .FinCode | UINT | — | — | |
| Save to CPU memory | .CpuMemorySave | _CPU_MEMORY_SAVE | — | — | |
| Execute request | .Request | BOOL | — | — | |
| Executing | .Busy | BOOL | — | — | |
| Execution complete | .Complete | BOOL | — | — | |
| Execution failed | .Error | BOOL | — | — | |
| Storage FB RAM mode | .StorageFBIsRAMMode | BOOL | — | — | |
| Project backup in progress | .ProjectBackupBusy | BOOL | — | — | |
| Logging/trace in progress | .LoggingTraceBusy | BOOL | — | — | |
| Logging internal buffer overflow | .LoggingInternalBufferOverflow | BOOL | — | — | |
| Power OFF during storage access | .PowerOffDuringStorageAccess | UINT | — | — | |
| Memory card retry count | .MemoryCardRetryCount | UINT | — | — | |
| Memory card verify error count | .MemoryCardErrorCount | UINT | — | — | |
| Reset delay time on memory card error | .MemoryCardResetDelay | UINT | — | — | |
| CPU memory usage | .UsageCpuMemory | UDINT | — | — | |
| SD Memory Card program transfer command | — | — | _Card1PrgTransferCmd | _sPRGTRANSFER_CMD | (※1) |
| SD Memory Card program transfer command: start | — | — | .Exec | BOOL | |
| Directory name | — | — | .DirName | _sPRGTRANSFER_CMD STRING[64] | (※2) |
| Password | — | — | .Password | — | |
| User program and settings transfer flag | — | — | .TargetUserProgram | — | |
| IP address transfer flag | — | — | .TargetIPAdr | — | |
| Variable present value (retained only) transfer flag | — | — | .TargetVariable | — | |
| CJ Unit memory present value (retained memory only) transfer flag | — | — | .TargetMemory | — | |
| SD Memory Card program transfer status | — | — | _Card1PrgTransferSta | — | |
| SD Memory Card program transfer: complete | — | — | .Done | — | |
| SD Memory Card program transfer: executing | — | — | .Active | — | |
| SD Memory Card program transfer: error | — | — | .Err | _sPRGTRANSFER_STA BOOL | |
| Project save | — | — | _Card1BkupCmdor BackupToMemoryCard instruction | _sBKUP_CMD | (※3) |
| Project save: execute request | — | — | .ExecBkupor BackupToMemoryCard instruction | _sBKUP_CMD BOOL | |
| Project save: executing | — | — | _Card1BkupSta.Activeor BackupToMemoryCard instruction | _sBKUP_STA BOOL | |
| Project save: execution complete | — | — | _Card1BkupSta.Doneor BackupToMemoryCard instruction | _sBKUP_STA BOOL | |
| Project save: execution failed | — | — | _Card1BkupSta.Error BackupToMemoryCard instruction | _sBKUP_STA BOOL | |
| Project save: folder number | — | — | .DirNameor BackupToMemoryCard instruction | _sBKUP_CMD STRING[64] | |
| Restore command | — | — | _Card1RestoreCmd | _sRESTORE_CMD | (※4) |
| Restore start flag | — | — | .Exec | _sRESTORE_CMD BOOL | |
| Restore: directory name | — | — | .DirName | _sRESTORE_CMD STRING[64] | |
| Restore: password | — | — | .Password | — | |
| Restore status | — | — | _Card1RestoreSta | _sRESTORE_STA | |
| Restore: executing flag | — | — | .Active | _sRESTORE_STA BOOL | |
| Restore: completed flag | — | — | .Done | _sRESTORE_STA BOOL | |
| Restore: error flag | — | — | .Err | _sRESTORE_STA BOOL | |
| Backup function executing flag | — | — | _BackupBusy | BOOL | |
| Power interrupted during SD Memory Card access flag | — | — | _Card1PowerFail | BOOL | |
| SD Memory Card write protect flag | — | — | _Card1Protect | BOOL | |
| SD Memory Card error flag | — | — | _Card1Err | BOOL | |
| SD Memory Card life warning flag | — | — | _Card1Deteriorated | BOOL | |
| SD Memory Card storage capacity | — | — | _Card1Capacity | UDINT | |
| SD Memory Card storage usage | — | — | _Card1Used | UDINT | |
| Backup cancel flag | — | — | .CancelBkup | _sBKUP_CMD BOOL | |
| Verify start flag | — | — | .ExecVefy | _sBKUP_CMD BOOL | |
| (structure) | — | — | _Card1VefySta | _sVEFY_STA | |
- (*1) NJ: there is no instruction that executes a program transfer (_Card1PrgTransferCmd is commanded via CIP message communication)
- (*2) KV: folder number (UINT) / NJ: directory name (STRING)
- (*3) _Card1BkupCmd cannot be used in user programs. From a program, use the BackupToMemoryCard instruction
- (*4) _Card1RestoreCmd is commanded via CIP message communication
Expansion units and I/O bus
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| Expansion unit (structure) | _ExpansionUnit | _EXPANSION_UNIT | — | — | |
| Expansion unit connection | .Connected | ARRAY[0..48]OF BOOL | — | — | |
| Load option | .LoadOption | ARRAY[0..48]OF BOOL | — | — | |
| Number of connected expansion units | .UnitNumber | UINT | — | — | |
| Expansion unit device address | _UnitIdAdr[0..48] | ARRAY[0..48] OF _UNIT_ID_ADR | — | — | |
| Expansion unit device address: UnitNo | .UnitNo | UINT | — | — | |
| Expansion unit device address: RelayAdr | .RelayAdr | UDINT | — | — | |
| Expansion unit device address: DmAdr | .DmAdr | UDINT | — | — | |
| NX Unit I/O data communicating | — | — | GetNXBError / GetNXUnitError / ResetNXBError instructions | — | |
| I/O bus unit error status | — | — | GetXBError / GetXBUnitError instructions | — | |
| NX Unit registration status | — | — | _NXB_UnitRegTbl | ARRAY [0..32] OF BOOL | |
| Maximum NX Unit number | — | — | _NXB_MaxUnitNo | UINT | |
| NX Unit I/O data active status | — | — | _NXB_UnitIOActiveTbl | ARRAY [0..32] OF BOOL | |
| NX Bus Function Module error status | — | — | _NXB_ErrSta | WORD | |
| I/O bus error status | — | — | _CJB_ErrSta | WORD | |
| I/O bus unit error status | — | — | _CJB_UnitErrSta | ARRAY [0..3, 0..9] OF WORD | |
| X Bus Function Module error status | — | — | _XBU_ErrSta | WORD | |
Inter-unit synchronization
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| Inter-unit synchronization (structure) | _UnitSynchronize | _UNIT_SYNCHRONIZE | — | — | |
| Inter-unit synchronization: refresh start time | .RefreshStartTimeDelay | UDINT | — | — | |
| Inter-unit synchronization: refresh end time | .RefreshFinishTimeDelay | UDINT | — | — | |
| Inter-unit synchronization: maximum start time | .RefreshStartTimeMaxDelay | UDINT | — | — | |
| Inter-unit synchronization: maximum end time | .RefreshFinishTimeMaxDelay | UDINT | — | — | |
| Inter-unit synchronization: refresh execution time | .RefreshExecutionTime | UDINT | — | — | |
| Inter-unit synchronization: refresh time exceeded | .RefreshIntervalOver | BOOL | — | — | |
Communication and networks
| Name | KEYENCE KV-X | OMRON NJ/NX | Remarks | ||
|---|---|---|---|---|---|
| Variable name | Data type | Variable / instruction | Data type | ||
| Number of ports used | — | — | _Port_numUsingPort | USINT | |
| Network communication instruction enabled | — | — | _Port_isAvailable | BOOL | |
| FINS/TCP connection status | — | — | _FINSTCPConnSta | WORD | |
| EtherNet/IP error | — | — | _EIP_ErrStaor GetEIPError instruction | WORD | |
| EtherNet/IP online | — | — | _EIP_EtnOnlineSta | BOOL | |
| Tag data link communicating | — | — | _EIP_TDLinkRunSta | BOOL | |
| Tag data link communication start switch | — | — | _EIP_TDLinkStartCmd | BOOL | |
| EtherCAT error | — | — | _EC_ErrStaor GetECError / ResetECError instructions | WORD | |
| EtherCAT process data communication status | — | — | _EC_PDActive | BOOL | |
| Motion control error status | — | — | _MC_ErrStaGetMCError / ResetMCError instructions | WORD | |
| Option board status | — | — | _PLC_OptBoardSta | ARRAY[1..2] OF _sOPTBOARD_STA | |
No matching variables found.
Legend
| — | No corresponding system variable / system-defined variable / instruction |
|---|---|
| ... instruction | An instruction that can be used on NJ/NX instead of a system-defined variable (instructions described in the Instructions Reference Manual, Basic) |
| XX or YY instruction | Can be obtained with either a system-defined variable or an instruction. If the system-defined variable cannot be used in a user program, use the instruction |
| .MemberName | A member of a structure variable, indented under the row of its parent structure variable (e.g. .ScanTime under _ProgramInfo = _ProgramInfo.ScanTime). Hover to see the full name. You can also search by full name |
| [0..n] | Array variable. On KV, _LoggingTrace[1..9] etc. are assigned from ID 1 onward |
| <TaskName> | Replaced by the NJ/NX task name, e.g. _PrimaryTask_LastExecTime |
How rows are organized
- Rows are based on the KV-X system variables, with each structure member on its own row. Major variables that exist only on NJ/NX are added at the end of each category.
- Where KV-X and NJ/NX differ in units or types (e.g. scan time vs. task execution time), items with a similar purpose are still listed on the same row.
Scope
- KV-X: covers the global and local variables listed in the appendix "System Variable List" of the KV-X500 Series User's Manual. CR/CM assignments are omitted.
- NJ/NX: focuses on variables for the overall system and the PLC Function Module. For EtherCAT (_EC), EtherNet/IP (_EIP), motion (_MC) and the I/O bus (_CJB/_NXB/_XBU), only representative variables are listed.
- Some NJ/NX system-defined variables cannot be used in user programs (for example, those dedicated to data tracing or CIP message communication).
- Variable and instruction specifications and availability vary by CPU model and version. Check each manufacturer's manual before actual use.
Sources
- KEYENCE: KV-X500 Series User's Manual 084A03 (March 2026), Appendix 2 "System Variable List"
- OMRON: NJ/NX-series CPU Unit Software User's Manual SBCA-467AE (April 2026), A-8 "System-defined Variable List" and A-9 "Specifications for Individual System-defined Variables"
- OMRON: NJ/NX-series Instructions Reference Manual, Basic, SBCA-468Y (October 2025)
Related pages
PLC

Device Comparison by Manufacturer
Compares the device addresses of major PLC manufacturers such as Mitsubishi, OMRON and KEYENCE.
PLC

Special Relay Comparison by Manufacturer
Compares the special relays of major PLC manufacturers such as Mitsubishi, OMRON and KEYENCE.
PLC

Application Instruction Comparison by Manufacturer
Compares the application instructions of major PLC manufacturers such as Mitsubishi, OMRON and KEYENCE.
PLC

FUN/FB Comparison by Manufacturer
Compares the functions and function blocks of OMRON NX and KEYENCE KV-X.
PLC

Motion Control Instruction Comparison by Manufacturer
Compares the motion control instructions of OMRON NX and KEYENCE KV-X.
MITSUBISHI

SM / SD List
Special relays (SM) and special registers (SD) for Q series / L series / iQ-R series PLCs
KEYENCE

CR/CM Comparison by Model
CR/CM comparison across KV-X, KV-8000, KV-7000, KV-5000 and KV-3000
KEYENCE

CR/CM Cross-Reference: KV / KV-X
CR/CM and variable name correspondence between the KEYENCE KV-8000 series and the KV-X500/X300 series
OMRON

CJ to NJ Instruction Replacement Guide
A guide to replacing CJ instructions with NJ instructions
PC Tools

KVtoCJ
An application that converts KEYENCE KV series ladder programs into OMRON CJ series ladder programs
PC Tools

CJtoKV
An application that converts OMRON CJ series ladder programs into KEYENCE KV series ladder programs
