Overview
Many Wonderware InTouch deployments grow to span more than one controller: a Modicon M340 or Quantum handling legacy I/O, an Allen-Bradley CompactLogix running newer EtherNet/IP cells, and a single InTouch HMI that the operator expects to behave as one consolidated front end. The most common operator action that exposes the multi-PLC problem is a global reset: the operator presses one pushbutton, and InTouch must pulse a reset coil in PLC A and a reset bit in PLC B on the same edge.
The technique is straightforward once you understand the three-layer model InTouch uses:
- An Access Name defines the physical channel to a controller (driver, node, topic).
- An I/O Discrete tag is the live mirror of a single bit in that controller.
- A Memory Discrete tag lives entirely inside the HMI and is the right place to land a pushbutton before the script fans it out.
The script is the bridge. When the operator toggles the Memory Discrete, a condition script fires and writes 1 (and then 0) to the I/O Discretes for both PLCs. The PLC ladder accepts the pulse and runs its own reset sequence. This article walks through tag database construction, script logic, PLC-side acknowledgment, and verification on both Modicon and CompactLogix.
Prerequisites
| Item | Requirement |
|---|---|
| InTouch version | InTouch 7.11 or later (WindowMaker / WindowViewer 10.6+ recommended) |
| Modicon PLC | M340, M580, Premium, or Quantum with Modbus TCP/IP, Modbus Plus, or Xway available. CPU firmware recent enough to expose the reset coil as a writable %M or %MW bit. |
| Allen-Bradley PLC | CompactLogix L1x/L2x/L3x or ControlLogix, RSLogix 5000 / Studio 5000 Logix Designer v20 or later, tag-based memory (not legacy I/O slot addressing). |
| InTouch I/O Server | Either (a) SuiteLink via SLServer, (b) DASSIDirect via MBE for Modicon and AB_ETHIP for CompactLogix, or (c) OPC UA via KEPServerEX / AVEVA OI Gateway. Mixing drivers on the same HMI is normal. |
| Network | Ethernet connectivity from the HMI node to PLC A and PLC B. Latency budget < 200 ms round-trip or button press will feel sluggish. |
| Security | Operator account with access level that allows the reset Memory Discrete to be written (InTouch access level 1 or higher in most projects). |
Communication Architecture
Before writing a single tag, you must build two independent Access Names — one for each PLC. InTouch does not multiplex multiple controllers behind a single Access Name; each physical protocol/destination pair needs its own entry under Special → Access Name in WindowMaker.
Access Name 1: Modicon PLC
| Field | Recommended Value |
|---|---|
| Access Name | AN_MODICON_PLC |
| Application Driver |
MBTCP (Modbus Ethernet for TCP/IP) or MODPLUS for Modbus Plus via MBPlus driver, or OFCEthernet for Xway |
| Node / Server Name | IP address of the Modicon CPU, e.g. 192.168.10.21 for M340 BMX NOC 0401 or M580 embedded Ethernet |
| Topic / Device | Leave blank for direct Modbus TCP, or specify the Xway address (e.g. 1.0.0) for Premium/Quantum with Xway |
| Polling / Update Interval | 250 ms (50 ms minimum to avoid CPU saturation on legacy Premium) |
| Read/Write | Read/Write must be enabled or the reset coil will be write-protected |
Access Name 2: Allen-Bradley CompactLogix
| Field | Recommended Value |
|---|---|
| Access Name | AN_CLX_PLC |
| Application Driver |
AB_ETHIP (EtherNet/IP, preferred) or ABCIP (older ControlLogix driver, still works on CompactLogix v20+) |
| Node / Server Name | IP address of the CompactLogix Ethernet port, e.g. 192.168.10.42 for a 1769-L30ER |
| Topic | Backplane slot of the CPU, e.g. 0 for integrated Ethernet on L2x/L3x, or 1 when an EN2T/EN3T module is in slot 1 |
| Read Mode | Use Symbolic addressing so the tag name maps to a Logix tag, not to a slot/bit offset |
| Update Interval | 100 ms typical; CompactLogix can sustain 50 ms easily on EtherNet/IP |
AB_ETHIP driver from the Allen-Bradley ControlLogix Ethernet/IP Driver (formerly RSLinx Gateway) is the only DASSIDirect driver that talks to Logix tag-based memory symbolically. The older ABKF2 / ABPCI / ABCIP drivers work but force you into 16-bit word syntax that no human wants to maintain. If you must use ABCIP, the tag for a Boolean named HMI_Reset maps to HMI_Reset.0 or to the underlying word/bit, e.g. N7:0/0 in PLC-5 emulated addressing.Tag Database Configuration
Open the Tagname Dictionary dialog (Special → Tagname Dictionary) and create the following four tags. Names are case-sensitive in InTouch and must match exactly in every script reference.
| Tag Name | Type | Access Name | Item / Address | Purpose |
|---|---|---|---|---|
Btn_GlobalReset |
Memory Discrete | (none) | — | The pushbutton's logical output. InTouch-internal. |
MOD_ResetPulse |
I/O Discrete | AN_MODICON_PLC |
40001 (Modbus coil 0, mapped to a %M bit on the M340) |
Reset bit written to Modicon PLC. |
CLX_ResetPulse |
I/O Discrete | AN_CLX_PLC |
HMI_Reset (the Logix tag name, must exist in the L5x file with Public visibility and external access Read/Write) |
Reset bit written to CompactLogix. |
ResetAck |
Memory Discrete | (none) | — | Optional indicator used by the script to show "both PLCs acknowledged" in the HMI. |
Modbus bit-addressing conventions for the Modicon coil
Modbus uses zero-based coil numbers:
- Coil
00001through09999are read/write coils (output 0×0 through 0×270E). - Coil
10001through19999are inputs (read-only). - Register
40001through49999are holding registers (each 16 bits).
The InTouch MBE/MBTCP driver expects a 5-digit zero-padded number. To pulse a single %M bit in a Modicon M340, the recommended pattern is to expose that %M as part of a %MW word and address the appropriate bit position. A more common and far cleaner pattern is to define the reset as the LSB of a dedicated word:
// In Unity Pro / EcoStruxure Control Expert (Modicon side):
PROGRAM Reset_Logic
VAR
HMI_Reset : BOOL; // mapped to %MW1000.X0 below
Bypass : BOOL;
END_VAR
IF HMI_Reset THEN
ResetLatches(); // your reset subroutine
END_IF;
END_PROGRAM
Then in the I/O Mapping tab of the M340, expose the word %MW1000 with the bit HMI_Reset as %MW1000.X0. The Modbus coil address becomes 00001 (the LSB of 40001 for the first holding register). On the HMI, item 40001 mapped to bit position 0 of the first word is the right call.
40001 + N where N is the offset. This keeps the rest of the HMI's Modbus address space clean and makes documentation trivial. Never use coil addresses that overlap with holding register boundaries unless you are 100 % sure of the driver's byte order (Modicon = big-endian / high byte first; some inverters are little-endian).Logix tag exposure for the CompactLogix coil
Open Studio 5000 Logix Designer on the L5x file, expand the Controller Tags scope, and ensure HMI_Reset exists with External Access = Read/Write. A typical declaration looks like this:
// Logix tag (Data Type: BOOL, Scope: Controller, External Access: Read/Write)
HMI_Reset : BOOL; // operator-initiated global reset pulse from InTouch
The InTouch driver takes the Logix tag name verbatim. Do not include the Program: or Controller: prefix. The DASSIDirect AB_ETHIP driver resolves it through CIP symbolic addressing at runtime. If the tag is scoped to a Program, prefix it: Program:MainProgram.HMI_Reset.
Wiring the InTouch Pushbutton
Open WindowMaker and place a pushbutton on the window. The Touch Property of the button is what fires when the operator presses it. Configure it as follows:
- Select the pushbutton graphic.
- Open Animation Links → Touch Property → Discrete.
- Click Tag and bind it to
Btn_GlobalReset(the Memory Discrete). - Set the action to Toggle if the button is a momentary pushbutton, or to Direct with value
1and a release back to0if the button is a maintained pushbutton. Most operator panels expect Toggle off by default and write1on press. - Bind the Value Display property to the same Memory Discrete so the operator sees the button change state when pressed.
At this point pressing the button changes only Btn_GlobalReset. The two PLC tags do not move yet. The script is what does the writing.
Condition Script: The Fan-Out
Open Special → Scripts → Condition → On and create a new condition script. A condition script fires on the rising edge of the bound expression, which is what you want for a one-shot reset.
// Condition script: fires when Btn_GlobalReset transitions 0 -> 1
// Author: HMI engineering / project name
// Purpose: pulse reset bits on both PLCs for one scan
IF Btn_GlobalReset == 1 THEN
MOD_ResetPulse = 1; // Modicon coil pulse, 1 cycle
CLX_ResetPulse = 1; // CompactLogix BOOL pulse, 1 cycle
ELSE
MOD_ResetPulse = 0; // back to 0 to avoid latched-on writes
CLX_ResetPulse = 0;
ENDIF;
Bind the condition script to the Btn_GlobalReset tag. The script runs in the InTouch main loop on every scan, but only takes the write branch when the value is 1. Because the script is a condition script (not an action script on the button itself), it is not debounced by the button event — it follows the state of the Memory Discrete directly.
Edge-detected one-shot (preferred for noisy panels)
If operators can tap the button quickly, use a derived Memory Discrete that fires for exactly one scan. The pattern is:
// In the Quick Script editor as an application script:
// runs every WindowViewer scan (250 ms default)
Btn_GlobalReset_OS = Btn_GlobalReset AND NOT Btn_GlobalReset_Prev;
Btn_GlobalReset_Prev = Btn_GlobalReset;
Then bind the condition script to Btn_GlobalReset_OS instead. This guarantees one pulse per operator press regardless of how long the button is held.
Alternate Method: Button Action Script
If you prefer to keep all reset logic on the button itself, InTouch supports Action scripts bound to a button's Touch Property. An action script runs in the same scan the operator taps, and you can write to any number of tags inside it.
- Right-click the pushbutton → Animation Links → Touch Property → Action.
- Set the Action to Discrete → Direct →
1so the touch sets the button state. - Add a script of type On True (script fires when the touch value becomes 1) with the body:
// Action script: fires on button press (touch value = 1)
MOD_ResetPulse = 1;
CLX_ResetPulse = 1;
// let the PLC latch the reset, then drop the pulse from the HMI
DELAY( 200, ResumeLabel ); // wait 200 ms
LABEL ResumeLabel;
MOD_ResetPulse = 0;
CLX_ResetPulse = 0;
The DELAY function yields the InTouch script engine for 200 ms and then resumes at the label. Adjust 200 ms to match the longest PLC scan time across both controllers; for a CompactLogix L33ER with 1 ms task and an M340 with 20 ms MAST task, 100 ms is plenty. Do not exceed 2 000 ms; the InTouch script engine is single-threaded and a long DELAY blocks other animations.
DELAY() inside an action script is acceptable because the action script is one-shot per touch. Avoid DELAY() inside a condition script bound to a fast-changing tag — you will build up a queue of pending delays and the HMI will become unresponsive.PLC-Side Reset Logic
The HMI pulse is a request, not a command. Each PLC must run its own acknowledge-reset sequence on the rising edge of its respective input. The reasons are: (a) PLC scan time varies, (b) alarms and interlock conditions may legitimately block a reset, (c) the HMI must not assume success.
Modicon M340 / Unity Pro
// Modicon reset routine - structured text
// Trigger: HMI_Reset (mapped to %MW1000.X0 above)
IF HMI_Reset THEN
IF NOT(Stop_Active) AND NOT(Maintenance_Lockout) THEN
ResetLatches := TRUE; // your reset coil
ResetStatus := 16#0001; // 1 = OK
ELSE
ResetStatus := 16#0002; // 2 = refused
END_IF;
ELSE
ResetLatches := FALSE;
END_IF;
Allen-Bradley CompactLogix / Studio 5000
// Logix reset routine - ladder or structured text
// Trigger: HMI_Reset (Controller-scope BOOL)
IF HMI_Reset AND NOT(Stop_Active) AND NOT(Maintenance_Lockout) THEN
ResetLatches := 1; // your unlatch coil
ResetStatus := 1; // 1 = OK
ELSE IF HMI_Reset THEN
ResetStatus := 2; // 2 = refused
END_IF;
Expose ResetStatus from each PLC as a Memory integer the HMI can read. Bind it to two new InTouch I/O Integer tags: MOD_ResetStatus and CLX_ResetStatus. The operator panel can then color the reset button green (status = 1), red (status = 2), or grey (status = 0, idle) to confirm the action took effect on both controllers.
Verification & Commissioning
-
Tag browse test. In WindowMaker open Tagname Dictionary, right-click
MOD_ResetPulse, choose Read. With the Access Name paused in Offline it should show0. Switch to Live and force the Modicon coil from Unity Pro — the InTouch value should update within one polling interval. -
Driver health. Open SMC (System Management Console for the I/O Server) and confirm both Access Names show green status.
AN_MODICON_PLCandAN_CLX_PLCmust both be in the Active state with no Quality Bad rows in the dabase. -
Script trace. Open WindowViewer → View → QuickScript Debug and toggle the Memory Discrete manually. The condition script should log
MOD_ResetPulse = 1thenMOD_ResetPulse = 0(and same forCLX_ResetPulse) inside one cycle. -
PLC forced-edge test. From Studio 5000 / Unity Pro, force
MOD_ResetPulse/CLX_ResetPulseto 1 in the InTouch tag and confirm the ladder reacts. Then un-force and confirm it drops to 0 on the next scan. - End-to-end button test. Run WindowViewer in Live mode on the HMI node. Press the button. The two ResetStatus integers should both transition to 1 within two polling cycles (worst case 500 ms). If one stays at 0, see the troubleshooting matrix below.
-
Network fault test. Disconnect the cable to PLC B. The button press should still pulse PLC A, and the HMI should display a quality-bad alarm on
CLX_ResetPulse. Reconnect and verify the system auto-recovers without restarting WindowViewer.
Troubleshooting Matrix
| Symptom | Likely Cause | Fix |
|---|---|---|
Button changes Btn_GlobalReset but neither PLC tag moves |
Condition script not bound or bound to wrong tag | Open Special → Scripts → Condition and confirm the script body is associated with Btn_GlobalReset (or Btn_GlobalReset_OS for one-shot variant). |
| Modicon coil moves but CompactLogix tag does not |
AB_ETHIP topic or slot wrong, or Logix tag has Read-Only external access |
In Logix Designer change the tag's External Access to Read/Write. Verify the Access Name Topic matches the CPU slot. |
| CompactLogix tag moves but Modicon coil does not | Modbus address maps to a read-only coil or a holding-register boundary is miscounted | Re-verify the address with Modbus Poll or with a 5-line modpoll command from the HMI node: modpoll -m tcp -a 1 -r 1 -c 1 192.168.10.21. The coil should toggle. |
| Both PLC tags pulse but operator never sees the value drop back to 0 | Script is an action script with no DELAY cleanup, or condition script is missing the ELSE branch |
Add MOD_ResetPulse = 0; and CLX_ResetPulse = 0; to the ELSE branch of the condition script. |
| Reset succeeds once, then button stops working | Latched coil in PLC remains on, blocking subsequent resets; HMI holds the value because of stale read | Ensure PLC reset logic is one-shot: wrap ResetLatches in OSR (one-shot rising) on the Logix side, or use a RE edge detector on the Modicon side. |
| Button "sticks" — operator has to press twice | Condition script fires on both edges; first press changes state, second press triggers the script | Switch to edge-detected Memory Discrete as shown in the Edge-detected one-shot section above. |
| Access Name shows yellow/quality unknown | SLServer is not running, or RSLinx / DASSIDirect has lost the route | Restart the I/O Server. In SMC, run Verify All. Check that the PLC's IP is pingable from the HMI node. |
| HMI displays stale PLC values | Polling interval too long for a control loop, or DASSIDirect cache not flushing | Lower the Access Name update interval. Restart WindowViewer to flush cache if needed. |
Security and Best Practices
-
Access level. Gate the
Btn_GlobalResettag behind an operator access level that matches the PLC reset privilege. A reset that bypasses interlocks should never be a level-0 button. - Confirmation dialog. Wrap the button in a confirmation animation. InTouch supports Show Window on a touch release; show a modal that requires a second press within 3 seconds. This prevents accidental resets from a misclick on a touchscreen.
-
Audit trail. Add an action script that writes to a Memory Integer log tag every time
Btn_GlobalResetfires, and pass that integer to a Historian or AVEVA Insight collector. Resets that bypass interlocks must be traceable. - Don't fan out from the PLC side. It is tempting to let PLC A's reset trigger PLC B's reset via MSG instructions. Avoid this; it couples the two controllers in ways that are invisible from the HMI. The HMI is the correct place to perform the fan-out because the operator initiated the action.
-
Tag naming convention. Use a
MOD_/CLX_prefix on every I/O tag, and aBtn_prefix on every operator-initiated Memory Discrete. This makes the script code self-documenting and helps anyone replacing the integrator years later. - Driver mix. Mixing DASSIDirect and OPC UA on the same HMI is supported but increases the I/O Server's memory footprint. For projects with > 5 000 tags, consolidate to one I/O Server and use AVEVA OI Gateway as a bridge.
- Tag count vs. scan time. An InTouch application with more than 10 000 tags will exceed the default 250 ms scan budget. Increase the WindowViewer priority or split the application into multiple WindowViewer instances running on the same HMI node.
Edge Cases and Field-Proven Caveats
-
Redundant HMI pairs. If you run two InTouch nodes in Standby mode with SuiteLink, only the active node has write access to the PLCs. The standby's button presses will appear to do nothing — by design. Verify the active-node tag
$SYS_Activebefore granting reset permission. - Cybersecurity. Putting PLC reset coils on a routable network exposes them to the operator's IT side. Use a CIP-security enabled CompactLogix (5380 / 5480 series) and confine Modbus TCP to a VLAN that the HMI can reach but the office cannot.
- Modicon M580 vs. M340. M580 supports both Modbus TCP and EtherNet/IP natively. If you have the choice, use EtherNet/IP for the M580 too and skip the Modbus driver entirely; symbolic addressing and signed 32-bit values "just work" on EtherNet/IP but require bit-twiddling on Modbus.
-
Firmware drift. After a Studio 5000 upgrade, verify the
AB_ETHIPdriver on the HMI supports the new firmware revision. A mismatch can leave the Access Name green in SMC but unable to resolve symbolic tags at runtime. - Button held down. Some touch panels generate a continuous "pressed" event while a finger is on the screen. The edge-detected Memory Discrete described above prevents the reset from firing repeatedly for the duration of the press.
- Cross-window references. If the reset button is in a popup window and the script is in the main window, the Memory Discrete must be Global. WindowMaker warns about this at save time; do not ignore the warning.
- Local language characters. For non-English operator panels, keep the tag names ASCII. The display text can be localized, but the tag dictionary should not. This avoids Unicode-escape bugs in older InTouch builds that mishandle UTF-16 tag names.
Frequently Asked Questions
Do I need a separate I/O Server for the Modicon and the CompactLogix?
No. The DASSIDirect / SuiteLink stack can run multiple drivers in the same SMC instance. Configure one Access Name per protocol/node pair. The I/O Server handles both channels concurrently. KEPServerEX or the AVEVA OI Gateway is a single-server alternative if you want one process doing all protocol translation.
Can I use a single OPC UA tag for the reset and have one InTouch tag write to both PLCs?
No. An OPC UA tag binds to one node on one server, which in turn binds to one PLC tag. To write to two PLCs you need two InTouch I/O tags. The condition script remains the right place to write to both from one button.
My condition script is firing but the Modicon coil is read-only. Why?
The Access Name is configured for Read Only, or the Modbus coil number you selected maps to the input range (10001–19999) instead of the coil range (00001–09999). Re-check the driver item and the Access Name flags. In Unity Pro, also verify the %MW bit is mapped to a writable memory area (%M, %MW) and not to %I or %IW.
What is the smallest reliable pulse width for the reset?
Match it to the slowest PLC scan time plus one HMI polling interval. For a CompactLogix with a 5 ms periodic task and an InTouch update interval of 100 ms, a 200 ms pulse from the action script is reliable. For an M340 with a 50 ms MAST and 100 ms HMI polling, use 300 ms. Do not exceed 2 000 ms in an action script because the script engine yields the entire HMI.
Will this pattern work with AVEVA InTouch 2023 and Studio 5000 v34?
Yes. The InTouch 2023 release uses the same tag dictionary, condition scripts, and DASSIDirect access model. The AB_ETHIP driver has been certified against Logix Designer v34 / v35 / v36. For newer CompactLogix 5380 / 5480 controllers with CIP Security enabled, switch to OPC UA over TLS using the AVEVA OI Gateway; the tag dictionary side of the project is identical.