Skip to Content
On this page

Modbus C1 master

This plugin polls coils, discrete inputs, input registers, and holding registers through the Modbus C1 extension and writes variables when permitted. It is named Modbus C1 master in the device selector.

See Collection Configuration for common channel, device, variable, data-format, and import operations. This page covers only C1 protocol settings, batch limits, addresses, and debug.

Compatible devices and models

Device series / model examplesConnection requirements
Controllers or devices using Modbus C1 extension framesThe device must implement C1 extension frames and the address rules used by this plugin. Use Modbus master for standard Modbus TCP/RTU devices.

Manufacturer and compatibility scope

C1 RTU read responses echo the starting address: station, function, two-byte start address, byte count, data, and CRC. A standard RTU read response puts the byte count directly after the function and cannot substitute for this format. TCP reception uses MBAP framing. Select the plugin using the source protocol’s actual frame definition.

Configure the source and gateway

  1. Enable the matching C1 service on the source and record its station, serial parameters or TCP endpoint, and one known register. Follow its electrical/wiring requirements. A transparent serial server must preserve complete C1 RTU frames; it does not convert them into Modbus TCP merely by using Ethernet.
  2. Create a matching channel. Use TCP client for a listening device and its actual IP:port; use serial for a serial device, matching every port setting. TCP server is for an actively connecting peer.
  3. Add Modbus C1 master, associate that channel, start with a 1000 ms interval, select ModbusRtu or ModbusTcp, enter the station, and retain default packing limits.
  4. If the source map defines its first holding register as signed 16-bit, add a read-only Int16 scalar (array length 0) at 40001 or F=3;0. A known source value of 1234 should yield a fresh value of 1234; use the actual source value.
  5. Verify a single point and the echoed address in the response before adding arrays. Check the echoed starting address in the read response. Use Modbus Master for an ordinary Modbus RTU slave.

Configure the channel and device

Open Development Configuration → Collection Configuration, create a TCP client, TCP server, serial, or UDP channel matching the field link, then create a device using Modbus C1 master.

For this TCP example, the source runs C1 TCP at 192.168.1.10:502, station 1. Add a channel named C1-TCP, select TcpClient, and enter 192.168.1.10:502 as the remote endpoint. Substitute the actual source IP and port.

C1 TCP client channel targeting 192.168.1.10:502

Add a device named C1-TCP, select Modbus C1 master, associate the C1-TCP channel, and enter a 1000 ms interval. Complete the properties and variables before enabling the channel and device.

Adding the Modbus C1 device and associating its channel

Supported scope

ItemDescription
ChannelsTCP client, TCP server, serial, and UDP. Match the device transport settings.
Data typesBoolean, Byte, common signed/unsigned integers, Float, Double, String, and Decimal.

Plugin properties

SettingDefaultRangeDescription
Modbus typeModbusTcpModbusTcp or ModbusRtuC1 currently provides TCP and RTU adapters; do not select ModbusAscii.
Default station1Source-specificUsed unless the address specifies a station. The device field is a byte; use the source’s unicast station, normally 1–247. The address editor only permits overrides 1–247, not an implied device range up to 255.
FC1 maximum coils16001 to 2000Maximum coils in one FC1 read.
FC2 maximum discrete inputs16001 to 2000Maximum bits in one FC2 read.
FC3 maximum holding registers1001 to 125Maximum registers in one FC3 read.
FC4 maximum input registers1001 to 125Maximum registers in one FC4 read.
FC15 maximum coil write19681 to 1968Maximum coils in one FC15 write.
FC16 maximum register write1231 to 123Maximum registers in one FC16 write.
DTU IDEmptyRegistered identifierAssigns an inbound DTU connection in TCP server mode; separate from station. Leave empty for direct links.
Heartbeat contentEmptyUTF-8 or Hex payloadEmpty inherits the channel value; nonempty overrides it in default TCP Server DTU mode only. Match the actual DTU heartbeat, not a read command.
Heartbeat is HexOffOn/offOff matches UTF-8 text; on matches hexadecimal bytes. Changes neither C1 framing nor DTU identifier encoding.
Read/write timeout3000 msResponse budgetPer-operation response wait, separate from collection interval. Retries add to total latency.
Pre-frame delay0 msDelay before sendingCan apply to each request; does not configure baud rate or frame boundaries.
Failure retries3Driver policyAffects failed operations and bus occupancy; does not promise exactly three transmitted frames.
Read/write duty cycle3At least 1Gives waiting reads an opportunity under sustained write contention; neither a percentage nor guaranteed throughput ratio.
Write priorityOffOn/offControls scheduling under contention; verify source execution separately.
Data formatABCDABCD/BADC/CDAB/DCBAMatch the multibyte source map; data= overrides one point.
String byte reversalOffOn/offExchanges the two characters within each 16-bit word, independently of numeric format or encoding.

Keep batch limits at their defaults unless the device manual requires lower values.

Open Plugin Properties. For this example, select ModbusTcp and station 1. FC1/FC2 limits are 1600 bits and FC3/FC4 limits are 100 registers; reduce them if required by the source.

C1 framing, default station, and function-specific batch limits

Scroll down. Leave DTU ID and heartbeat empty for a direct connection. Start with a 3000 ms timeout, 0 ms pre-frame delay, and 3 retries. Match the data format to the source map; the image uses ABCD. Save the device.

C1 runtime, DTU heartbeat, and ABCD data-format settings

Address rules

AddressAreaCommon read function
00001CoilsFC1
10001Discrete inputsFC2
30001Input registersFC4
40001Holding registersFC3
  • 40001;s=2; reads the first holding register at station 2.
  • 40001;w=16; uses FC16 for writes.
  • Traditional references are one-based; an explicit F= uses a zero-based offset. F=3;0 equals 40001. Intentional overlapping reads are allowed; overlapping writes can overwrite other values.

The address Field Editor uses the Modbus master fields: read area, start offset, bit offset, station override, write function override, byte order, encoding, string byte length, BCD, and variable string length override. C1 does not introduce a separate PLC device-name syntax.

Set read-only before selecting input areas. Register bits use .0–.15; bit areas reject suffixes. Write functions are 5/6/15/16; String requires byte length len=. Int32/Float occupies two registers and array length counts elements, while packing counts bits/registers. Ordinary polling needs no special method; shared permissions, intervals, and conversion chains are covered in Collection Configuration.

Add the first variable

Select C1-TCP and choose Add Variable under Real-time Variables. If the first holding register contains a signed 16-bit value, enter name C1_HR0, address F=3;0, type Int16, read-only permission, and array length 0.

C1_HR0 address, Int16 type, and read-only permission

Open Field Editor, select HoldingRegisters, and enter start offset 0. Unchecked station, write-function, and conversion overrides inherit the device settings. Confirm to fill the address back in, check F=3;0, then save the variable.

C1 address editor with holding registers and zero-based offset 0

Device debug

Open Development Configuration → Collection Configuration, select the Modbus C1 device, open Protocol Debug at the top of the workspace.

FeaturePurpose
Read/WritePerforms a single read or approved write using the C1 address syntax.
MessagesShows connection/receive summaries and errors. Use source monitoring or capture for raw C1 bytes.

Read a known address first. Verify variable permission, function code, and site safety before writing.

After configuring the source, enable the channel and device. Under Read/Write → Single Point, enter F=3;0, Int16, and count 1, then click Read and compare the source monitor. For an unsigned source register, change both the variable and debug type to UInt16.

C1 single-point debug with F=3;0, Int16, and count 1

Verify the configuration

  1. Read one known register and compare station, value, data type, and byte order.
  2. Verify station, function, start address, and C1 address echo using the source communication monitor. A gateway summary does not establish the raw bytes.
  3. Write only an approved test variable and read it back as required by the site.

Troubleshooting

SymptomCheck
No responseChannel, Modbus type (TCP/RTU only), station, address, function, serial settings, or network.
Exception responseFunction code, address range, quantity, and device support.
Value is incorrectData type, byte order, address base, and overlap.
Write failsVariable permission, write function, data type, and device write protection.