Function / Function Block Comparison (KEYENCE KV-X / OMRON NJ/NX)
A cross-reference table that lines up, by function, the functions (FUN) and function blocks (FB) of the KEYENCE KV-X500/X300 series and the OMRON NJ/NX series, both IEC 61131-3 compliant PLCs. "★IEC" marks IEC 61131-3 standard functions/FBs, which can generally be used with the same arguments. For proprietary instructions, instructions with similar functions are listed side by side and the differences are given in the remarks. 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.
Edge detection and latching
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Rising edge differentiation | ★IEC | R_TRIG | R_TRIG | |
| Falling edge differentiation | ★IEC | F_TRIG | F_TRIG | |
| NJ only | — | Up | ||
| NJ only | — | Down | ||
| Set-priority keep | ★IEC | SR | SR | |
| Reset-priority keep | ★IEC | RS | RS |
Bit operations
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Bit test | Similar | BitLoad | TestABit | |
| Bit test NOT | NJ only | — | TestABitN | |
| 1-bit set | Similar | BitSet | SetABit | |
| 1-bit reset | Similar | BitReset | ResetABit | |
| 1-bit out | NJ only | — | OutABit | |
| Multiple bit set | NJ only | — | SetBits | |
| Multiple bit reset | NJ only | — | ResetBits | |
| N-bit read group | NJ only | — | ReadNbit_** | |
| N-bit write group | NJ only | — | WriteNbit_** |
Comparison
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| = | ★IEC | EQ | EQ= | Inputs: KV: 2 to 10 / NJ: 2 to 5 |
| <> | ★IEC | NE | NE<> | |
| < | ★IEC | LT | LT< | Inputs: KV: 2 to 10 / NJ: 2 to 5 |
| <= | ★IEC | LE | LE<= | Inputs: KV: 2 to 10 / NJ: 2 to 5 |
| > | ★IEC | GT | GT> | Inputs: KV: 2 to 10 / NJ: 2 to 5 |
| >= | ★IEC | GE | GE>= | Inputs: KV: 2 to 10 / NJ: 2 to 5 |
| Area comparison | Similar | ZoneCmp | ZoneCmp | |
| Comparison | NJ only | — | Cmp | |
| String comparison EQ | Partial | StringCmp | EQascii | Inputs: KV: 2 / NJ: 2 to 5 |
| String comparison NE | NJ only | — | NEascii | |
| String comparison LT | NJ only | — | LTascii LEascii GTascii GEascii | |
| Table comparison | NJ only | — | TableCmp | |
| Array batch comparison EQ | NJ only | — | AryCmpEQ AryCmpNE AryCmpLT AryCmpLE AryCmpGT AryCmpGE | |
| Array element comparison EQ | NJ only | — | AryCmpEQV AryCmpNEV AryCmpLTV AryCmpLEV AryCmpGTV AryCmpGEV |
Timers
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| On-delay timer | ★IEC | TON | TON | |
| Off-delay timer | ★IEC | TOF | TOF | |
| Pulse output | ★IEC | TP | TP | |
| Up-down timer | KV only | UpDownTimer | — | |
| Accumulation timer | NJ only | — | AccumulationTimer | |
| 100 ms timer | NJ only | — | Timer |
Counters
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Up counter | ★IEC | CTU | CTU | |
| Up counter group | ★IEC | CTU_DINT CTU_UDINT | CTU_** | |
| Down counter | ★IEC | CTD | CTD | |
| Down counter group | ★IEC | CTD_DINT CTD_UDINT | CTD_** | |
| Up-down counter | ★IEC | CTUD | CTUD | |
| Up-down counter group | ★IEC | CTUD_DINT CTUD_UDINT | CTUD_** |
Shift and rotate
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Shift left N bits | ★IEC | SHL | SHL | |
| Shift right N bits | ★IEC | SHR | SHR | |
| Rotate left N bits | ★IEC | ROL | ROL | |
| Rotate right N bits | ★IEC | ROR | ROR | |
| Shift array left N elements | Similar | AryShiftL | ArySHL | |
| Shift array right N elements | Similar | AryShiftR | ArySHR | |
| Shift register | Similar | ShiftRegister | AryShiftReg | |
| Left/right shift register | NJ only | — | AryShiftRegLR | |
| N-bit data shift left N bits with carry | NJ only | — | NSHLC NSHRC |
Logical operations
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Bit inversion | ★IEC | NOT | NOT | |
| Logical AND | ★IEC | AND | AND& | |
| Logical OR | ★IEC | OR | OR | |
| Exclusive OR | ★IEC | XOR | XOR | |
| Exclusive NOR | NJ only | — | XORN | |
| Array logical AND | NJ only | — | AryAnd AryOr AryXor AryXorN |
Arithmetic
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Addition | ★IEC | ADD | ADD+ | |
| Addition (with overflow check) | NJ only | — | AddOU+OU | |
| Subtraction | ★IEC | SUB | SUB- | |
| Subtraction (with overflow check) | NJ only | — | SubOU-OU | |
| Multiplication | ★IEC | MUL | MUL* | |
| Multiplication (with overflow check) | NJ only | — | MulOU*OU | |
| Division | ★IEC | DIV | DIV/ | |
| Modulo | ★IEC | MOD | MOD | |
| Real modulo | NJ only | — | ModReal | |
| Absolute value | ★IEC | ABS | ABS | |
| Square root | ★IEC | SQRT | SQRT | |
| Natural logarithm | ★IEC | LN | LN | |
| Common logarithm | ★IEC | LOG | LOG | |
| Natural exponential | ★IEC | EXP | EXP | |
| SIN | ★IEC | SIN | SIN | |
| COS | ★IEC | COS | COS | |
| TAN | ★IEC | TAN | TAN | |
| SIN-1 | ★IEC | ASIN | ASIN | |
| COS-1 | ★IEC | ACOS | ACOS | |
| TAN-1 | ★IEC | ATAN | ATAN | |
| Exponentiation | ★IEC | EXPT | EXPT** | |
| Arc tangent from coordinates | KV only | ATAN2 | — | |
| Degrees → radians conversion | Similar | DegToRad | DegToRad | |
| Radians → degrees conversion | Similar | RadToDeg | RadToDeg | |
| Increment | Similar | Inc | Inc | |
| Decrement | Similar | Dec | Dec | |
| Sign inversion | NJ only | — | Neg | |
| Extract fractional part of real | NJ only | — | Fraction | |
| Random number generation | NJ only | — | Rand | |
| Array batch addition | NJ only | — | AryAdd AryAddV ArySub ArySubV | |
| Real number check | Similar | IS_VALID | CheckReal |
Selection
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Bit selection | ★IEC | SEL | SEL | |
| Multiplexer | ★IEC | MUX | MUX | |
| Maximum value search | ★IEC | MAX | MAX | |
| Minimum value search | ★IEC | MIN | MIN | |
| Upper/lower limit | ★IEC | LIMIT | LIMIT | |
| Dead band control | NJ only | — | Band | |
| Dead zone control | NJ only | — | Zone |
Arrays and data processing
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Search array for maximum value | Similar | AryMax | AryMax | |
| Search array for minimum value | Similar | AryMin | AryMin | |
| Average of array elements | Similar | AryMean | AryMean | |
| Sum calculation | KV only | ArySum | — | |
| Standard deviation of array elements | NJ only | — | ArySD | |
| Array search | Similar | DataSearch | ArySearch | |
| Bit counter | Partial | BitCount | BitCnt | |
| Initialization | Partial | AryReset | Clear | |
| Record sort | Similar | StructSort | RecSort | |
| Record search | NJ only | — | RecSearch RecRangeSearch | |
| Get number of records | NJ only | — | RecNum | |
| Record maximum value search | NJ only | — | RecMax RecMin | |
| Sum calculation | Partial | ByteSum | StringSum | |
| CRC-16 calculation (array) | Similar | AryCRC | AryCRC16 AryCRCCCITT | |
| CRC-16 calculation (string) | NJ only | — | StringCRC16 StringCRCCCITT | |
| LRC calculation (string) | NJ only | — | StringLRC AryLRC_** |
Data transfer
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Transfer | ★IEC | MOVE | MOVE | |
| Block set | Similar | FillMove | SetBlock | |
| Array transfer | Similar | BlockMove | AryMove | |
| Memory copy | NJ only | — | MemCopy | |
| Multiple bit set | Partial | BitFillMove | SetBits | |
| Multiple bit transfer | Similar | BitBlockMove | TransBits | |
| Digit transfer | Partial | PartialMove | MoveDigit | |
| Bit transfer | NJ only | — | MoveBit | |
| Convert to byte array | Partial | ByteBlockMove | ToAryByte AryByteTo | |
| Data exchange | Similar | Exchange | Exchange | |
| Array data exchange | NJ only | — | AryExchange | |
| Initialization | Similar | Clear | Clear | |
| Initialization | Partial | StructReset | Clear | |
| Bit pattern copy (bit string → signed integer) group | NJ only | — | Copy**ToNum CopyNumTo** Copy**To*** |
Get size
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Get number of array elements | Similar | GetAryCount | SizeOfAry | |
| Get array start index | ★IEC | LOWER_BOUND | LOWER_BOUND | |
| Get array end index | ★IEC | UPPER_BOUND | UPPER_BOUND | |
| Get word size | KV only | GetWordSize | — | |
| Get byte size | KV only | GetByteSize | — | |
| Get bit size | KV only | GetBitSize | — |
Data conversion
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Bit decoder | Similar | Decode | Decoder | |
| Bit encoder | Similar | Encode | Encoder | |
| BIN code → Gray code conversion group | Similar | BinToGrayCode | BinToGray_** | |
| Gray code → BIN code conversion group | Similar | GrayCodeToBin | GrayToBin_** | |
| Gray code conversion | NJ only | — | Gray | |
| 4-bit split | Similar | DisperseNibble | DispartDigit | |
| 4-bit combine group | Similar | UniteNibble | UniteDigit_** | |
| Byte data split | Similar | DisperseByte | Dispart8Bit | |
| Byte data combine group | Similar | UniteByte | Unite8Bit_** | |
| 2-byte combine | NJ only | — | PackWord PackDword | |
| Byte swap | Partial | BlockSwap | Swap | |
| Bit row → bit column conversion group | NJ only | — | ColmToLine_** LineToColm | |
| Split real mantissa and exponent | NJ only | — | DispartReal UniteReal | |
| Polyline approximation (with polyline check) | Similar | ApproxCal | PWLApprox | |
| Polyline approximation (without polyline check) | NJ only | — | PWLApproxNoLineChk PWLLineChk | |
| Moving average | NJ only | — | MovingAverage | |
| Scaling | NJ only | — | ScaleTrans |
Data control (PID etc.)
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| PID with autotuning | Similar | PID | PIDAT | |
| Heating/cooling PID with autotuning | NJ only | — | PIDAT_HeatCool | |
| Time-proportional output | Similar | TimeProportionalOut | TimeProportionalOut | |
| Ramp signal | KV only | Ramp | — | |
| Lead-lag filter | KV only | LeadLagFilter | — | |
| Upper/lower limit alarm group | NJ only | — | LimitAlarm_** LimitAlarmDv_** LimitAlarmDvStbySeq_** | |
| Step program | NJ only | — | AC_StepProgram |
Tables and stacks
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Stack data store | Similar | FIFOWrite | StackPush | |
| First in, first out | Similar | FIFORead | StackFIFO | |
| Last in, first out | NJ only | — | StackLIFO | |
| Stack data insert | Similar | FIFOInsert | StackIns | |
| Stack data delete | Similar | FIFODelete | StackDel |
Character conversion
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| BIN data → hexadecimal ASCII code conversion | KV only | BinaryToAscii | — | |
| Hexadecimal ASCII code → BIN data conversion | KV only | AsciiToBinary | — | |
| Hexadecimal ASCII code → string conversion | KV only | AsciiToString | — | |
| Fixed-length decimal string conversion | Similar | NumToDecString | NumToDecString | |
| String → integer conversion group | Similar | DecStringToNum | STRING_TO_** | |
| Fixed-length hexadecimal string conversion | Similar | NumToHexString | NumToHexString | |
| Hexadecimal string → number conversion group | Similar | HexStringToNum | HexStringToNum_** | |
| Real (REAL) → string conversion with format | Similar | RealToString | RealToFormatString | |
| Real (LREAL) → string conversion with format | Similar | LrealToString | LrealToFormatString | |
| String → integer conversion group | Similar | StringToReal | STRING_TO_** | |
| String → integer conversion group | Similar | StringToLreal | STRING_TO_** | |
| Fixed-point number → string conversion | NJ only | — | FixNumToString StringToFixNum | |
| Variable value → string conversion | KV only | VariableToString | — | |
| String → variable value conversion | KV only | StringToVariable | — | |
| CIP string → string conversion | KV only | CipStringToString | — | |
| String → CIP string conversion | KV only | StringToCipString | — | |
| UTF-16 data → string conversion | KV only | UTF16CodeToString | — | |
| String → UTF-16 data conversion | KV only | StringToUTF16Code | — | |
| Character code conversion (UTF-8 → SJIS) | NJ only | — | UTF8ToSJIS SJISToUTF8 | |
| String → array conversion | Similar | DisperseString | StringToAry | |
| Array → string conversion | Similar | UniteString | AryToString | |
| Date/time → string conversion | NJ only | — | DtToString DateToString TodToString | |
| String MD5 conversion | NJ only | — | StringMD5 |
String processing
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| String length detection | ★IEC | LEN | LEN | |
| String: extract from left | ★IEC | LEFT | LEFT | |
| String: extract from right | ★IEC | RIGHT | RIGHT | |
| String: extract from any position | ★IEC | MID | MID | |
| String: concatenate | ★IEC | CONCAT | CONCAT | |
| String: insert | ★IEC | INSERT | INSERT | |
| String: delete | ★IEC | DELETE | DELETE | |
| String: replace | ★IEC | REPLACE | REPLACE | |
| String: search | ★IEC | FIND | FIND | |
| String search within range | KV only | StringSearch | — | |
| Transfer | Partial | StringMove | MOVE | |
| String: trim left | Similar | TrimL | TrimL | |
| String: trim right | Similar | TrimR | TrimR | |
| String: trim both ends | KV only | Trim | — | |
| Read string with delimiter removed | Partial | SplitN | SubDelimiter | KV: to string array / NJ: to structure |
| Write string with delimiter added | NJ only | — | AddDelimiter | |
| String: convert to uppercase | NJ only | — | ToUCase ToLCase | |
| String: clear | NJ only | — | ClearString | |
| String: get byte count | NJ only | — | GetByteLen |
Time and date/time
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Time addition | ★IEC | ADD_TIME | ADD_TIME | |
| Time subtraction | ★IEC | SUB_TIME | SUB_TIME | |
| Time multiplication | ★IEC | MUL_TIME | MULTIME | |
| Time division | ★IEC | DIV_TIME | DIVTIME | |
| Add time of day and duration | NJ only | — | ADD_TOD_TIME ADD_DT_TIME | |
| Subtract duration from time of day | NJ only | — | SUB_TOD_TIME SUB_TOD_TOD SUB_DATE_DATE SUB_DT_DT SUB_DT_TIME | |
| Combine date and time of day | NJ only | — | CONCAT_DATE_TOD DT_TO_TOD DT_TO_DATE | |
| Clock correction | Similar | WriteCalendarTime | SetTime | |
| Get time | NJ only | — | GetTime | |
| Date/time → seconds conversion | Similar | DtToSec | DtToSec | |
| Seconds → date/time conversion | Similar | SecToDt | SecToDt | |
| Date → seconds conversion | NJ only | — | DateToSec TodToSec SecToDate SecToTod | |
| Get day of week | Similar | GetDayOfWeek | GetDayOfWeek | |
| Time → microseconds conversion | KV only | TimeToMicroSec | — | |
| Time → milliseconds conversion | KV only | TimeToMilliSec | — | |
| Time → seconds conversion | Similar | TimeToSec | TimeToSec | |
| Time → nanoseconds conversion | NJ only | — | TimeToNanoSec | |
| Microseconds → time conversion | KV only | MicroSecToTime | — | |
| Milliseconds → time conversion | KV only | MilliSecToTime | — | |
| Seconds → time conversion | Similar | SecToTime | SecToTime | |
| Nanoseconds → time conversion | NJ only | — | NanoSecToTime | |
| Leap year check | NJ only | — | ChkLeapYear GetDaysOfMonth DaysToMonth GetWeekOfYear | |
| Split time | NJ only | — | DtToDateStruct DateStructToDt | |
| Truncate time | NJ only | — | TruncTime TruncDt TruncTod |
Data type conversion and BCD
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Integer → integer conversion group | ★IEC | *_TO_** | **_TO_*** | |
| Integer conversion group | ★IEC | TO_** | TO_** | |
| Truncate real | ★IEC | TRUNC_** | TRUNC | |
| Round real | NJ only | — | Round RoundUp | |
| Unsigned integer → BCD conversion group | ★IEC | TO_BCD_** | **_TO_BCD_*** | |
| BCD → unsigned integer conversion group | ★IEC | BCD_TO_** | **_BCD_TO_*** BCD_TO_** | |
| Signed BCD → signed integer conversion | NJ only | — | BCDsToBin BinToBCDs_** | |
| Array batch BCD conversion | NJ only | — | AryToBCD AryToBin | |
| Integer → string conversion group | NJ only | — | **_TO_STRING STRING_TO_** | |
| Enumeration → integer conversion | NJ only | — | EnumToNum NumToEnum | |
| Range type variable check | NJ only | — | ChkRange |
Files (storage / SD card)
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| File write | Partial | StorageWriteBin | FileWrite | NJ: FileOpen, FileClose required (FileWriteVar for a single variable) |
| File read | Partial | StorageReadBin | FileRead | NJ: FileOpen, FileClose required (FileReadVar for a single variable) |
| Variable file write | NJ only | — | FileWriteVar FileReadVar | |
| File open | NJ only | — | FileOpen FileClose FileSeek | |
| String read | Similar | StorageReadLine | FileGets | KV: multiple lines / NJ: 1 line |
| String write | Similar | StoragePrint | FilePuts | |
| File delete | Similar | StorageDeleteFile | FileRemove | |
| Create directory | Similar | StorageMakeDir | DirCreate | |
| Delete directory | Similar | StorageRemoveDir | DirRemove | |
| File copy | Similar | StorageCopy | FileCopy | |
| Move storage file | KV only | StorageMove | — | |
| File rename | Similar | StorageRename | FileRename | |
| Get free storage space | KV only | StorageGetCapacity | — | NJ:_Card1Capacity/_Card1Used |
| Get storage file status | KV only | StorageGetStatus | — | |
| Get storage file list | KV only | StorageGetFileList | — | |
| SD Memory Card backup | NJ only | — | BackupToMemoryCard |
Socket communication
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| TCP socket connect | Similar | SocketTCP_ActiveOpen | SktTCPConnect | |
| TCP socket accept | Similar | SocketTCP_PassiveOpen | SktTCPAccept | |
| TCP socket send | Similar | SocketTCP_Send | SktTCPSend | |
| TCP socket receive | Similar | SocketTCP_Recv | SktTCPRcv | |
| TCP socket receive (with delimiter) | KV only | SocketTCP_RecvDelimiter | — | |
| UDP socket create | Similar | SocketUDP_Open | SktUDPCreate | |
| UDP socket send | Similar | SocketUDP_Send | SktUDPSend | |
| UDP socket receive | Similar | SocketUDP_Recv | SktUDPRcv | |
| TCP/UDP socket receive buffer clear | Similar | SocketClearRecvBuf | SktClearBuf | |
| TCP/UDP socket close | Similar | SocketClose | SktClose | |
| Read TCP socket status | NJ only | — | SktGetTCPStatus | |
| Set TCP socket option | NJ only | — | SktSetOption | |
| Establish TLS session | NJ only | — | SktTLSConnect SktTLSRead SktTLSWrite SktTLSDisconnect SktTLSClearBuf SktTLSStopLog | |
| Send PING | KV only | Ping | — | |
| Send Modbus TCP general command | NJ only | — | ModbusTCPCmd ModbusTCPRead ModbusTCPWrite | |
| Get FTP server file list | NJ only | — | FTPGetFileList FTPGetFile FTPPutFile FTPRemoveFile FTPRemoveDir | |
| Change IP address | NJ only | — | ChangeIPAdr ChangeXBUnitIPAdr ChangeFTPAccount ChangeNTPServerAdr | |
| Read NTP status | NJ only | — | GetNTPStatus |
EtherNet/IP (CIP messages)
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Send explicit message (UCMM) | Similar | CipMsgService | CIPUCMMSend CIPSend | |
| Send explicit message (UCMM) | Partial | CipGetAttributeSingle | CIPUCMMSend | |
| Send explicit message (UCMM) | Partial | CipSetAttributeSingle | CIPUCMMSend | |
| Read variable (UCMM explicit message) | NJ only | — | CIPUCMMRead CIPUCMMWrite | |
| Establish CIP Class 3 (Large_Forward_Open) connection | NJ only | — | CIPOpen CIPOpenWithDataSize CIPRead CIPWrite CIPClose |
EtherCAT
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| CoE SDO read | Similar | EC_CoE_SDORead | EC_CoESDORead | |
| CoE SDO write | Similar | EC_CoE_SDOWrite | EC_CoESDOWrite | |
| Disconnect EtherCAT slave | Partial | EC_CoE_PDOStop | EC_DisconnectSlave | |
| Reconnect EtherCAT slave | Partial | EC_CoE_PDORestart | EC_ConnectSlave | |
| Enable / disable EtherCAT slave | NJ only | — | EC_ChangeEnableSetting | |
| Start EtherCAT packet monitor | NJ only | — | EC_StartMon EC_StopMon EC_SaveMon EC_CopyMon | |
| Read EtherCAT master diagnostic and statistical information | NJ only | — | EC_GetMasterStatistics EC_ClearMasterStatistics EC_GetSlaveStatistics EC_ClearSlaveStatistics | |
| Write NX object | NJ only | — | NX_WriteObj NX_ReadObj |
OPC UA
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| OPC UA client connect | KV only | UA_Connect | — | |
| OPC UA client disconnect | KV only | UA_Disconnect | — | |
| Get node handle list | KV only | UA_NodeGetHandleList | — | |
| Release node handle list | KV only | UA_NodeReleaseHandleList | — | |
| Read node value | KV only | UA_ReadValueList | — | |
| Write node value | KV only | UA_WriteValueList | — | |
| Enable server method | KV only | UA_ServerMethodEnable | — | |
| Complete server method | KV only | UA_ServerMethodComplete | — | |
| UINT array → OPC UA date/time conversion | KV only | UA_UINTarrayToDateTime | — | |
| OPC UA date/time → UINT array conversion | KV only | UA_DateTimeToUINTarray | — |
Units, buffer memory and refresh
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Read buffer memory value | KV only | UnitBufMemRead UnitBufMemBlockRead | — | |
| Write buffer memory value | KV only | UnitBufMemWrite UnitBufMemBlockWrite UnitBufMemFill | — | |
| Refresh input relay status | KV only | RefreshX RefreshY | — | |
| Refresh cyclic communication input data | KV only | RefreshCyclicInput RefreshCyclicOutput | — | |
| Free-running counter refresh | KV only | RefreshFreerunCounter | — | |
| Get incrementing free-running counter group | NJ only | — | Get**Cnt | |
| Get clock pulse group | NJ only | — | Get**Clk | |
| Determine unit type | KV only | IS_*** | — | |
| Restart unit | NJ only | — | ResetUnit RestartNXUnit | |
| Change NX Unit write mode | NJ only | — | NX_ChangeWriteMode NX_SaveParam | |
| Read PLC total power-on time | NJ only | — | PLC_ReadTotalPowerOnTime NX_ReadTotalPowerOnTime XBUnit_ReadTotalPowerOnTime |
Program and task control
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Program execute command | Similar | ModuleStart | PrgStart | |
| Program stop command | Similar | ModuleStop | PrgStop | |
| Read program status | NJ only | — | PrgStatus | |
| Read own task status | NJ only | — | GetMyTaskStatus GetMyTaskInterval Task_IsActive | |
| Activate event task | NJ only | — | ActEventTask | |
| Exclusive lock between tasks | NJ only | — | Lock Unlock | |
| Get program hash code | NJ only | — | GetPrgHashCode |
Interrupts
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Enable interrupts | KV only | EnableInterrupt | — | |
| Disable interrupts | KV only | DisableInterrupt | — | |
| Interrupt-disabled range | KV only | DisableInterruptRange | — | |
| Set input interrupt detection condition | KV only | SetInputInterruptCondition | — |
Logging, tracing and operation recording
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Data trace sampling | Partial | — | TraceSamp | |
| Data trace trigger condition met | NJ only | — | TraceTrig | |
| Read data trace status | NJ only | — | GetTraceStatus | |
| Switch collection settings | Partial | — | APB_ChangeSamplingSettings | |
| Enable logging/trace | KV only | LoggingEnable LoggingDisable | — | |
| Get operation recording data | Partial | OperationRecordCapture OperationRecordSave | — | |
| Save camera image | KV only | CameraSaveImage | — |
Errors and events
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Create user-defined error | NJ only | — | SetAlarm ResetAlarm GetAlarm | |
| Create user-defined information | NJ only | — | SetInfo | |
| Get PLC error status | NJ only | — | GetPLCError ResetPLCError | |
| Get I/O bus error status | NJ only | — | GetCJBError ResetCJBError | |
| Get NX bus error status | NJ only | — | GetNXBError ResetNXBError GetNXUnitError | |
| Get X bus error status | NJ only | — | GetXBError GetXBUnitError ResetXBUnitError | |
| Get EtherCAT error status | NJ only | — | GetECError ResetECError | |
| Get EtherNet/IP error status | NJ only | — | GetEIPError | |
| Get motion control error status | NJ only | — | GetMCError ResetMCError |
Variable access and device addresses
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Get device address | KV only | DevAddressGet | — | |
| Increment device address | KV only | DevAddressInc DevAddressDec DevAddressAdd DevAddressSub | — | |
| Get device information | KV only | DevInfoGet | — | |
| Read bit string from device information | KV only | DevInfoRead DevInfoOffsetRead | — | |
| Write bit string from device information | KV only | DevInfoWrite DevInfoOffsetWrite | — |
Serial communication
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Protocol macro | NJ only | — | ExecPMCR SerialSend SerialRcv SerialRcvNoClear SendCmd | |
| Send no-protocol data | NJ only | — | NX_SerialSend NX_SerialRcv NX_SerialSigCtl NX_SerialSigRead NX_SerialStatusRead NX_SerialBufClear NX_SerialStartMon NX_SerialStopMon | |
| Send Modbus RTU general command | NJ only | — | NX_ModbusRtuCmd NX_ModbusRtuRead NX_ModbusRtuWrite |
IO-Link and time stamps
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Read IO-Link device object | NJ only | — | IOL_ReadObj IOL_WriteObj | |
| Write time-stamped digital output | NJ only | — | NX_DOutTimeStamp NX_AryDOutTimeStamp |
Unit programs
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Start unit program | KV only | UPStart | — | |
| Force-end unit program | KV only | UPStop | — | |
| Pause flow | KV only | UFSuspend UFResume | — |
Compatibility (older KV models)
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| String: extract from any position | Partial | C_SMID | MID | |
| String: insert | Partial | C_SINS | INSERT | |
| String: delete | Partial | C_SDEL | DELETE | |
| String comparison EQ | Partial | C_SCMP | EQascii |
Unit-specific (KV only)
| Name | Category | KEYENCE KV-X | OMRON NJ/NX | Remarks |
|---|---|---|---|---|
| Read buffered data | KV only | U_ReadBuf | — | |
| Set output overcurrent protection | KV only | U_DisableOverCP | — | |
| Set input overvoltage protection | KV only | U_DisableOverVP | — | |
| KV socket open settings | KV only | U_SockOpen | — | |
| Write KV socket send data | KV only | U_SockWriteBuf | — | |
| Read KV socket receive data | KV only | U_SockReadBuf | — | |
| Read KV socket processing status | KV only | U_SockStatus | — | |
| KV socket TCP (no-protocol) receive settings | KV only | U_SockNonProcRecvSetting | — | |
| Write KV socket UDP destination | KV only | U_SockUDPTo | — | |
| Specify KV socket Ethernet port number | KV only | U_SockSelectPort | — | |
| Set mail recipient group | KV only | U_MailToGroup | — | |
| Set mail recipient address | KV only | U_MailTo | — | |
| Set mail subject | KV only | U_MailSubject | — | |
| Set mail body | KV only | U_MailText | — | |
| Set mail attachment file name | KV only | U_MailAttach | — | |
| Get mail send result | KV only | U_MailStatus | — | |
| Read FTP file transfer status | KV only | U_FTPClientStatus | — | |
| Specify message communication target | KV only | U_MsgTo | — | |
| Write message communication send data | KV only | U_MsgSend | — | |
| Read message communication receive data | KV only | U_MsgRecv | — | |
| Read message communication completion code | KV only | U_MsgStatus | — | |
| Specify node for cyclic communication stop request | KV only | U_CyclicStop | — | |
| Specify node for cyclic communication resume request | KV only | U_CyclicStart | — | |
| Read cyclic communication registered node table | KV only | U_CyclicReadRegister | — | |
| Read cyclic communication error node table | KV only | U_CyclicReadErr | — | |
| Read PROTOCOL STUDIO event communication command receive buffer | KV only | U_PSReadBuf | — | |
| Read current count value | KV only | U_CntReadCounter | — | |
| Read frequency | KV only | U_CntReadHz | — | |
| Read rotation speed | KV only | U_CntReadRPM | — | |
| Read input capture 0 | KV only | U_CntReadInputCapture0 | — | |
| Read input capture 1 | KV only | U_CntReadInputCapture1 | — | |
| Write current count value | KV only | U_CntWriteCounter | — | |
| Write comparator setting 0 | KV only | U_CntWriteCTC0 | — | |
| Write comparator setting 1 | KV only | U_CntWriteCTC1 | — | |
| Write preset value | KV only | U_CntWritePreset | — | |
| Read A/D conversion special data | KV only | U_ADRead | — | |
| Read all A/D conversion data | KV only | U_ADReadBlock | — | |
| Change special data offset | KV only | U_ADWriteOffset | — | |
| Write averaging constant | KV only | U_ADWriteAverage | — | |
| Write scaling settings | KV only | U_ADWriteScaling | — | |
| Write comparator setting | KV only | U_ADWriteCmpLimit | — | |
| Change D/A conversion output data | KV only | U_DAWrite | — | |
| Change output data offset | KV only | U_DAWriteOffset | — | |
| Write scaling settings | KV only | U_DAWriteScaling | — | |
| Write upper/lower limit alarm values | KV only | U_DAWriteUpperLowerLimit | — | |
| Write positioning start point number | KV only | U_PosWritePointNo | — | |
| Read current positioning point number | KV only | U_PosReadCurrentPointNo | — | |
| Read positioning M code number | KV only | U_PosReadMCode | — | |
| Read current coordinates | KV only | U_PosReadActPos | — | |
| Read current speed | KV only | U_PosReadActVel | — | |
| Read feedback torque monitor | KV only | U_PosReadFeedbackTrq | — | |
| Read command coordinates | KV only | U_PosReadCmdPos | — | |
| Read command speed | KV only | U_PosReadCmdVel | — | |
| Write current coordinate change | KV only | U_PosWriteChgPos | — | |
| Write positioning target coordinate change (coordinate) | KV only | U_PosWriteChgTargetPos | — | |
| Write positioning target coordinate change (speed) | KV only | U_PosWriteChgTargetVel | — | |
| Write positioning speed change | KV only | U_PosWriteChgVel | — | |
| Write positioning speed override | KV only | U_PosWriteOverride | — | |
| Read current control mode | KV only | U_PosReadCtrlMode | — | |
| Write control mode change | KV only | U_PosWriteCtrlMode | — | |
| Write speed command for speed control | KV only | U_PosWriteVelCtrlCmdVel | — | |
| Write torque limit for speed control | KV only | U_PosWriteVelCtrlTrqLimit | — | |
| Write torque command for torque control | KV only | U_PosWriteTrqCtrlCmdTrq | — | |
| Write speed limit for torque control | KV only | U_PosWriteTrqCtrlVelLimit | — | |
| Read axis error code | KV only | U_PosReadAxisErrCode | — | |
| Write special function selection | KV only | U_PosWriteSelectSpecialFunc | — |
No matching instructions found.
Legend
| ★IEC | IEC 61131-3 standard functions/FBs. Can generally be used with the same arguments on both KV-X and NJ/NX (differences such as the maximum number of inputs are given in the remarks) |
|---|---|
| Similar | Proprietary instructions of each manufacturer with equivalent functions. Argument names, types and structure differ |
| Partial | Functions that partly overlap, or can be substituted by a combination of instructions |
| KV only / NJ only | Instructions available on only one of the models (within the scope of this page) |
| — | No corresponding instruction |
| Name | Name as given in the NJ/NX Instructions Reference Manual (KV-X name if there is no NJ/NX equivalent) |
| ○○_** / **_TO_*** | Group instructions whose names change by data type (e.g. CTU_** → CTU_DINT, CTU_LINT, etc.) |
How rows are organized
- Each function is one row. Instructions of the same family (read/write, start/stop, etc.) are listed on the same row separated by " / ".
- Breakdown by category: ★IEC 70, similar 78, partial 24, KV only 125, NJ only 117 (414 rows in total).
Scope
- KV-X: covers chapter 3 "FUN/FB" of the Instruction Reference Manual. Motion control instructions (MC_...), the instructions in chapter 2 (ladder instructions) and ST syntax are excluded.
- NJ/NX: covers the Instructions Reference Manual, Basic. Ladder diagram instructions (LD/AND/OR/Out), ST statements (IF/CASE etc.), sequence control instructions (MC/JMP/FOR etc.) and the instructions in the Motion Control volume are excluded.
- KV-X has no bit string types such as BYTE/WORD/DWORD/LWORD and handles them as integer types. NJ/NX bit operation and shift instructions apply to bit string types.
- Instruction specifications and availability vary by CPU model and version. Check each manufacturer's manual before actual use.
Sources
- KEYENCE: KV-X500/X300 Series Instruction Reference Manual 084A06 (March 2026)
- 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

System Variable Comparison by Manufacturer
Compares the system variables 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

