How-to
Displaying Twido %MW inputs on a Magelis HMI
Short answer
A Magelis XBTGT1130 talking Unitelway to a Twido TWDLCAA40DRF reads internal memory but cannot map physical inputs. Copy each input state into an unused %MW word in the PLC, then point the panel's variables at that word in the I/O manager. XBTZ9780 is the cable reference here, not the panel model.

On this page
- Why the panel cannot read the input bits directly
- Copy the input states into %MW in the Twido program
- Configure the Magelis variables over Unitelway
- Worked example: eight inputs packed into one %MW word on a TWDLCAA40DRF
- Writing to the outputs follows the same rule
- Verify the display before trusting it
- Questions asked
A Magelis XBTGT1130 talking Unitelway to a Twido TWDLCAA40DRF cannot point its variables at the PLC's physical inputs: for this pairing the protocol exposes internal memory to the panel, not the I/O image. The fix is to copy the input states you need on screen into unused %MW words inside the Twido program, then address those words from the panel: define the Unitelway driver in the I/O manager, create the variable, and enter the allocated %MW address in its device address field. One naming trap first — XBTZ9780 is a cable reference between a Twido and Magelis panels, not an operator panel model; the panel to configure is the XBTGT1130.
Why the panel cannot read the input bits directly #
For this Twido-to-Magelis pairing over Unitelway, the panel reads and writes internal PLC memory but cannot map physical I/O. Pointing a lamp at an input therefore fails, not because the cable or the driver is wrong, but because the addressing the panel offers toward this controller has no input target in it. The symptom is unmistakable: %MW values display normally while every attempt to reach an input comes back empty.
The model confusion around this build makes the fault look like a hardware problem. XBTZ9780 and XBTGT1130 sit in the same reference family, but the first is the part number of the connecting lead and the second is the panel. Enter XBTGT1130 as the panel in the Vijeo Designer project, or the driver is configured for a device that is not on the wire.
Copy the input states into %MW in the Twido program #
Add logic to the Twido program that runs every scan and writes each input state you want on screen into a %MW word. Two layouts work: give every input its own word held at 0 or 1, or pack up to eight on/off states into a single word at fixed bit positions to save addresses. Pick words you have confirmed unused in the actual project, not from habit: a word that already carries recipe or counter data ends up with two writers, and the panel then displays a value neither of them controls. Record the mapping — which input lands on which word or bit — in the project documentation, because the panel configuration depends on it staying fixed.
Configure the Magelis variables over Unitelway #
Defining the driver comes first, and it is the same first step as when a Magelis HMI sets a Premium PLC clock over Unitelway: the controller side changes, the protocol setup does not.
- In the Vijeo Designer navigator, open the I/O manager and define the communication protocol the panel uses toward the PLC — Unitelway for this Twido.
- Open the variable table and create the variable. Set its type to match the PLC data: an integer for a packed %MW word, and the same integer treatment for a single-input word held at 0 or 1.
- In the device address field, enter the allocated %MW address. If the syntax is not obvious, click the three-dot button in that field; the dialog that opens walks you through defining the address piece by piece.
- Bind the variable to the display object — one lamp per input, or a numeric field on the packed word.
- Build and transfer the project to the panel, then connect and confirm the driver reports an exchange with the Twido.
Worked example: eight inputs packed into one %MW word on a TWDLCAA40DRF #
Inputs and where they come from:
- Controller: Twido TWDLCAA40DRF, the PLC in this build.
- Panel: Magelis XBTGT1130 on Unitelway, the panel in this build.
- Data: on/off states of eight physical inputs, each copied by PLC logic to one bit of one %MW word. The numbers below are dimensionless bit weights.
- Example mapping, chosen for this example and not a documented requirement: input 1 to bit 0, input 2 to bit 1, up to input 8 to bit 7.
Rule in words: a bit set at position n contributes 2 raised to the power n to the integer value of the word, so the number the panel reads is the sum of the weights of the inputs that are on.
Arithmetic: with inputs 1, 3 and 4 made, input 1 sits at bit 0 and weighs 2^0 = 1, input 3 at bit 2 weighs 2^2 = 4 and input 4 at bit 3 weighs 2^3 = 8, so the word holds 1 + 4 + 8 = 13. All eight inputs made give 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 = 255; all released give 0.
Result: the panel's numeric field shows 13 for that combination, and it steps through every value from 0 to 255 as the eight inputs change.
Decision: treat 13 as the pass mark for that input combination — if the field shows 13, the packing and the address are right. A reading of 5 (1 + 4) means bit 3 never got set, so the copy for input 4 is missing from the PLC logic or mapped to the wrong bit; a reading of 0 with inputs made means the copy logic is not in a scanned section of the program, or the panel is pointed at a word nothing writes.
Writing to the outputs follows the same rule #
The limit is symmetric. A panel button that drives a Twido output writes internal memory, and the PLC program moves that value to the physical output — which is exactly why a Twido needs no Comm macro or EXCHANGE for an HMI button. Keep the write side under the same discipline: one agreed %MW command word, the panel as its only writer, and the move to the physical output owned by the PLC program.
Verify the display before trusting it #
Toggle each physical input on its own and watch two places at once: the %MW word in the PLC and the object on the panel. Three outcomes decide the work. If the panel follows the input, the mapping is done. If the word changes in the PLC while the panel shows something else, the HMI variable's address or type disagrees with the PLC mapping — look for an address one word off, or a Boolean variable reading a packed word. If the panel never moves, the exchange itself is down, so re-check the driver definition in the I/O manager and the connection before touching the mapping.
One safety note: what the panel shows is a copy that updates at the scan and the communication cycle, so it is indication only — nothing that protects a person may depend on it.
Questions asked
Why does my panel lamp stay wrong even though the %MW word changes in the PLC?
Compare the HMI variable against the PLC copy first: a mismatched data type, such as a Boolean variable pointed at a packed word, or an address off by one word, displays a value that is not the one you stored. A quick isolation test is to read the same word into a plain numeric field; if the number there matches your hand-calculated bit sum, the communication and address are right and the fault is in the lamp object's binding or expression.
Does the same %MW method work for driving Twido outputs from the panel?
Yes, in the reverse direction. The panel writes its command into an internal %MW word, and the Twido program moves that value to the physical output during the scan. The panel never touches the output address itself, so output control through the panel depends entirely on that PLC-side move logic staying in the project.
Is XBTZ9780 the operator panel model?
No. XBTZ9780 is a cable reference: the manufacturer documents it as the connection cable between a Twido PLC serial port and the RJ45 port of Magelis STU panels. The operator panel in this build is the XBTGT1130, and that is the model to select in the Vijeo Designer project.
How quickly does the displayed input state follow the real input?
The panel shows a copy, so the display lags the physical input by the PLC scan time, the Unitelway exchange cycle and the panel's own refresh, and no single cycle-time figure is documented for this Twido and panel pairing. Verify the combined delay on your machine by toggling an input and watching the lamp, and treat that measured delay, not a calculated one, as the number your process has to live with.


