CJ Series → NJ Series Instruction Replacement Guide
- Instruction replacement guide
- Special auxiliary relay table
- Read-only special auxiliary relays
- Read/write special auxiliary relays
Instruction Replacement Guide
This is a list of examples of instructions that behave similarly when replacing CS/CJ instructions with NJ ones
It simply lists instructions that look similar, so use it only as a reference for instruction names
Forcing yourself to use NJ instructions that resemble CJ ones can make things harder to use, so choose according to your program logic
(Created in 2013)
CJ-NJ Instruction Replacement Guide (CJNJGuide.pdf, Japanese)
Special Auxiliary Relay Table
This lists similar system-defined variables, or variables and instructions that seem related, for replacing CJ series special auxiliary relays on the NJ
They do not behave identically, so use this only as a reference
For details, compare the CJ and NJ manuals and decide for yourself
CJ: Appendix 3, Special Auxiliary Relay List, in the CPU Unit User's Manual (Software)
NJ: A-7, System-defined Variable List, in the CPU Unit User's Manual (Software)
| CJ | NJ | |
|---|---|---|
| Condition flag | Name | Variable name |
| P_ER | Error flag | P_PRGER |
| P_AER | Access Error Flag | |
| P_CY | Carry flag | P_CY |
| P_GT | > flag | |
| P_EQ | = flag | |
| P_LT | < flag | |
| P_N | Negative flag | |
| P_OF | Overflow Flag | |
| P_UF | Underflow Flag | |
| P_GE | >= Flag | |
| P_NE | ≠ Flag | |
| P_LE | <= Flag | |
| P_On | Always ON flag | P_On |
| P_Off | Always OFF flag | P_Off |
| CJ | NJ | |
|---|---|---|
| Clock pulses | Name | FUN |
| P_0_1ms | 0.1ms | Get100usClk |
| P_1ms | 1ms | Get1msClk |
| P_0_01s | 10ms | Get10msClk |
| P_0_02s | 20ms | Get20msClk |
| P_0_1ms | 100ms | Get100msClk |
| P_0_2ms | 200ms | Get200msClk |
| P_1s | 1s | Get1sClk |
| P_1min | 1min | Get1minClk |
| CJ | NJ | ||
|---|---|---|---|
| Address | Name | type | Instruction/variable name |
| A0 | 10 ms incrementing free-running timer | FUN | Get**Cnt |
| A1 | 100 ms incrementing free-running timer | ||
| A2 | 1 s incrementing free-running timer | ||
| A50.00 - A69.15 | Basic I/O unit information (rack 0 slot 0 to rack 3 slot 9) | Variables | _CJB_IOUnitInfo |
| A90-93 | User program date | ||
| A94-97 | Parameter date | ||
| A99.00 | UM read protection status | ||
| A99.01 | Task read protection status | ||
| A99.02 | Program write protection status | ||
| A99.03 | Program memory card backup prohibited status | ||
| A99.14 | IR/DR operation between tasks | ||
| A100 - 199 | Error log area | ||
| A200.11 | First cycle ON flag at start of operation | Variables | P_First_RunMode |
| A200.12 | Step Flag | ||
| A200.14 | Task Started Flag | ||
| A200.15 | Task First Start Flag | Variables | P_First_Run |
| A201.10 | Online Editing Wait Flag | ||
| A201.11 | Online Editing Processing Flag | ||
| A202.00 - 202.07 | Network Communications Enabled Flag | Outputs of instructions such as SerialSend | |
| A202.08 | CJ2-dedicated network communications instruction enabled flag | ||
| A202.15 | Network communications automatic allocation enabled flag | ||
| A203 - 210 | Network communications completion code | ||
| A211 | Number of CJ2-dedicated network communications instructions available | ||
| A213.00 - 213.07 | Explicit Communications Error Flag | ||
| A214.00 - 214.07 | Network communications completion one-cycle ON flag | ||
| A215.00 - 215.07 | Network communications completion one-cycle ON error flag | ||
| A216 - 217 | Network communications response code storage address | ||
| A218 | Communications port number used | ||
| A219.00 - 219.07 | Network Communications Error Flag | ||
| A220 - 259 | Basic I/O unit input response time | Variables | _CJB_InRespTm |
| A260 | I/O Allocation Status Flag | ||
| A261 | I/O table creation error details | ||
| A262 - 263 | Maximum cycle time | Variables | _<task name>_MaxExecTime |
| A264 - 265 | Current cycle time (0.1 ms) | Variables | _<task name>_LastExecTime |
| A266 - 267 | Current cycle time (0.01 ms) | ||
| A270 - 275 | High-speed counter (0,1) status area | ||
| A276 - 281 | Pulse output (0,1) status area | ||
| A283 | PWM output (0,1) status area | ||
| A293 | Version error details | ||
| A294 | Task number when program stopped | ||
| A295 | Program error related flags | Variables | P_PRGER |
| A298 - 299 | Program address where program stopped | ||
| A300 | Error log pointer | ||
| A301 | EM current bank | ||
| A302 | CPU Bus Unit Initializing Flag | Variables | _CJB_CBU00InitSta ... _CJB_CBU15InitSta |
| A315 | Error flag | ||
| A316 - 321 | High-speed counter (2,3) status area | ||
| A322 - 327 | Pulse output (2,3) status area | ||
| A329 | PWM output (2,3) status area | ||
| A330 - 335 | Special I/O Unit Initializing Flag | Variables | _CJB_SIO00InitSta ... _CJB_SIO95InitSta |
| A336 | Number of units verified at startup | ||
| A339 - 340 | Max. differentiation flag number | ||
| A343.00 - 343.02 | Memory card type | ||
| A343.06 | EM file memory format error flag | ||
| A343.07 | Memory card format error flag | Variables | _Card1Err |
| A343.08 | File write error | FB | Error output of instructions such as FileWrite |
| A343.09 | File write disabled flag | Variables | _Card1Protect |
| A343.10 | File read error flag | FB | Error output of instructions such as FileRead |
| A343.11 | File missing flag | ||
| A343.13 | File memory operation flag | Variables | _Card1Access |
| A343.14 | File access flag | ||
| A343.15 | Memory card recognition complete flag | Variables | _Card1Ready |
| A344 | Trace memory related | ||
| A345 | Information in source/comment memory | ||
| A346 - 347 | Remaining data in data file transfer | ||
| A351 - 354 | Clock data | Variable FUN | _CurrentTime GetTime |
| A360 - 391 | Executed FAL number | Variable FUN | _AlarmFlag GetAlarm |
| A392 - 393 | Serial port related | ||
| A395.06 - 395.07 | File deletion notification flag | Variables | _Card1PowerFail |
| A395.10 | ER/AER flag during background processing | ||
| A395.11 | Memory corruption notification flag | ||
| A395.12 | DIP switch 6 status flag | ||
| A400 | Error code | ||
| A401.03 | Card transfer error flag | ||
| A401.05 | Version error flag | ||
| A401.06 | FALS error flag | ||
| A401.08 | Cycle time too long flag | Variables | _<task name>_Exceeded |
| A401.09 | Program error flag | ||
| A401.10 | I/O setting error flag | ||
| A401.11 | Too many I/O points flag | ||
| A401.13 | Duplicate unit number error flag / duplicate expansion number error flag | ||
| A401.14 | I/O bus error | ||
| A401.15 | Memory error flag | ||
| A402.00 | Other non-fatal errors | ||
| A402.02 | Special I/O unit setting error flag | ||
| A402.03 | CPU bus unit setting error flag | ||
| A402.04 | Battery error flag | Variables | _SelfTest_LowBattery |
| A402.06 | Special I/O unit error flag | ||
| A402.07 | CPU bus unit error flag | ||
| A402.10 | PLC Setup error flag | ||
| A402.12 | Basic I/O unit error flag | ||
| A402.13 | Duplicate refresh error flag | ||
| A402.15 | FAL error flag | Variables | _AlarmFlag |
| A403 | Memory error location | ||
| A404 | I/O bus error slot number, rack number | ||
| A405.08 | Interrupt input unit position error flag | ||
| A407 | Too many I/O points details | ||
| A408 | Basic I/O unit error slot number, rack number | ||
| A409 | Duplicate expansion rack number flag | ||
| A410 | CPU bus unit duplicate unit number flag | ||
| A411 - 416 | Special I/O unit duplicate unit number flag | ||
| A417 | CPU bus unit error unit number flag | ||
| A418 - 423 | Special I/O unit error unit number flag | ||
| A426 | Unit number with duplicate refresh error | ||
| A427 | CPU bus unit setting error unit number flag | ||
| A428 - 433 | Special I/O unit setting error unit number flag | ||
| A438 | Pulse output 2 stop error code | ||
| A439 | Pulse output 3 stop error code | ||
| A440 | Max. interrupt task processing time | ||
| A441 | Interrupt task number with max. processing time | ||
| A444 | Pulse output 0 stop error code | ||
| A455 | Pulse output 1 stop error code | ||
| A450 - 485 | Memory area specification | ||
| A10001 - 10003 | Manufacturing lot number | ||
| A10100 | Synchronous control executing flag | ||
| A10101 | Synchronous data link send error | ||
| A10102 | Synchronous control cycle setting time | ||
| A10120 - 10121 | Pulse output 0 output frequency | ||
| A10122 -10123 | Pulse output 1 output frequency | ||
| A10124 - 10125 | Pulse output 2 output frequency | ||
| A10126 - 10127 | Pulse output 3 output frequency | ||
| A10128 - 10129 | High-speed counter 0 range comparison conditions 1 to 32 in-range flags | ||
| A10130 - 10131 | High-speed counter 1 range comparison conditions 1 to 32 in-range flags | ||
| A10132 - 10133 | High-speed counter 2 range comparison conditions 1 to 32 in-range flags | ||
| A10134 - 10135 | High-speed counter 3 range comparison conditions 1 to 32 in-range flags | ||
| A10136 - 10137 | High-speed counter 0 ring counter max. value | ||
| A10138 - 10139 | High-speed counter 1 ring counter max. value | ||
| A10140 - 10141 | High-speed counter 2 ring counter max. value | ||
| A10142 - 10143 | High-speed counter 3 ring counter max. value | ||
| A10144 - 10145 | Interrupt input 0 latch present value | ||
| A10146 - 10147 | Interrupt input 1 latch present value | ||
| A10148 - 10149 | Interrupt input 2 latch present value | ||
| A10150 - 10151 | Interrupt input 3 latch present value | ||
| A10152 - 10153 | Interrupt input 4 latch present value | ||
| A10154 - 10155 | Interrupt input 5 latch present value | ||
| A10156 - 10157 | Interrupt input 6 latch present value | ||
| A10158 - 10159 | Interrupt input 7 latch present value | ||
| CJ | NJ | ||
|---|---|---|---|
| Address | Name | type | Instruction/variable name |
| A500.12 | IOM Hold Bit | ||
| A500.13 | Forced Status Hold Bit | ||
| A500.14 | Error log pointer reset bit | ||
| A500.15 | Output OFF Bit | ||
| A501 - 501.15 | CPU bus unit restart bits | Variables | _CJB_CBU00Restart |
| A502 - 507.15 | Special I/O unit restart bits | Variables | _CJB_SIO00Restart |
| A508.09 | Differentiate monitor completed flag | ||
| A508.11 | Trace trigger monitor flag | Variables | _PLC_TraceSta[0..3].IsTrigger |
| A508.12 | Trace completed flag | Variables | _PLC_TraceSta[0..3].IsComplete |
| A508.13 | Trace busy flag | ||
| A508.14 | Trace trigger flag | Variables | _PLC_TraceSta[0..3].IsTrigger |
| A508.15 | Data trace start bit | ||
| A510 - 511 | Power ON time | ||
| A512 - 513 | Power interruption time | ||
| A514 | Number of power interruptions | _PowerOnCount | |
| A515 - 517 | Operation start time | ||
| A518 -520 | Operation stop time | ||
| A523 | Power-on time | _PowerOnHour | |
| A526.00 | Serial port restart bit | ||
| A527.00 - 527.07 | Password for accessing the online editing disabled flag | ||
| A527.09 | Online editing disabled flag | ||
| A528.00 - 528.07 | Serial port error flag | ||
| A529 | FAL/FALS number for system error simulation | ||
| A530 | Power interruption disabled area setting | ||
| A531.00 - 531.03 | High-speed counter 0-3 reset bits | ||
| A531.08 - 531.11 | High-speed counter 0-3 gate flags | ||
| A532 - 535 | Interrupt counter 0-3 set values | ||
| A536 - 539 | Interrupt counter 0-3 present values | ||
| A540 - 543 | Pulse output 0-3 signals | ||
| A544 - 547 | Interrupt counter 4-7 set values | ||
| A548 - 551 | Interrupt counter 4-7 present values | ||
| A580 | Number of resends for communications instructions in FBs | ||
| A581 | Response monitoring time for communications instructions in FBs | ||
| A582 | Response monitoring time for DeviceNet communications instructions in FBs | ||
| A595 -596 | IR00 output during background processing | ||
| A597 | DR00 output during background processing | ||
| A598.00 | Teaching flag for FPD instruction | ||
| A598.01 | Equals flag output during background processing | ||
| A600 | Argument area for MCRO instruction | ||
| A600 - 603 | Argument area for MCRO instruction | ||
| A604 - 607 | Return value area for MCRO instruction | ||
| A619.02 | Serial port settings changing flag | ||
| A620 - 635 | Serial communications unit settings changing flag | Variables | _CJB_SCU00P1ChgSta ... _CJB_SCU15P2ChgSta |
| A650 | Program replacement flags | ||
| A651 | Program replacement password | ||
| A654 - 657 | Program replacement source file name | ||
| A720 - 749 | Power ON time history data | ||
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

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

