On this page
Fuji SPB
Fuji SPB protocol PLC address read and write driver
Compatible devices and models
| Device series / model examples | Connection requirements |
|---|---|
| Fuji FLEX-PC PLCs exposing SPB services | Use the SPB commands used by this plugin over serial or transparent TCP, with matching station and WORD mapping. Check device-area ranges for the actual CPU. |
Connect with the engineering tool first
This entry sends Fuji SPB ASCII commands. Confirm that the PLC interface provides this service, then open the actual project with the matching FLEX-PC Programmer or SX-Programmer Standard. Standard supports SPB, SPH and FLEX-PC projects; select the correct CPU and mode.
- Use the CPU’s specified programming cable or RS-232/RS-422/485 adapter. Follow its pinout for transmit, receive, signal ground, line pairs and termination. Do not assume every connector is two-wire RS-485.
- In FLEX-PC Programmer open Options → Communications…, select the engineering computer’s COM port and communication source, then select Comm Port Properties.

- Match baud rate, data bits, parity and stop bits to the PLC interface/adapter. The original example is 9600, 8, None, 1, flow control None, also used below. If the site uses another format, update both ends. A COM1 on the engineering PC and a COM1 on the gateway refer to separate operating-system ports.

Source: Fuji FLEX-PC Programmer FEH403c , printed page 3-2. Monitor D100, record the station and known value, then release the physical port before using the gateway. The PLC communication service must use no BCC and a CRLF terminator.
Channel and device
Open Development configuration → Collection configuration, select Fuji SPB, and create a SerialPort channel. The example uses COM1, 9600/8/None/1 and no handshake. Begin with concurrency 1; set DTR/RTS according to the actual interface.

Associate the device with the channel and use a 1000 ms execution interval for the example. Ordinary reads and writes do not require Allow method calls. Enable the configured channel, device and variable after checking the parameters.

For a transparent serial server, use TcpClient with its IP:port and match its serial format to the PLC. A DTU connecting to the gateway uses TcpService and the matching session. TCP still carries the same SPB frames; an open socket alone does not confirm the station or serial format.
Plugin properties

| Property | Purpose and selection |
|---|---|
| PLC station | Default 1. Enter a decimal byte, 0–255; the request encodes it as two uppercase hexadecimal digits. Decimal 10 becomes 0A on the wire; do not enter 0A in the field. Use the hardware’s supported station range and avoid duplicates. |
| Maximum packing length | Default 105, range 1–105 16-bit WORDs. Merged reads include address gaps. Int16/UInt16 occupy one WORD and Int32/UInt32/Float two. Each array or string must fit a single package. The per-write limit is 103 WORDs. |
| DTU ID | Selects a DTU session on TcpService. Normally empty for direct serial/TcpClient; not the PLC station. |
| Heartbeat content | Used only in default TCP server DTU mode. Empty inherits the channel heartbeat; a value overrides this device’s match/echo content. Do not pass arbitrary text to the PLC. |
| Heartbeat is Hex | Off by default for UTF-8 matching; on for hexadecimal bytes. Does not change SPB ASCII commands. |
| Read/write timeout | Default 3000 ms per request. Allow for serial speed, converter and PLC response time; first resolve a wrong station or occupied port. |
| Pre-frame delay | Default 0 ms before each send. Increase for bus/peer spacing requirements; separate from the device interval. |
| Failure retries | Default 3 for transient loss. More retries do not fix BCC, terminator or address errors. |
| Read/write duty cycle | Default 3, minimum 1: schedule a read after n writes. Not a percentage. |
| Write priority | Off by default. Allows writes to cancel active reads; keep off for initial read-only collection. |
| Reverse string bytes in WORD | Off by default. Swaps each WORD’s two character bytes; select from the PLC character layout. |
| Data order | Default ABCD; ABCD/BADC/CDAB/DCBA available. Compare a known 16-bit value, then confirm the two-WORD layout of 32-bit values. A variable can override this. |

Create D100
Monitor D100 in the engineering tool. Add FujiSPB_D100 with address D100, type Int16, array length 1, access Read only. A decimal 1234 should appear as the same value in the gateway. UInt16 is unsigned; Float occupies D100 and D101.

Open Field editor, select D and WORD offset 100, leave the bit number unset for an ordinary WORD, confirm and save.

| Address or field | Rule and example |
|---|---|
| Area | Y, X, M, L, TC, CC, TN, CN, D, R, W. Use the CPU’s allocation and permissions; timer/counter contacts TC/CC and values TN/CN are different areas. |
| Offset | Decimal WORD offset 0–9999, such as D100 or TN20. Offset plus actual WORD count cannot exceed 10000; the CPU allocation may be smaller. |
| Explicit Boolean bit | WORD address followed by .0–.15, for example D10.12. Non-Boolean addresses must not retain a bit suffix. |
| Continuous bit address | Boolean X/Y/M/L/TC/CC can omit the dot and use continuous bit numbering: M35 Boolean equals M2.3. M35 Int16 instead means WORD35. Boolean D/TN/CN/R/W requires an explicit bit suffix. |
| Array length | Greater than zero. D100/Int16/3 covers D100–D102; D100/Float/3 covers six WORDs. Boolean arrays continue across WORD boundaries. A Boolean write changes one bit per request. |
| Byte order | A variable-only data=ABCD etc. override; empty inherits the device order. Does not change address units. |
| Encoding | Select the String character encoding, such as encoding=ASCII. It does not change the ASCII command format. |
| String byte length | String requires len. D200;len=8;encoding=ASCII with array length 1 uses four WORDs; length 2 uses eight. len is bytes per string. |
| BCD | Select only for a matching BCD/Gray source representation. Leave unset for ordinary binary integers. |
| Variable-length string | Select the actual PLC length layout; leave unset for a fixed character area. The structure is not detected automatically. |
There are no extra variable properties. Supported types are Boolean, Int16, UInt16, Int32, UInt32, Float and String. Non-Boolean writes require complete WORDs; use even string byte lengths. Do not apply the 105-WORD read limit to a write exceeding 103 WORDs.
Compare the engineering monitor
Read one D100 WORD first. Change its test value from 1234 to 5678 in the engineering monitor and compare the gateway value, timestamp and quality. Then read M35 Boolean and compare bit 3 of M2. Establish address units before adding arrays, floats or write permissions.
Use the same address in Protocol debugging → Read/write and inspect station/request/response in Messages. For no response check port ownership, wiring and station. For received but rejected frames check no BCC and CRLF. For correct WORDs but incorrect 32-bit values check WORD order; for range errors check the start, total WORD count and CPU allocation.
See Collection configuration for common channels, variables and conversion chains, and the Plugin index for other entries.