Skip to Content
On this page

Fuji SPB

Fuji SPB protocol PLC address read and write driver

Compatible devices and models

Device series / model examplesConnection requirements
Fuji FLEX-PC PLCs exposing SPB servicesUse 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.

  1. 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.
  2. In FLEX-PC Programmer open Options → Communications…, select the engineering computer’s COM port and communication source, then select Comm Port Properties.

FLEX-PC Programmer port and communication-source selection

View original image

  1. 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.

FLEX-PC Programmer 9600 baud, eight bits, no parity and one stop bit

View original image

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.

Fuji SPB serial channel and framing

View original image

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.

Fuji SPB device and associated channel

View original image

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

Fuji SPB station, WORD packing limit and DTU settings

View original image

PropertyPurpose and selection
PLC stationDefault 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 lengthDefault 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 IDSelects a DTU session on TcpService. Normally empty for direct serial/TcpClient; not the PLC station.
Heartbeat contentUsed 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 HexOff by default for UTF-8 matching; on for hexadecimal bytes. Does not change SPB ASCII commands.
Read/write timeoutDefault 3000 ms per request. Allow for serial speed, converter and PLC response time; first resolve a wrong station or occupied port.
Pre-frame delayDefault 0 ms before each send. Increase for bus/peer spacing requirements; separate from the device interval.
Failure retriesDefault 3 for transient loss. More retries do not fix BCC, terminator or address errors.
Read/write duty cycleDefault 3, minimum 1: schedule a read after n writes. Not a percentage.
Write priorityOff by default. Allows writes to cancel active reads; keep off for initial read-only collection.
Reverse string bytes in WORDOff by default. Swaps each WORD’s two character bytes; select from the PLC character layout.
Data orderDefault 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.

Fuji SPB timeout, scheduling and ABCD data order

View original image

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.

Fuji SPB D100 Int16 read-only scalar

View original image

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

Fuji SPB D area, WORD offset 100 and converter overrides

View original image

Address or fieldRule and example
AreaY, 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.
OffsetDecimal 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 bitWORD address followed by .0–.15, for example D10.12. Non-Boolean addresses must not retain a bit suffix.
Continuous bit addressBoolean 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 lengthGreater 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 orderA variable-only data=ABCD etc. override; empty inherits the device order. Does not change address units.
EncodingSelect the String character encoding, such as encoding=ASCII. It does not change the ASCII command format.
String byte lengthString requires len. D200;len=8;encoding=ASCII with array length 1 uses four WORDs; length 2 uses eight. len is bytes per string.
BCDSelect only for a matching BCD/Gray source representation. Leave unset for ordinary binary integers.
Variable-length stringSelect 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.