Introduction to Omron NJ/NX PLC Programming: Architecture and First Project
A comprehensive guide to programming Omron NJ/NX controllers with Sysmac Studio: hardware architecture, variable tagging, and first project setup.
Omron NJ and NX series machine automation controllers (MAC) replace traditional fixed-memory PLC architectures with fully symbolic, tag-based IEC 61131-3 programming and native EtherCAT master synchronization. Engineered within the unified Sysmac Studio environment, they combine logic control, multi-axis motion, safety, and vision inspection inside a single deterministic execution cycle.
Hardware and Software Specifications
| Parameter | Specification | Notes |
|---|---|---|
| Controller Families | Omron NJ101, NJ301, NJ501, NX102, NX1P2 | Dual-core Intel or ARM CPU |
| Engineering IDE | Sysmac Studio v1.40 or later | 64-bit Windows environment |
| Fieldbus Protocols | EtherCAT (100 Mbps), EtherNet/IP (CIP) | Dual independent Ethernet ports |
| IEC 61131-3 Languages | Ladder Diagram (LD), Structured Text (ST) | Strictly type-checked |
| Cycle Period | 500 µs – 4 ms (depending on CPU model) | Deterministic motion sync |
Core System Architecture
1. From Memory Addresses to Symbolic Variables
In legacy Omron platforms (CJ1, CJ2, CS1), memory was assigned to physical areas such as CIO 0.00, D100, or W0.00. The NJ/NX platform eliminates raw memory maps in favor of symbolic variables:
- Global Variables: Accessible across all tasks, connected HMIs, and EtherCAT network devices.
- Local Variables: Scoped strictly within their Program Organization Unit (POU) to prevent side-effects.
2. IEC 61131-3 Data Types
- Primitive types:
BOOL,INT,DINT,LINT,REAL,LREAL - Time notation:
TIME(T#200ms,T#5s) - Composite types: User-Defined Types (DUT / Structures) and multidimensional Arrays
Step-by-Step Configuration (How-To)
Step 1: Initialize the Project
- Open Sysmac Studio and select New Project.
- Under Category, select Controller. Under Device, pick your CPU model (e.g.,
NX102-9020) and target firmware version.
Step 2: Configure the EtherCAT Network
- Navigate to Configurations and Setup > EtherCAT in the left project tree.
- Right-click the master controller icon and select Compare and Merge with Actual Network Configuration to automatically discover connected servo drives and slice I/O.
Code Example: Axis Readiness and Error Reset in Structured Text
The following Structured Text snippet verifies that an EtherCAT servo axis is ready and executes a reset if an error state is active:
// Check if axis is operational and free of errors
IF (Axis01.Status.Ready AND NOT Axis01.Status.Error) THEN
bAxisOperable := TRUE;
ELSE
bAxisOperable := FALSE;
// Execute reset on operator trigger
IF (Axis01.Status.Error AND bResetTrigger) THEN
MC_Reset(Axis := Axis01, Execute := TRUE);
END_IF;
END_IF;
Common Diagnostic Fault Codes
| Error Code | Definition | Remediation |
|---|---|---|
0x0020 | Network Configuration Verification Failed | Compare hardware vendor ID and revision in Sysmac Studio against physical nameplates. |
0x0031 | EtherCAT Communication Timeout | Inspect cable terminations, shielding grounding, or increase the communications cycle time. |
Reference Manuals
- Omron W500: NJ/NX-series CPU Unit Software User’s Manual
- Omron W501: NJ/NX-series Instructions Reference Manual
- Omron W507: NJ/NX-series Motion Control Instructions Reference Manual
Frequently Asked Questions
What is the primary difference between Omron NJ and NX series PLCs?
The NJ series is optimized for high-axis-count complex motion control and centralized machine automation (up to 64 axes), whereas the NX series features a compact modular slice I/O architecture with dual built-in network ports, ideal for distributed cells.
What is tag-based programming in Sysmac Studio?
In the NJ/NX platform, traditional memory addressing (CIO, D memory, Work areas) is replaced entirely by strongly-typed IEC 61131-3 symbolic variables and data structures.
Which programming languages are supported on NJ/NX controllers?
Sysmac Studio supports IEC 61131-3 compliant Ladder Diagram (LD) and Structured Text (ST) for logical and motion control.

