日本語 English

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

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Rising edge differentiation★IECR_TRIGR_TRIG
Falling edge differentiation★IECF_TRIGF_TRIG
NJ only—Up
NJ only—Down
Set-priority keep★IECSRSR
Reset-priority keep★IECRSRS

Bit operations

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Bit testSimilarBitLoadTestABit
Bit test NOTNJ only—TestABitN
1-bit setSimilarBitSetSetABit
1-bit resetSimilarBitResetResetABit
1-bit outNJ only—OutABit
Multiple bit setNJ only—SetBits
Multiple bit resetNJ only—ResetBits
N-bit read groupNJ only—ReadNbit_**
N-bit write groupNJ only—WriteNbit_**

Comparison

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
=★IECEQEQ=Inputs: KV: 2 to 10 / NJ: 2 to 5
<>★IECNENE<>
<★IECLTLT<Inputs: KV: 2 to 10 / NJ: 2 to 5
<=★IECLELE<=Inputs: KV: 2 to 10 / NJ: 2 to 5
>★IECGTGT>Inputs: KV: 2 to 10 / NJ: 2 to 5
>=★IECGEGE>=Inputs: KV: 2 to 10 / NJ: 2 to 5
Area comparisonSimilarZoneCmpZoneCmp
ComparisonNJ only—Cmp
String comparison EQPartialStringCmpEQasciiInputs: KV: 2 / NJ: 2 to 5
String comparison NENJ only—NEascii
String comparison LTNJ only—LTascii LEascii GTascii GEascii
Table comparisonNJ only—TableCmp
Array batch comparison EQNJ only—AryCmpEQ AryCmpNE AryCmpLT AryCmpLE AryCmpGT AryCmpGE
Array element comparison EQNJ only—AryCmpEQV AryCmpNEV AryCmpLTV AryCmpLEV AryCmpGTV AryCmpGEV

Timers

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
On-delay timer★IECTONTON
Off-delay timer★IECTOFTOF
Pulse output★IECTPTP
Up-down timerKV onlyUpDownTimer—
Accumulation timerNJ only—AccumulationTimer
100 ms timerNJ only—Timer

Counters

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Up counter★IECCTUCTU
Up counter group★IECCTU_DINT CTU_UDINTCTU_**
Down counter★IECCTDCTD
Down counter group★IECCTD_DINT CTD_UDINTCTD_**
Up-down counter★IECCTUDCTUD
Up-down counter group★IECCTUD_DINT CTUD_UDINTCTUD_**

Shift and rotate

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Shift left N bits★IECSHLSHL
Shift right N bits★IECSHRSHR
Rotate left N bits★IECROLROL
Rotate right N bits★IECRORROR
Shift array left N elementsSimilarAryShiftLArySHL
Shift array right N elementsSimilarAryShiftRArySHR
Shift registerSimilarShiftRegisterAryShiftReg
Left/right shift registerNJ only—AryShiftRegLR
N-bit data shift left N bits with carryNJ only—NSHLC NSHRC

Logical operations

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Bit inversion★IECNOTNOT
Logical AND★IECANDAND&
Logical OR★IECOROR
Exclusive OR★IECXORXOR
Exclusive NORNJ only—XORN
Array logical ANDNJ only—AryAnd AryOr AryXor AryXorN

Arithmetic

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Addition★IECADDADD+
Addition (with overflow check)NJ only—AddOU+OU
Subtraction★IECSUBSUB-
Subtraction (with overflow check)NJ only—SubOU-OU
Multiplication★IECMULMUL*
Multiplication (with overflow check)NJ only—MulOU*OU
Division★IECDIVDIV/
Modulo★IECMODMOD
Real moduloNJ only—ModReal
Absolute value★IECABSABS
Square root★IECSQRTSQRT
Natural logarithm★IECLNLN
Common logarithm★IECLOGLOG
Natural exponential★IECEXPEXP
SIN★IECSINSIN
COS★IECCOSCOS
TAN★IECTANTAN
SIN-1★IECASINASIN
COS-1★IECACOSACOS
TAN-1★IECATANATAN
Exponentiation★IECEXPTEXPT**
Arc tangent from coordinatesKV onlyATAN2—
Degrees → radians conversionSimilarDegToRadDegToRad
Radians → degrees conversionSimilarRadToDegRadToDeg
IncrementSimilarIncInc
DecrementSimilarDecDec
Sign inversionNJ only—Neg
Extract fractional part of realNJ only—Fraction
Random number generationNJ only—Rand
Array batch additionNJ only—AryAdd AryAddV ArySub ArySubV
Real number checkSimilarIS_VALIDCheckReal

Selection

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Bit selection★IECSELSEL
Multiplexer★IECMUXMUX
Maximum value search★IECMAXMAX
Minimum value search★IECMINMIN
Upper/lower limit★IECLIMITLIMIT
Dead band controlNJ only—Band
Dead zone controlNJ only—Zone

Arrays and data processing

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Search array for maximum valueSimilarAryMaxAryMax
Search array for minimum valueSimilarAryMinAryMin
Average of array elementsSimilarAryMeanAryMean
Sum calculationKV onlyArySum—
Standard deviation of array elementsNJ only—ArySD
Array searchSimilarDataSearchArySearch
Bit counterPartialBitCountBitCnt
InitializationPartialAryResetClear
Record sortSimilarStructSortRecSort
Record searchNJ only—RecSearch RecRangeSearch
Get number of recordsNJ only—RecNum
Record maximum value searchNJ only—RecMax RecMin
Sum calculationPartialByteSumStringSum
CRC-16 calculation (array)SimilarAryCRCAryCRC16 AryCRCCCITT
CRC-16 calculation (string)NJ only—StringCRC16 StringCRCCCITT
LRC calculation (string)NJ only—StringLRC AryLRC_**

Data transfer

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Transfer★IECMOVEMOVE
Block setSimilarFillMoveSetBlock
Array transferSimilarBlockMoveAryMove
Memory copyNJ only—MemCopy
Multiple bit setPartialBitFillMoveSetBits
Multiple bit transferSimilarBitBlockMoveTransBits
Digit transferPartialPartialMoveMoveDigit
Bit transferNJ only—MoveBit
Convert to byte arrayPartialByteBlockMoveToAryByte AryByteTo
Data exchangeSimilarExchangeExchange
Array data exchangeNJ only—AryExchange
InitializationSimilarClearClear
InitializationPartialStructResetClear
Bit pattern copy (bit string → signed integer) groupNJ only—Copy**ToNum CopyNumTo** Copy**To***

Get size

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Get number of array elementsSimilarGetAryCountSizeOfAry
Get array start index★IECLOWER_BOUNDLOWER_BOUND
Get array end index★IECUPPER_BOUNDUPPER_BOUND
Get word sizeKV onlyGetWordSize—
Get byte sizeKV onlyGetByteSize—
Get bit sizeKV onlyGetBitSize—

Data conversion

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Bit decoderSimilarDecodeDecoder
Bit encoderSimilarEncodeEncoder
BIN code → Gray code conversion groupSimilarBinToGrayCodeBinToGray_**
Gray code → BIN code conversion groupSimilarGrayCodeToBinGrayToBin_**
Gray code conversionNJ only—Gray
4-bit splitSimilarDisperseNibbleDispartDigit
4-bit combine groupSimilarUniteNibbleUniteDigit_**
Byte data splitSimilarDisperseByteDispart8Bit
Byte data combine groupSimilarUniteByteUnite8Bit_**
2-byte combineNJ only—PackWord PackDword
Byte swapPartialBlockSwapSwap
Bit row → bit column conversion groupNJ only—ColmToLine_** LineToColm
Split real mantissa and exponentNJ only—DispartReal UniteReal
Polyline approximation (with polyline check)SimilarApproxCalPWLApprox
Polyline approximation (without polyline check)NJ only—PWLApproxNoLineChk PWLLineChk
Moving averageNJ only—MovingAverage
ScalingNJ only—ScaleTrans

Data control (PID etc.)

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
PID with autotuningSimilarPIDPIDAT
Heating/cooling PID with autotuningNJ only—PIDAT_HeatCool
Time-proportional outputSimilarTimeProportionalOutTimeProportionalOut
Ramp signalKV onlyRamp—
Lead-lag filterKV onlyLeadLagFilter—
Upper/lower limit alarm groupNJ only—LimitAlarm_** LimitAlarmDv_** LimitAlarmDvStbySeq_**
Step programNJ only—AC_StepProgram

Tables and stacks

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Stack data storeSimilarFIFOWriteStackPush
First in, first outSimilarFIFOReadStackFIFO
Last in, first outNJ only—StackLIFO
Stack data insertSimilarFIFOInsertStackIns
Stack data deleteSimilarFIFODeleteStackDel

Character conversion

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
BIN data → hexadecimal ASCII code conversionKV onlyBinaryToAscii—
Hexadecimal ASCII code → BIN data conversionKV onlyAsciiToBinary—
Hexadecimal ASCII code → string conversionKV onlyAsciiToString—
Fixed-length decimal string conversionSimilarNumToDecStringNumToDecString
String → integer conversion groupSimilarDecStringToNumSTRING_TO_**
Fixed-length hexadecimal string conversionSimilarNumToHexStringNumToHexString
Hexadecimal string → number conversion groupSimilarHexStringToNumHexStringToNum_**
Real (REAL) → string conversion with formatSimilarRealToStringRealToFormatString
Real (LREAL) → string conversion with formatSimilarLrealToStringLrealToFormatString
String → integer conversion groupSimilarStringToRealSTRING_TO_**
String → integer conversion groupSimilarStringToLrealSTRING_TO_**
Fixed-point number → string conversionNJ only—FixNumToString StringToFixNum
Variable value → string conversionKV onlyVariableToString—
String → variable value conversionKV onlyStringToVariable—
CIP string → string conversionKV onlyCipStringToString—
String → CIP string conversionKV onlyStringToCipString—
UTF-16 data → string conversionKV onlyUTF16CodeToString—
String → UTF-16 data conversionKV onlyStringToUTF16Code—
Character code conversion (UTF-8 → SJIS)NJ only—UTF8ToSJIS SJISToUTF8
String → array conversionSimilarDisperseStringStringToAry
Array → string conversionSimilarUniteStringAryToString
Date/time → string conversionNJ only—DtToString DateToString TodToString
String MD5 conversionNJ only—StringMD5

String processing

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
String length detection★IECLENLEN
String: extract from left★IECLEFTLEFT
String: extract from right★IECRIGHTRIGHT
String: extract from any position★IECMIDMID
String: concatenate★IECCONCATCONCAT
String: insert★IECINSERTINSERT
String: delete★IECDELETEDELETE
String: replace★IECREPLACEREPLACE
String: search★IECFINDFIND
String search within rangeKV onlyStringSearch—
TransferPartialStringMoveMOVE
String: trim leftSimilarTrimLTrimL
String: trim rightSimilarTrimRTrimR
String: trim both endsKV onlyTrim—
Read string with delimiter removedPartialSplitNSubDelimiterKV: to string array / NJ: to structure
Write string with delimiter addedNJ only—AddDelimiter
String: convert to uppercaseNJ only—ToUCase ToLCase
String: clearNJ only—ClearString
String: get byte countNJ only—GetByteLen

Time and date/time

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Time addition★IECADD_TIMEADD_TIME
Time subtraction★IECSUB_TIMESUB_TIME
Time multiplication★IECMUL_TIMEMULTIME
Time division★IECDIV_TIMEDIVTIME
Add time of day and durationNJ only—ADD_TOD_TIME ADD_DT_TIME
Subtract duration from time of dayNJ only—SUB_TOD_TIME SUB_TOD_TOD SUB_DATE_DATE SUB_DT_DT SUB_DT_TIME
Combine date and time of dayNJ only—CONCAT_DATE_TOD DT_TO_TOD DT_TO_DATE
Clock correctionSimilarWriteCalendarTimeSetTime
Get timeNJ only—GetTime
Date/time → seconds conversionSimilarDtToSecDtToSec
Seconds → date/time conversionSimilarSecToDtSecToDt
Date → seconds conversionNJ only—DateToSec TodToSec SecToDate SecToTod
Get day of weekSimilarGetDayOfWeekGetDayOfWeek
Time → microseconds conversionKV onlyTimeToMicroSec—
Time → milliseconds conversionKV onlyTimeToMilliSec—
Time → seconds conversionSimilarTimeToSecTimeToSec
Time → nanoseconds conversionNJ only—TimeToNanoSec
Microseconds → time conversionKV onlyMicroSecToTime—
Milliseconds → time conversionKV onlyMilliSecToTime—
Seconds → time conversionSimilarSecToTimeSecToTime
Nanoseconds → time conversionNJ only—NanoSecToTime
Leap year checkNJ only—ChkLeapYear GetDaysOfMonth DaysToMonth GetWeekOfYear
Split timeNJ only—DtToDateStruct DateStructToDt
Truncate timeNJ only—TruncTime TruncDt TruncTod

Data type conversion and BCD

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Integer → integer conversion group★IEC*_TO_****_TO_***
Integer conversion group★IECTO_**TO_**
Truncate real★IECTRUNC_**TRUNC
Round realNJ only—Round RoundUp
Unsigned integer → BCD conversion group★IECTO_BCD_****_TO_BCD_***
BCD → unsigned integer conversion group★IECBCD_TO_****_BCD_TO_*** BCD_TO_**
Signed BCD → signed integer conversionNJ only—BCDsToBin BinToBCDs_**
Array batch BCD conversionNJ only—AryToBCD AryToBin
Integer → string conversion groupNJ only—**_TO_STRING STRING_TO_**
Enumeration → integer conversionNJ only—EnumToNum NumToEnum
Range type variable checkNJ only—ChkRange

Files (storage / SD card)

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
File writePartialStorageWriteBinFileWriteNJ: FileOpen, FileClose required
(FileWriteVar for a single variable)
File readPartialStorageReadBinFileReadNJ: FileOpen, FileClose required
(FileReadVar for a single variable)
Variable file writeNJ only—FileWriteVar FileReadVar
File openNJ only—FileOpen FileClose FileSeek
String readSimilarStorageReadLineFileGetsKV: multiple lines / NJ: 1 line
String writeSimilarStoragePrintFilePuts
File deleteSimilarStorageDeleteFileFileRemove
Create directorySimilarStorageMakeDirDirCreate
Delete directorySimilarStorageRemoveDirDirRemove
File copySimilarStorageCopyFileCopy
Move storage fileKV onlyStorageMove—
File renameSimilarStorageRenameFileRename
Get free storage spaceKV onlyStorageGetCapacity—NJ:_Card1Capacity/_Card1Used
Get storage file statusKV onlyStorageGetStatus—
Get storage file listKV onlyStorageGetFileList—
SD Memory Card backupNJ only—BackupToMemoryCard

Socket communication

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
TCP socket connectSimilarSocketTCP_ActiveOpenSktTCPConnect
TCP socket acceptSimilarSocketTCP_PassiveOpenSktTCPAccept
TCP socket sendSimilarSocketTCP_SendSktTCPSend
TCP socket receiveSimilarSocketTCP_RecvSktTCPRcv
TCP socket receive (with delimiter)KV onlySocketTCP_RecvDelimiter—
UDP socket createSimilarSocketUDP_OpenSktUDPCreate
UDP socket sendSimilarSocketUDP_SendSktUDPSend
UDP socket receiveSimilarSocketUDP_RecvSktUDPRcv
TCP/UDP socket receive buffer clearSimilarSocketClearRecvBufSktClearBuf
TCP/UDP socket closeSimilarSocketCloseSktClose
Read TCP socket statusNJ only—SktGetTCPStatus
Set TCP socket optionNJ only—SktSetOption
Establish TLS sessionNJ only—SktTLSConnect SktTLSRead SktTLSWrite SktTLSDisconnect SktTLSClearBuf SktTLSStopLog
Send PINGKV onlyPing—
Send Modbus TCP general commandNJ only—ModbusTCPCmd ModbusTCPRead ModbusTCPWrite
Get FTP server file listNJ only—FTPGetFileList FTPGetFile FTPPutFile FTPRemoveFile FTPRemoveDir
Change IP addressNJ only—ChangeIPAdr ChangeXBUnitIPAdr ChangeFTPAccount ChangeNTPServerAdr
Read NTP statusNJ only—GetNTPStatus

EtherNet/IP (CIP messages)

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Send explicit message (UCMM)SimilarCipMsgServiceCIPUCMMSend CIPSend
Send explicit message (UCMM)PartialCipGetAttributeSingleCIPUCMMSend
Send explicit message (UCMM)PartialCipSetAttributeSingleCIPUCMMSend
Read variable (UCMM explicit message)NJ only—CIPUCMMRead CIPUCMMWrite
Establish CIP Class 3 (Large_Forward_Open) connectionNJ only—CIPOpen CIPOpenWithDataSize CIPRead CIPWrite CIPClose

EtherCAT

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
CoE SDO readSimilarEC_CoE_SDOReadEC_CoESDORead
CoE SDO writeSimilarEC_CoE_SDOWriteEC_CoESDOWrite
Disconnect EtherCAT slavePartialEC_CoE_PDOStopEC_DisconnectSlave
Reconnect EtherCAT slavePartialEC_CoE_PDORestartEC_ConnectSlave
Enable / disable EtherCAT slaveNJ only—EC_ChangeEnableSetting
Start EtherCAT packet monitorNJ only—EC_StartMon EC_StopMon EC_SaveMon EC_CopyMon
Read EtherCAT master diagnostic and statistical informationNJ only—EC_GetMasterStatistics EC_ClearMasterStatistics EC_GetSlaveStatistics EC_ClearSlaveStatistics
Write NX objectNJ only—NX_WriteObj NX_ReadObj

OPC UA

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
OPC UA client connectKV onlyUA_Connect—
OPC UA client disconnectKV onlyUA_Disconnect—
Get node handle listKV onlyUA_NodeGetHandleList—
Release node handle listKV onlyUA_NodeReleaseHandleList—
Read node valueKV onlyUA_ReadValueList—
Write node valueKV onlyUA_WriteValueList—
Enable server methodKV onlyUA_ServerMethodEnable—
Complete server methodKV onlyUA_ServerMethodComplete—
UINT array → OPC UA date/time conversionKV onlyUA_UINTarrayToDateTime—
OPC UA date/time → UINT array conversionKV onlyUA_DateTimeToUINTarray—

Units, buffer memory and refresh

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Read buffer memory valueKV onlyUnitBufMemRead UnitBufMemBlockRead—
Write buffer memory valueKV onlyUnitBufMemWrite UnitBufMemBlockWrite UnitBufMemFill—
Refresh input relay statusKV onlyRefreshX RefreshY—
Refresh cyclic communication input dataKV onlyRefreshCyclicInput RefreshCyclicOutput—
Free-running counter refreshKV onlyRefreshFreerunCounter—
Get incrementing free-running counter groupNJ only—Get**Cnt
Get clock pulse groupNJ only—Get**Clk
Determine unit typeKV onlyIS_***—
Restart unitNJ only—ResetUnit RestartNXUnit
Change NX Unit write modeNJ only—NX_ChangeWriteMode NX_SaveParam
Read PLC total power-on timeNJ only—PLC_ReadTotalPowerOnTime NX_ReadTotalPowerOnTime XBUnit_ReadTotalPowerOnTime

Program and task control

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Program execute commandSimilarModuleStartPrgStart
Program stop commandSimilarModuleStopPrgStop
Read program statusNJ only—PrgStatus
Read own task statusNJ only—GetMyTaskStatus GetMyTaskInterval Task_IsActive
Activate event taskNJ only—ActEventTask
Exclusive lock between tasksNJ only—Lock Unlock
Get program hash codeNJ only—GetPrgHashCode

Interrupts

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Enable interruptsKV onlyEnableInterrupt—
Disable interruptsKV onlyDisableInterrupt—
Interrupt-disabled rangeKV onlyDisableInterruptRange—
Set input interrupt detection conditionKV onlySetInputInterruptCondition—

Logging, tracing and operation recording

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Data trace samplingPartial—TraceSamp
Data trace trigger condition metNJ only—TraceTrig
Read data trace statusNJ only—GetTraceStatus
Switch collection settingsPartial—APB_ChangeSamplingSettings
Enable logging/traceKV onlyLoggingEnable LoggingDisable—
Get operation recording dataPartialOperationRecordCapture OperationRecordSave—
Save camera imageKV onlyCameraSaveImage—

Errors and events

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Create user-defined errorNJ only—SetAlarm ResetAlarm GetAlarm
Create user-defined informationNJ only—SetInfo
Get PLC error statusNJ only—GetPLCError ResetPLCError
Get I/O bus error statusNJ only—GetCJBError ResetCJBError
Get NX bus error statusNJ only—GetNXBError ResetNXBError GetNXUnitError
Get X bus error statusNJ only—GetXBError GetXBUnitError ResetXBUnitError
Get EtherCAT error statusNJ only—GetECError ResetECError
Get EtherNet/IP error statusNJ only—GetEIPError
Get motion control error statusNJ only—GetMCError ResetMCError

Variable access and device addresses

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Get device addressKV onlyDevAddressGet—
Increment device addressKV onlyDevAddressInc DevAddressDec DevAddressAdd DevAddressSub—
Get device informationKV onlyDevInfoGet—
Read bit string from device informationKV onlyDevInfoRead DevInfoOffsetRead—
Write bit string from device informationKV onlyDevInfoWrite DevInfoOffsetWrite—

Serial communication

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Protocol macroNJ only—ExecPMCR SerialSend SerialRcv SerialRcvNoClear SendCmd
Send no-protocol dataNJ only—NX_SerialSend NX_SerialRcv NX_SerialSigCtl NX_SerialSigRead NX_SerialStatusRead NX_SerialBufClear NX_SerialStartMon NX_SerialStopMon
Send Modbus RTU general commandNJ only—NX_ModbusRtuCmd NX_ModbusRtuRead NX_ModbusRtuWrite

IO-Link and time stamps

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Read IO-Link device objectNJ only—IOL_ReadObj IOL_WriteObj
Write time-stamped digital outputNJ only—NX_DOutTimeStamp NX_AryDOutTimeStamp

Unit programs

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Start unit programKV onlyUPStart—
Force-end unit programKV onlyUPStop—
Pause flowKV onlyUFSuspend UFResume—

Compatibility (older KV models)

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
String: extract from any positionPartialC_SMIDMID
String: insertPartialC_SINSINSERT
String: deletePartialC_SDELDELETE
String comparison EQPartialC_SCMPEQascii

Unit-specific (KV only)

NameCategoryKEYENCE
KV-X
OMRON
NJ/NX
Remarks
Read buffered dataKV onlyU_ReadBuf—
Set output overcurrent protectionKV onlyU_DisableOverCP—
Set input overvoltage protectionKV onlyU_DisableOverVP—
KV socket open settingsKV onlyU_SockOpen—
Write KV socket send dataKV onlyU_SockWriteBuf—
Read KV socket receive dataKV onlyU_SockReadBuf—
Read KV socket processing statusKV onlyU_SockStatus—
KV socket TCP (no-protocol) receive settingsKV onlyU_SockNonProcRecvSetting—
Write KV socket UDP destinationKV onlyU_SockUDPTo—
Specify KV socket Ethernet port numberKV onlyU_SockSelectPort—
Set mail recipient groupKV onlyU_MailToGroup—
Set mail recipient addressKV onlyU_MailTo—
Set mail subjectKV onlyU_MailSubject—
Set mail bodyKV onlyU_MailText—
Set mail attachment file nameKV onlyU_MailAttach—
Get mail send resultKV onlyU_MailStatus—
Read FTP file transfer statusKV onlyU_FTPClientStatus—
Specify message communication targetKV onlyU_MsgTo—
Write message communication send dataKV onlyU_MsgSend—
Read message communication receive dataKV onlyU_MsgRecv—
Read message communication completion codeKV onlyU_MsgStatus—
Specify node for cyclic communication stop requestKV onlyU_CyclicStop—
Specify node for cyclic communication resume requestKV onlyU_CyclicStart—
Read cyclic communication registered node tableKV onlyU_CyclicReadRegister—
Read cyclic communication error node tableKV onlyU_CyclicReadErr—
Read PROTOCOL STUDIO event communication command receive bufferKV onlyU_PSReadBuf—
Read current count valueKV onlyU_CntReadCounter—
Read frequencyKV onlyU_CntReadHz—
Read rotation speedKV onlyU_CntReadRPM—
Read input capture 0KV onlyU_CntReadInputCapture0—
Read input capture 1KV onlyU_CntReadInputCapture1—
Write current count valueKV onlyU_CntWriteCounter—
Write comparator setting 0KV onlyU_CntWriteCTC0—
Write comparator setting 1KV onlyU_CntWriteCTC1—
Write preset valueKV onlyU_CntWritePreset—
Read A/D conversion special dataKV onlyU_ADRead—
Read all A/D conversion dataKV onlyU_ADReadBlock—
Change special data offsetKV onlyU_ADWriteOffset—
Write averaging constantKV onlyU_ADWriteAverage—
Write scaling settingsKV onlyU_ADWriteScaling—
Write comparator settingKV onlyU_ADWriteCmpLimit—
Change D/A conversion output dataKV onlyU_DAWrite—
Change output data offsetKV onlyU_DAWriteOffset—
Write scaling settingsKV onlyU_DAWriteScaling—
Write upper/lower limit alarm valuesKV onlyU_DAWriteUpperLowerLimit—
Write positioning start point numberKV onlyU_PosWritePointNo—
Read current positioning point numberKV onlyU_PosReadCurrentPointNo—
Read positioning M code numberKV onlyU_PosReadMCode—
Read current coordinatesKV onlyU_PosReadActPos—
Read current speedKV onlyU_PosReadActVel—
Read feedback torque monitorKV onlyU_PosReadFeedbackTrq—
Read command coordinatesKV onlyU_PosReadCmdPos—
Read command speedKV onlyU_PosReadCmdVel—
Write current coordinate changeKV onlyU_PosWriteChgPos—
Write positioning target coordinate change (coordinate)KV onlyU_PosWriteChgTargetPos—
Write positioning target coordinate change (speed)KV onlyU_PosWriteChgTargetVel—
Write positioning speed changeKV onlyU_PosWriteChgVel—
Write positioning speed overrideKV onlyU_PosWriteOverride—
Read current control modeKV onlyU_PosReadCtrlMode—
Write control mode changeKV onlyU_PosWriteCtrlMode—
Write speed command for speed controlKV onlyU_PosWriteVelCtrlCmdVel—
Write torque limit for speed controlKV onlyU_PosWriteVelCtrlTrqLimit—
Write torque command for torque controlKV onlyU_PosWriteTrqCtrlCmdTrq—
Write speed limit for torque controlKV onlyU_PosWriteTrqCtrlVelLimit—
Read axis error codeKV onlyU_PosReadAxisErrCode—
Write special function selectionKV onlyU_PosWriteSelectSpecialFunc—

No matching instructions found.

Legend

★IECIEC 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)
SimilarProprietary instructions of each manufacturer with equivalent functions. Argument names, types and structure differ
PartialFunctions that partly overlap, or can be substituted by a combination of instructions
KV only / NJ onlyInstructions available on only one of the models (within the scope of this page)
—No corresponding instruction
NameName 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

IEC61131-3

IEC61131-3

Explains IEC 61131-3, the international standard for PLC programming.

PLC

devices

Device Comparison by Manufacturer

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

PLC

relay

Special Relay Comparison by Manufacturer

Compares the special relays of major PLC manufacturers such as Mitsubishi, OMRON and KEYENCE.

PLC

function

Application Instruction Comparison by Manufacturer

Compares the application instructions of major PLC manufacturers such as Mitsubishi, OMRON and KEYENCE.

PLC

systemvar

System Variable Comparison by Manufacturer

Compares the system variables of OMRON NX and KEYENCE KV-X.

PLC

motion

Motion Control Instruction Comparison by Manufacturer

Compares the motion control instructions of OMRON NX and KEYENCE KV-X.

MITSUBISHI

Special Relay (SM) and Special Register (SD) List

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 by Model

CR/CM comparison across KV-X, KV-8000, KV-7000, KV-5000 and KV-3000

KEYENCE

CR/CM Comparison by Model

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

CJ to NJ Instruction Replacement Guide

A guide to replacing CJ instructions with NJ instructions

PC Tools

Converter from KV series to CJ series

KVtoCJ

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

PC Tools

Converter from CJ series to KV series

CJtoKV

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

Comments