How-to
Connecting a Magelis XBTN panel to a Zelio relay
Short answer
A Magelis XBTN panel exchanges data with a Zelio relay over one of two documented routes: a Zelio Modbus expansion with the panel as master, giving 4 words each way, or the Zelio programming port with SLIN and SLOUT, giving 24 words each way and needing VJDlite 1.3. Pick the programming port when you need more than 4 words.

On this page
- Which connection route should you choose?
- What do you set in the Zelio project for the Modbus expansion?
- Which Zelio words carry the data on the expansion route?
- How do you configure the programming-port route?
- Does the XBTN401 behave like the XBTN402?
- What happens to the exchanged data on a power loss?
- Questions asked
Two documented routes connect a Magelis XBTN panel to a Zelio smart relay. Route one is a Zelio Modbus expansion, with the panel as Modbus master and the relay as slave, exchanging 4 words in each direction through the CNA and CAN conversion functions. Route two is the Zelio programming port carrying the Zelio protocol, using the SLIN and SLOUT functions for 24 words in and 24 words out; it needs VJDlite 1.3 and a dedicated cable, packaged as starter kit VJDSTKXBTNSR2. Choose route two whenever the application outgrows the small expansion block. This article sets up both.
Which connection route should you choose? #
Choose the Modbus expansion when 4 words each direction cover all your commands and status, and the programming-port route when you need up to 24 words each way; anything beyond a few bits plus one numeric value goes to the programming port. On the expansion route the panel is master and the relay is slave, the same roles as in connecting an XBTGT panel to an M241 PLC over Modbus TCP, except the link runs to an expansion module instead of the controller's own port.
| Modbus expansion route | Programming-port route | |
|---|---|---|
| Zelio connection | Modbus expansion module | Zelio programming port |
| Panel driver | Modbus master | Zelio-protocol driver |
| Exchange capacity | 4 words in, 4 words out | 24 words in, 24 words out |
| Zelio program objects | Outputs O1 to O4 and inputs J1 to J4, with CNA and CAN | SLIN and SLOUT functions |
| Extra requirements | The expansion module | VJDlite and the Zelio cable (kit VJDSTKXBTNSR2) |
Both routes carry the same kind of content: command bits from the panel, status bits to the panel, and numeric values such as a setpoint or a timer preset. The difference is capacity and wiring, not what the panel can display.
What do you set in the Zelio project for the Modbus expansion? #
Select the Modbus expansion together with the relay in the Zelio Soft 2 hardware selection, or the communication inputs and outputs never appear on the programming page and there is nothing to wire to. A module bolted onto the relay does not add program objects to a project that was configured without it.
- In the module selection, tick the Modbus expansion alongside the SR2 relay reference before opening the programming workspace.
- Program in FBD; it lets you connect the expansion words to logic and to the conversion blocks more clearly than ladder.
- For status going to the panel, convert the discrete states into a word with CNA or CAN (each block's help states its direction) and connect the result to one of the outputs O1 to O4.
- For commands arriving from the panel, convert the word at inputs J1 to J4 back into bits with the other conversion function and use those bits in the logic.
- Pass numeric values such as a setpoint as raw words with no bit conversion, matching the panel object's format and scaling to what the relay program expects.
Which Zelio words carry the data on the expansion route? #
The expansion fixes the addresses for you: outputs O1 to O4 present status to the panel at words Mw20 to Mw23, and inputs J1 to J4 receive commands from the panel at Mw16 to Mw19.
| Zelio object | Word | Direction | Who writes, who reads |
|---|---|---|---|
| O1 | Mw20 | Zelio to panel | Zelio writes status, panel reads |
| O2 | Mw21 | Zelio to panel | Zelio writes status, panel reads |
| O3 | Mw22 | Zelio to panel | Zelio writes status, panel reads |
| O4 | Mw23 | Zelio to panel | Zelio writes status, panel reads |
| J1 | Mw16 | Panel to Zelio | Panel writes commands, Zelio reads |
| J2 | Mw17 | Panel to Zelio | Panel writes commands, Zelio reads |
| J3 | Mw18 | Panel to Zelio | Panel writes commands, Zelio reads |
| J4 | Mw19 | Panel to Zelio | Panel writes commands, Zelio reads |
Worked example with an illustrative bit assignment: pack four status bits into O1, with pump running on bit 0, tank-high on bit 1, alarm on bit 2 and auto mode on bit 3. With pump running, no high level, alarm active and auto mode on, the word is 1×1 + 0×2 + 1×4 + 1×8 = 13. The conversion block drives 13 onto O1, and the panel object mapped to Mw20 displays 13. In the other direction, a panel key writes 5 into Mw16, which arrives at J1: 5 = 1 + 4, so bits 0 and 2 are on and the word-to-bit function closes exactly those two Zelio contacts.
Before duplicating objects across the map, prove one position with a live value: force a known pattern onto O1 and confirm the panel shows that word and not a neighbouring one, because a driver's address notation can differ from the raw word number.
How do you configure the programming-port route? #
Connect the panel to the Zelio programming port with the dedicated Zelio-protocol cable, build the panel project in VJDlite version 1.3, and place SLIN and SLOUT in the relay program to define the exchange positions. There is no Modbus register table on this route; the positions you configure in those two functions are the address map.
- Declare the Zelio as the link target in the panel project; the software then selects the protocol automatically.
- Get VJDlite from Schneider Electric's support site, or take it from starter kit VJDSTKXBTNSR2, which also bundles the panel programming cable (USB-RS485), the Zelio USB cable and accessories.
- In the relay program, place SLIN for the words the panel drives into the relay's inputs and SLOUT for the parameter words the panel reads; set their exchange positions to match the panel objects.
- Test each position with a changing value at both ends before building the full screen set.
Does the XBTN401 behave like the XBTN402? #
The Modbus-expansion setup is field-confirmed on an XBTN402; before running it on an XBTN401, confirm that panel's supported-connection list in the software, because an XBTN402 project does not transfer unchanged to the smaller panel. The kit reference VJDSTKXBTNSR2 by itself does not establish compatibility with every XBTN model either, so match the kit and the panel in the vendor's documentation for the exact reference you have.
For an existing XBTN402 with the expansion installed, keep route one. For an existing XBTN401, open its controller list first: if the Zelio protocol driver is listed, wire the programming-port route; if only a Modbus master driver is listed, the expansion route is the one available to you. For a new build, take the programming-port route with the kit, because the larger exchange block costs nothing in panel capacity and avoids the expansion module altogether.
What happens to the exchanged data on a power loss? #
Every exchange word drops to 0 when power fails, so any setting held only in the exchange area is lost; the relay program must keep presets elsewhere and the panel must rewrite its commands after restart. This applies on both routes: the exchange words are a mailbox, not memory.
- Keep timer presets, thresholds and mode settings in the relay's own program variables, not in words routed through SLIN, SLOUT or the expansion.
- Have the panel rewrite its command words on startup, since a restored supply brings every exchange word back as zero.
- Design keys as a set-and-reset pair so a command cannot stay latched after the operator releases the screen.
- Let the relay program, not the screen object, drive the outputs to a defined state when the link stops updating; that is the safe-state decision for the machine and it belongs in the Zelio logic.
Questions asked
Do I need to understand Modbus frames to use the expansion route?
No. The panel's driver builds the requests and replies; in the panel software you declare the Zelio as the link target and the protocol is selected automatically. Your only job is mapping screen objects to the fixed expansion words, so frame timing and function codes never appear in the project.
Can several panel keys write into the same command word?
Yes, but only if each key sets its own bit. A key whose object writes the whole word can clear bits that another key set a moment earlier. Check in the driver documentation whether the object performs a bit operation or a full-word write before packing independent commands into one word.
Should the Zelio program be in FBD or ladder?
Use FBD. It exposes the expansion words as connectable pins, so you can wire the CNA and CAN conversion blocks straight to the module inputs and outputs and see the data flow. Ladder works, but the word wiring is harder to follow when you troubleshoot it months later.
Where does the panel software come from?
VJDlite is downloadable from Schneider Electric's support site. The VJDSTKXBTNSR2 starter kit bundles the software with the panel programming cable, the Zelio USB cable and accessories, so a first build normally starts from the kit rather than sourcing the parts separately.


