IMDHMIControls LibraryShop main store

Troubleshooting

Why OPC UA writes fail to an Omron NJ PLC

SCADA and data logging Published 6 min read

Short answer

A working OPC UA read proves only the read path. Test the write from a diagnostic client. If the direct write fails, route writes through FINS: declare a global variable as ARRAY[0..39] OF WORD with AT %E0_9000, enter the address as E0_9000 with no percent sign, and write whole 16-bit words, because a FINS write replaces every bit in the word.

On this page
  1. Separate the read test from the write test
  2. Map the variable with its AT property
  3. Writing the first word of TAG_NAME at %E0_9000
  4. Enter the address without the percent sign
  5. Set bits with whole words, not Boolean arrays
  6. Give each direction its own owned block
  7. The decisions
  8. Questions asked

A healthy OPC UA read from an Omron NJ controller tells you the browse, security and read services work. It tells you nothing about the write service, or about whether the variable you picked is exposed for writing at all. On these controllers the write fails for a structural reason: NJ and NX variables carry no C-series-style FINS addresses until you give them one with an AT property, and the usual client mistakes — pushing Boolean arrays, or appending datatype hints to the NodeId — never address real memory. The fix that holds up is to test the write from a diagnostic client, then move writes to a FINS path through a word array mapped at a fixed address, entered without the percent sign the PLC declaration uses.

Separate the read test from the write test #

Before changing any client configuration, find out where the write path is actually closed. A diagnostic OPC UA client such as UA Expert can exercise the write directly, and the result decides the branch:

  1. Browse the live server and copy the target variable's NodeId — for example ns=4;s=NodeRed_Start. The namespace index comes from the server's current table, so re-copy it after any project change; a node that displays a similar name is not the same node.
  2. Write a correctly typed value. A Boolean variable receives a Boolean true or false, not the text "true"; appending ,datatype:Boolean to the identifier does not convert the payload, because the NodeId string ends at the identifier itself.
  3. Read the node back immediately and record the returned status code, not just the connection state. A connected session with an unchanged value is not a successful write.
  4. Branch on the result. If the direct write succeeds, the variable is writable and the fault is in your client's item, datatype or payload construction — fix that client until it reproduces the successful write. If the direct write fails, the write path is closed at the server or the variable, and the FINS route in the next sections is the one to commission.

That silent pattern — transport healthy, value unmoved — is the same one behind why a SCADA write to a PLC real address fails silently, and the immediate read-back in step 3 is what catches it.

Map the variable with its AT property #

NJ and NX variables do not become FINS-addressable merely because a symbolic tag exists. Create a global variable in the PLC project and fill its AT property with an absolute address, so the words land in memory a FINS node can reach:

Location Entry Purpose
PLC global variable TAG_NAME Symbol your PLC logic uses
PLC datatype ARRAY[0..39] OF WORD Reserves 40 consecutive 16-bit words
PLC AT property %E0_9000 Maps the array to absolute memory
FINS node address E0_9000 Addresses the first word, no percent sign

Confirm the deployed project contains the AT mapping before testing anything on the wire: an offline declaration changes no controller memory. Monitor both the symbolic array and its mapped words during the first write, so you can see which side of the mapping the fault sits on.

Writing the first word of TAG_NAME at %E0_9000 #

The inputs, all from the working case on these controllers: the PLC holds a global variable TAG_NAME declared as ARRAY[0..39] OF WORD with its AT property set to %E0_9000; the FINS node points at the base address E0_9000; the request length is 40 words. The rule: an AT mapping places the array in absolute memory in one-word steps, and FINS moves that memory as 16-bit words. The arithmetic: word n of the array sits at the base address plus n, so the first word sits at E0_9000 + 0 = E0_9000 and the last at E0_9000 + 39 = E0_9039; a request of that length spans E0_9000 through E0_9039 and covers indexes 0 through 39 exactly. Write the word value 1 — binary 0000 0000 0000 0001 — to the first word.

The result: TAG_NAME[0] reads 1 in the online monitor, and a FINS read of that address returns 1.

The decision: the mapping works, so expand the tested word into the rest of the block and the remaining indexes. If the value stays 0, the deployed project does not carry the AT mapping — redeploy it before touching any network setting.

Enter the address without the percent sign #

Two configuration contexts spell the same location differently. Sysmac Studio's AT property takes %E0_9000, where the percent sign marks an absolute mapping in the PLC declaration. The FINS node expects a PLC address with no leading percent sign, so enter E0_9000 there. This is the detail that broke the working case until it was caught: keep the percent in the declaration and out of the node.

Keep the requested length equal to the number of mapped words as well. FINS has no view of your datatype declaration — it moves words — so an array of Bool is not a substitute for an array of WORD in any request.

Set bits with whole words, not Boolean arrays #

A FINS write to one word replaces every bit in that word. Sending decimal 1 produces 0000 0000 0000 0001; sending decimal 2 produces 0000 0000 0000 0010, which clears bit 0. Plan the interface around that before commissioning:

  • One word per Boolean command — more memory, but no shared-word collisions.
  • Status numbers instead of raw bits — 1 = RUN, 2 = STOP, 3 = MANUAL — decoded in the PLC.
  • Read-modify-write: read the word, then set or clear the bit in PLC logic only, never in the client.

Whether to expose Booleans individually or packed into words is the same trade-off WinCC integrators face, and the page on choosing WinCC Boolean arrays or packed words works through it.

One safety rule belongs here: a remotely written command word is a command, not permission. The PLC logic — not the client — decides whether the machine moves, which is the same principle behind safe Modbus writes to PLC output registers from SCADA.

Give each direction its own owned block #

Split the exchange into two contiguous arrays of 100 words: DATA_TO_NODE_RED starting at E0_1000, written by the PLC and read by Node-RED, and DATA_FROM_NODE_RED starting at E0_2000, written by Node-RED and read by the PLC. Contiguous blocks transfer in one request, so the reader sees one scan's worth of consistent values, and every word has exactly one writer. Pulling arrays in single block requests keeps that consistency on the read side too, as described in read PLC tag arrays in one block request.

Pack floats, strings and bytes into the block only after documenting word order and byte order at both endpoints, and prove the layout with recognizable test patterns before live values flow.

The decisions #

  • Direct OPC UA write works: the variable is writable, so fix the client's item, datatype and payload until it reproduces the successful write, and keep OPC UA.
  • Direct OPC UA write fails: stop pushing writes through OPC UA; map a word array with an AT property, write whole words over FINS, and enter the address without the percent sign.
  • Boolean-array write fails anywhere: replace it with an array of WORD, and set individual bits using one of the three patterns above.

Questions asked

I added a variable by online editing and the OPC UA client cannot see it. Why?

Per Omron's NJ/NX OPC UA manual, the running OPC UA server is not reconfigured when a network-published variable is added by online editing. Redeploy or restart the OPC UA server so it rebuilds its address space, then browse again and copy the namespace index from the new result, because it can change after the restart.

How many words does a floating-point value take in the block?

A 32-bit REAL occupies two consecutive 16-bit words, so define and document at both endpoints which word carries the high half and which carries the low. Convert on one side only, in the PLC or in the client, and prove the layout with a recognizable test pattern such as 1.0 before live process data flows.

Does the Ignition Omron NJ driver need extra components?

Yes. The driver requires the OPC UA module to be installed and enabled in Ignition; if the module is missing or disabled, the device faults rather than connecting. Bring the connection up through OPC UA for reads first, and keep the FINS word route described here for the writes.

Keep reading

  • How-to

    Getting NX1P2 tags into Ignition without OPC UA

    On an NX1P2 without OPC UA and without FINS/TCP, connect Ignition with the Omron NJ (EtherNet/IP) driver, set Network Publish on every Sysmac global variable you need, and import the variable list as tags, because neither Omron driver browses. A Bound FINS/UDP device only means the gateway bound its own local UDP port; a read that returns Good quality is the proof.

    SCADA and data logging

  • How-to

    Connecting a CODESYS HMI on Windows to an S7-1500 PLC

    Yes, it works. Use OPC UA with the S7-1500 as server and the CODESYS HMI as client when the PC only supervises; use a CODESYS Control Win runtime with target visualization over a PROFINET controller/device link when the PC must also run logic. The PROFINET path adds one single-device license on top of the runtime; the OPC UA path adds none.

    SCADA and data logging

  • Troubleshooting

    Getting Citect SCADA talking to a Mitsubishi iQ-R PLC

    Fix the transport before anything else: the Citect MELSECQ port on TCP_BOARD must match the iQ-R's SLMP connection module exactly — protocol, port number and IP address. If tags above device 65,535 fail, that is the MELSEC Q protocol's 16-bit address ceiling, and no setting fixes it; move to Mitsubishi's OPC MX UA server with a Citect OPC client driver.

    SCADA and data logging