IMDHMIControls LibraryShop main store

How-to

Serve generic Modbus devices to SCADA through OFS with the PL7 driver

SCADA and data logging Published 7 min read

Short answer

OFS does serve generic Modbus devices: select the PL7 driver in the device alias, not Unity, because Unity issues Schneider-extended function codes a standard slave rejects while PL7 issues the public read/write set. Import the tag definitions as a .SCY file, make OFS the only Modbus master on the link, and point Citect and every OPC DA or UA client at that one server.

On this page
  1. Why the driver choice decides whether the slave answers
  2. Make OFS the only Modbus master on the link
  3. Build the alias and import the tag definitions
  4. Check the values that look right but are wrong
  5. Verify the path before it goes live
  6. Faults that come back
  7. The decision
  8. Questions asked

OFS does serve generic Modbus devices. The fix is the driver named in the OFS device alias: select PL7, not Unity. Unity issues Schneider-extended Modbus function codes that only Schneider PLCs answer, while PL7 issues the standard read/write set a generic slave accepts. Import your tag definitions as a .SCY file, let that one OFS instance be the only Modbus master on the link, and point Citect SCADA and every OPC DA and OPC UA client at it. What follows is the decision rule for the driver, the alias and import procedure, the checks that catch plausible-but-wrong values, and the arithmetic that shows why one server must own the polling.

Why the driver choice decides whether the slave answers #

OFS wraps Schneider communication drivers, and the driver in the device alias defines what goes on the wire. The Unity driver speaks Schneider-extended function codes; a slave built to the public Modbus specification answers only the public read/write set and returns exception 01, illegal function, or silence for anything outside it. OFS then reports those items as bad quality or timed out, so a healthy device looks dead. Schneider documents OFS as a server for third-party devices that support Modbus and Modbus TCP; that support arrives through this driver choice, not through a different edition of OFS.

One test separates a protocol fault from a link fault: if a generic Modbus master tool reads the slave on the same link but the OFS items stay bad, the driver is wrong. If nothing answers through any tool, fix the physical layer first — serial settings, IP reachability, unit ID, port 502 filtering.

PL7 aliases have quirks further in: if reads return but timer variables misbehave, the fix is in fixing OFS reads and PL7 timer access.

Decision: a standards-only slave takes the PL7 driver. A Schneider controller programmed with Unity takes the Unity driver and gives you symbolic browsing in return.

Every separate polling path is a second master. Two masters double the request rate each slave sees, many Modbus TCP slaves cap concurrent connections at a figure stated in their own manual, and a serial line is shared by definition. What a slave does with several clients on port 502 is device-specific; one documented example is whether a CP 343-1 serves multiple Modbus clients on port 502.

Worked example: poll load on one RTU line #

Assume six generic slaves on one Modbus RTU line at 9600 bit/s, 8 data bits, no parity, one stop bit: 10 bits per byte on the wire. Each poll reads 20 holding registers with function 03.

  • Request: 1 slave address + 1 function + 2 start address + 2 quantity + 2 CRC = 8 bytes.
  • Response: 1 address + 1 function + 1 byte count + (2 x 20) data + 2 CRC = 45 bytes.
  • Per transaction: (8 + 45) x 10 bits = 530 bits, and 530 / 9600 bit/s = 0.055 s, about 55 ms.
  • Six slaves polled once per second: 6 x 55 ms = 330 ms of line time each second, and 330 / 1000 = 33 % utilization.

Add a second master with the same poll list — a historian reading the line directly, say — and utilization doubles to about 66 %, and both masters' timeouts start to collide whenever a slave answers slowly. One OFS instance polling all six holds the line at 33 % and hands every client the same data.

Decision: OFS owns the polling; Citect and every other consumer are clients of that one server.

Build the alias and import the tag definitions #

OFS runs on a PC that stays powered with the panel; for a server box that lives in the cabinet beside the controller, an industrial mini PC fits the job. Then:

  1. Create a device alias for the slave in the OFS configuration tool and select the PL7 driver, not Unity.
  2. Enter the link parameters the device manual gives: an IP address for Modbus TCP, or port, baud, parity and stop bits for serial, plus the slave's unit ID.
  3. Hand-create a few items in the tool — one coil, one input register, one holding register — then export the configuration and use the resulting .SCY file as your template. Never type a .SCY file from guessed syntax.
  4. Extend the template to the full tag list and map every item to the address in the device's Modbus map. Take the address base, the 16- or 32-bit data type and the word order from the device documentation, not from OFS defaults.
  5. Import the finished .SCY file into the alias and save the configuration.
  6. Start OFS and read the items in its test client before any SCADA work.
  7. In Citect SCADA, add an OPC client I/O device that targets this OFS server and map variable tags to the OFS item names.
  8. Point each OPC UA client at the same server, address the same item names, and settle security policy and certificate trust on both sides.

One safety note: keep monitoring items read-only. Any item mapped onto a holding register can be written from SCADA, and whether a Modbus write can change PLC outputs is the question to settle before you expose one.

Check the values that look right but are wrong #

Symptom Cause Fix
Every value belongs to the neighbouring register Address base differs between the device manual and the alias Re-map item addresses to the base the manual states
32-bit value has plausible bytes, wrong magnitude Word order differs from the slave's Match the slave's word order in the item definition
A whole block goes bad on one read The block spans mapped and unmapped addresses, so the slave answers exception 02 Split the block at the register-map gap
Displayed value is off by a constant factor Scaling applied in both the .SCY mapping and the Citect tag Scale in one layer only

Exception 02 is worth its own note: what a Modbus exception 02 means when a read crosses a register-map gap. Scaling is a decision, not a preference: carry the engineering-unit conversion in the .SCY mapping or in the Citect variable tag, never both, and write on the drawing which one has it.

Verify the path before it goes live #

Read a few items in the OFS test client and compare against the device's own display or a standalone Modbus master tool. Force a known change on the device and confirm it reaches the test client within one poll interval. Confirm Citect shows the same value with good quality, then connect one OPC DA client and one OPC UA client and require agreement across all of them — a DA success proves nothing about the UA path, where security policy and certificate trust fail quietly, and trusting the Citect OPC UA client certificate on the PLC side is its own procedure. Pull the plug last: quality must go bad in every client, and on reconnect it must recover without restarting OFS.

No hardware on the bench yet? Build the whole path on one PC against a simulated slave first — how to simulate a Modbus TCP SCADA link on one PC.

Faults that come back #

  • Unity driver still selected from an earlier test: items stay bad against a third-party device. Re-select PL7 in the alias.
  • Hand-typed .SCY with syntax errors: the import fails or items disappear. Regenerate the template from the configuration tool.
  • Address base mismatch: every value belongs to the neighbouring register.
  • A second master on the same slave: intermittent timeouts. Remove the second polling path.
  • UA security unsettled: DA reads work, UA reads fail. Complete the certificate exchange on both sides.
  • Scaling applied twice: the displayed value is off by a constant factor. Keep one scaling layer.

The decision #

Generic Modbus device — a slave that answers only the public function set: OFS device alias with the PL7 driver, tags imported from a .SCY file built on an exported template, OFS as the only Modbus master, Citect SCADA and all DA and UA clients on that one server. Schneider controller programmed with Unity: Unity driver with symbolic browsing. Anything else that wants the data becomes another client of the same OFS instance, never another master on the wire.

Questions asked

Can I keep the Citect native Modbus driver and use OFS only for the OPC UA clients?

You can, but the slave then serves two independent masters: Citect's own driver and OFS. Request load doubles, timeouts appear on devices with limited concurrent connections or a shared serial line, and every register change gets edited twice, once in the Citect tag database and once in the .SCY file. Point Citect at OFS as an OPC client so one server owns the polling and one file owns the mapping.

Which function codes does a generic slave need to answer?

The public set from the MODBUS application protocol specification: 01 read coils, 02 read discrete inputs, 03 read holding registers, 04 read input registers, 05 write single coil, 06 write single register, 15 write multiple coils and 16 write multiple registers. A device implementing that set answers a PL7-driver alias. The Schneider-extended codes the Unity driver issues sit outside this list, which is why a standards-only slave ignores or rejects them.

Can one OFS instance serve OPC DA and OPC UA clients at the same time?

Yes. Both endpoints expose the same item namespace, so a tag imported once in the .SCY file is readable by a DA client and a UA client under the same name, and one value change appears in both within the same poll cycle. That is what makes the single-server design work: add a consumer by pointing it at the existing OFS instance, not by adding another polling path to the slave.

What exactly does OFS show when the slave rejects an extended function?

The item goes bad. A standards-only slave answers a function it does not implement with exception 01, illegal function, or stays silent, and OFS reports bad quality or a timeout on that item. The failure follows the request type, not the point: reads that use the standard set keep working while the extended requests fail, which points at the driver rather than the wire.

When is the Unity driver the right choice?

When the device at the other end is a Schneider controller programmed with Unity. That PLC implements the extended functions, and the Unity driver lets OFS browse the project's variables directly instead of raw register addresses. The PL7 driver is the choice for devices that only answer the public function set: third-party slaves, meters and older equipment programmed outside Unity.

Keep reading

  • 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

  • Troubleshooting

    How a SCADA client reads a small PLC over EtherNet/IP

    An Ethernet link to a MicroLogix is not a working SCADA read: the controller serves data through PCCC commands carried over EtherNet/IP, and a client without that application service gets every read rejected. Check the driver's documented controller list for PCCC over EtherNet/IP or use the controller's documented Modbus TCP server, then prove one read-only value end to end.

    Industrial networks

  • Troubleshooting

    Reading M580 I/O in Plant SCADA without mapped memory addresses

    Bad I/O on %Q1.1.20 means Plant SCADA is reading a topological M580 channel address that no driver can resolve as a register, and no Modbus table exists to look up. Serve the points through the OFS gateway using PLC tag names, with an XVM export now and the Data Dictionary permanently, and add the missing variables by online change so the 24/7 line never stops.

    SCADA and data logging