LS XGT Cnet Frame Builder
Build XGT Cnet request frames with sizes and BCC computed.
This tool assembles an LS ELECTRIC XGT Cnet request frame. Choose the command, the station and the devices, and it returns the exact characters and bytes to put on the wire — variable sizes counted, the BCC computed over the whole frame, and the command letter cased to match. Reference: reading %MW100 from station 20 produces a frame whose BCC is A4.
How it works
Building an XGT frame by hand goes wrong in small, quiet ways. The variable size is a character count rather than a data width, so people write 02 for a word device. The BCC has to cover the ENQ and the EOT, which are easy to leave out of the sum. And the command letter's case is not cosmetic — it declares whether a BCC is present at all, so a lowercase letter with no checksum is as invalid as an uppercase one with a checksum appended.
The builder derives all three from what you actually chose. Sizes are counted from the names you type, the BCC is summed across the finished frame including its delimiters, and the case follows the checksum toggle so the two can never contradict each other. What you get back is the frame as text, as a hex dump, and split into body and data area, so it can be compared against a capture field by field.
Worked example
→ 1 block · variable size 06 · lowercase r
frame: <ENQ>20rSS0106%MW100<EOT>A4
bytes: 05 32 30 72 53 53 30 31 30 36 25 4D 57 31 30 30 04 41 34
Commands
| Parameter | Value | Notes |
|---|---|---|
| RSS | Read individually | up to 16 blocks |
| RSB | Read continuously | word devices only |
| WSS | Write individually | one data type per frame |
| WSB | Write continuously | max 60 words |
| Lowercase r/w | BCC appended | |
| Uppercase R/W | no BCC | |
| Variable size | character count | %MW100 → 06 |
| Frame limit | 256 bytes |
Source: LS ELECTRIC, Cnet I/F Module (XGL-C22A/C22B/CH2A/CH2B/C42A/C42B) User's Manual V3.3, Ch.7; BCC arithmetic from the XGB Cnet I/F User's Manual V2.0, §7.2.1.
FAQ
▸Do I have to lowercase the command myself?
No, and that is deliberate. The BCC toggle drives the letter case, because the two are the same decision: a lowercase command means the frame carries a BCC and an uppercase one means it does not. Tying them together makes it impossible to build the illegal combinations.
▸What is the variable size field?
The number of characters in the device name, not its byte width. %MW100 is six characters, so the size is 06; %MW000 is also six. The builder counts it for you, which removes the most common hand-assembly mistake.
▸When do I use SS versus SB?
SS reads or writes named devices individually — up to sixteen blocks in one frame, all of the same data type. SB works on a run: one starting device plus a count. Bit devices cannot be used with SB at all; the standard has no continuous bit transfer.
▸How is write data formatted?
As ASCII hex, most significant first, sized by the data type in the name. A word device takes four characters, so writing hFF to %MW230 sends 00FF. A bit is written as one byte, 00 or 01, and nothing else is accepted.
▸How many words can one frame carry?
Sixty, which is 120 bytes of payload. Requesting more earns error 1232 from the controller. The whole frame is capped at 256 bytes.
▸Is anything uploaded?
No. The frame is assembled in your browser.