Showcase walkthrough
The library's Showcase - all features.json shows almost every feature in 7 cases. It is written for "write on side A, read back on side B through a gateway": channel A connects to 127.0.0.100:502, channel B to 127.0.0.101:502, and the gateway maps 0x0000 on A to 0x9000 on B.
Running it on this PC
A listener on 127.0.0.1 only accepts connections made to 127.0.0.1, so create two more listeners in the Slave window:
- Add a device with Device → Add Device, then use Device → Edit Device... to set its Listen IP to
127.0.0.100and TCP Port to502. - In this device's Slave ID row on the right, click + to add ID 1 (a new device does not start with Slave ID 1).
- Click Listen.
- Create
127.0.0.101:502the same way.
The two Slaves do not forward data to each other, so most reads on side B FAIL. That is expected; the walkthrough below points out which steps need a real gateway.

Run on this PC, the result is PASS 2, FAIL 5.
Case by case
| Case | Features shown | Result on this PC |
|---|---|---|
| 01 Main · gateway A to B | Wait Until for the device to come online (compare: false, 3000 ms); FC16 and FC06 writes on A, read back on B; Wait Until after the writes for the value to appear on B; If checks the gateway status on B against a range, giving Verdict PASS if it holds, otherwise Call fail_path then Verdict FAIL | FAIL: B cannot read the values A wrote |
| 02 Compare · == != range format | Every kind of compare: == with tolerance, !=, range, float_abcd, a signed range, long_abcd; stores B's firmware word in fw and checks the version with an If expression | FAIL: the Slave does not hold these values |
| 03 Write · FC6 / FC16 / FC15 | FC16 multiple registers, FC06, values as float_cdab, FC15 writing 8 coils at once; read back on B with FC03 and FC02 | FAIL: needs gateway forwarding |
| 04 Loop · Set / While / Repeat | A While with an lhs/op/rhs condition writes 8 addresses; a Repeat reads them back on B into got; an If checks the last value | FAIL: needs gateway forwarding |
| 05 Call · subroutine with parameters | The check_window subroutine (parameters addr, lo, hi, the last two with defaults) checks whether three addresses are in range, returning 1 or 0, summed into ok | FAIL: the values on B are 0, out of range |
| 06 Operator · Ask | Ask text scans a serial number, Ask pass_fail confirms an LED, Ask number takes a measured voltage, then an If checks the voltage is within 23.5–24.5 V | PASS (run in the GUI and answered) |
| 07 Flow · End Round / End Case | Warm-up check: when 0x0311 == 1, End Round with discard, so the round does not count; when the gateway status changes, End Case skips the rest of the case | PASS |

The Actual column of case 06 shows the three answers, sn = SN-2611-0042, operator: PASS and v24 = 24.1, followed by the If's check v24=24.1: true.
Turning it into your own test
- Change
channel_aandchannel_bto the IP, port and Slave ID of the real device and gateway. - Change the addresses on side B (from
0x9000) to match the gateway's mapping table. - Delete cases you do not need; disable steps you do not need by selecting them and pressing Ctrl+/.
Download the sample script
Sample script
This is the same script as in the sample library, and the one the product site offers for download. Before running it, create the two listeners described in "Running it on this PC" above.
