How-to
Setting the Modbus slave ID for a Citect I/O device
Short answer
The Modbus slave ID is the Address field of the I/O Device, set in Plant SCADA Studio under Topology. Boards define the server's interface and Ports carry the communication settings; neither holds the station number. Enter the station the device itself is configured to, then compile and deploy, and the #Bad tags clear when the transport already matches.
On this page
The slave ID is not in Boards or Ports. It is the Address field of the I/O Device: in Plant SCADA Studio, open Topology, select the I/O Device the tags use, and type the station number into Address. A board defines the interface inside the I/O server computer, a port carries the communication settings for that interface, and the I/O Device owns the identity of the polled station: its Address is the number that travels in every request. When tags sit at #Bad and the wiring is sound, open this field first, match it to the station configured in the device, compile, deploy, and the quality clears if the transport already matches.
Where the slave ID lives #
Plant SCADA, the product line Citect SCADA became, splits communication setup into three layers, and the station number belongs to the last one. The question of which Boards or Ports parameter holds the slave ID has the answer none: those layers carry the path and the transport, never the identity of the device being polled.
| Layer | What it defines | What you set in it |
|---|---|---|
| Board | The physical interface in the I/O server computer | The interface type, such as an Ethernet board for Modbus TCP |
| Port | A communication channel on a board | Protocol settings: for serial, baud rate, parity, data bits and stop bits |
| I/O Device | One polled station and the tags that read it | The Address field: the station number on a serial bus |
The AVEVA documentation routes manual device setup through the same place: you add the I/O device from the Topology activity and set its properties there. That path configures every protocol the I/O server speaks, as when connecting Citect SCADA to a CP1W-CIF41 over FINS.
Set the station number step by step #
- Read the station number out of the device first: its own communication menu, parameter table or switch setting, wherever that product keeps it. The number the device answers to is the number you enter; guessing from the project side only moves the fault.
- Open the project in Plant SCADA Studio, go to Topology and open I/O Device.
- Select the I/O Device the failing tags reference. A tag definition names its device, so the association is visible on the tag itself.
- Enter the station number in Address.
- Save, then compile and deploy the project to the runtime I/O server. A definition that is edited but not deployed keeps polling with the old value.
- Watch the tags: quality moves off #Bad on the following poll cycles once the request reaches a station that answers.
What belongs in Boards and Ports instead #
The same #Bad symptom also arrives from transport faults that no station number can fix. Use the symptom to pick the layer:
| Symptom pattern | Layer at fault | What to compare |
|---|---|---|
| Bytes leave the server, nothing returns, every station silent | Port | Serial settings against the device or gateway: baud rate, parity, data bits, stop bits |
| Server reaches the gateway, no serial traffic downstream | Port or gateway | The gateway's downstream port settings against the slave bus |
| TCP connection never opens | Board and network | The Ethernet board's network against the endpoint's reachability |
| One station answers, another stays silent | I/O Device | The Address entered against the number configured in the silent device |
Two boundaries keep the search honest: a transport fault stays broken when you change the station number, and a wrong station stays silent no matter how large the timeout. A timeout hides a slow device; it cannot make a device answer to an address it does not own.
Serial, TCP and gateway addressing #
On Modbus RTU, all slaves share one bus and answer only to their own station number, so each polled device is its own I/O Device entry on the same port with its own Address. Valid stations run 1 to 247, and 0 is the broadcast address: writes to 0 are executed by every slave and acknowledged by none, so reads against 0 return nothing and the tags stay #Bad. That is also one reason why Modbus RTU sends to slave address 0 instead of your device. Treat 0 as off-limits for any tag that writes to outputs: a broadcast write fires every device on the bus at once and confirms none of them.
On Modbus TCP, configure an Ethernet board and put the endpoint in the I/O Device Address: the device's IP address, in an illustrative example 192.168.1.10, with the service port handled by the driver configuration. Station selection moves into the unit identifier carried in each request.
When the endpoint is a gateway bridging to serial slaves, that unit identifier picks the downstream station: set the Address to the gateway's IP and choose the unit identifier per the gateway's mapping table. A direct Ethernet device may instead ignore the unit identifier, which is the endpoint's documented behavior, not a setting in Boards or Ports.
When tags stay #Bad after the match #
Once the Address is right, look at the exchange itself rather than the configuration. A communication capture or the driver's diagnostics places the fault at one boundary:
| Observed exchange | Boundary | Next move |
|---|---|---|
| No request leaves the server | Project and runtime | The deployed project is the edited one, and the failing tags reference this I/O Device |
| Request leaves, no reply | Transport or station | Compare the transmitted station and endpoint against the device's own settings |
| A Modbus exception returns | Register access | Read the logged exception against the request's function and register range |
| A valid reply returns, tag stays #Bad | Driver and tag side | Check the tag's device association, address syntax and data type |
On timeouts, measure before you raise anything. If a capture shows replies arriving 180 ms after each request and the port's configured response timeout sits well above that, the timeout is not the fault; changing it would only mask the real one. You can prove the whole chain before the hardware is ready by simulating a Modbus TCP SCADA link on one PC.
Verify the register, not just the station #
A correct station number selects the device; it does not select the register. Work one known point before trusting the tag set. Take a power meter at station 5 that documents its energy total at holding register 40257 in 4xxxx notation. Modbus counts protocol addresses from zero, so register 40001 is address 0 and the request for the energy total carries 40257 − 40001 = 256.
Enter the tag against the raw number 40257 instead and the driver asks for protocol address 40257, which is 40257 − 256 = 40001 registers past the intended one, far outside the meter's map; the read fails or exceptions. The same discipline covers data types: a 32-bit value spread over two registers reads wrong rather than bad when the word order in the tag does not match the device's.
The decision #
Commit by case:
- Tags #Bad with the Address empty or mismatched: set it to the device's configured station number, compile, deploy. This is the fix for the symptom that brought you here.
- Every station silent on a serial bus: fix the Port settings, not the Address.
- TCP connection never opens: fix the Board's network and the endpoint, not the Address.
- Polling through a gateway: Address holds the gateway endpoint; the unit identifier holds the downstream station per the gateway's mapping.
- Exception on a matched station: the register request is wrong, so check function, range and data type.
- Right station, wrong value: word order and data type in the tag.
Questions asked
Do I need one I/O Device entry per Modbus slave?
Yes. Each station number on the bus gets its own I/O Device referencing the same port, each with its own Address. One entry cannot poll two stations, and two entries sharing a station number will race for the same replies. Through a gateway the rule is the same: one entry per downstream slave the gateway exposes.
Can I use station 0 to reach every slave at once?
Only for writes, and never for control. Station 0 is the Modbus RTU broadcast: every slave executes the request and none replies, so reads return nothing and the tags show bad quality. Keep polled tags on stations 1 to 247 and leave broadcast to documented commissioning procedures.
Does the I/O Device name have to match the device?
No. The name is a label inside your project; the device never sees it. Only the Address value travels in the request. You can name the entry anything, but keep names unique, because tag and variable definitions reference the I/O Device by that name.
Does the corrected station number take effect immediately?
No. The Address field lives in the compiled project, so the change reaches the plant only after you compile and deploy to the runtime I/O server. Until then the old station number keeps polling, which is why a configuration that looks correct on screen can still show #Bad tags.