Skip to Content
On this page

Modbus C20 master

In addition to common Modbus address reads and writes, this plugin reads C20 waveform files, spectra, frequency amplitudes, and spectrum settings. It is named Modbus C20 master in the device selector.

See Collection Configuration for common channels, variables, data format, and imports.

Compatible devices and models

Device series / model examplesConnection requirements
Controllers or devices using Modbus C20 extension framesThe device must implement C20 extension frames, station addressing and the address rules used by this plugin. A standard Modbus interface does not provide C20 services.

Manufacturer and compatibility scope

C20 requires dedicated file, spectrum-trigger, and three-channel configuration maps in addition to ordinary Modbus registers. A successful holding-register read does not establish waveform or spectrum support. Obtain the source’s file numbers, offsets, quantity units, trigger addresses, statistics layout, and calibration layout.

Configure the source and first known point

  1. Enable the matching C20 source service. Record station, network or serial parameters, a known ordinary register, and an existing waveform/spectrum source in the vendor tool. Preserve complete C20 RTU frames over serial or transparent converters; a reachable Ethernet port does not establish Modbus TCP framing.
  2. Create the matching channel and Modbus C20 master device. Start with a 1000 ms interval and the actual station and ModbusRtu/ModbusTcp framing. Use one device configuration per source: dedicated operations use the device default station for derived statistics/configuration reads; an address S= override does not switch the entire spectrum operation to another station.
  3. If the map defines the first holding register as signed 16-bit, add a read-only Int16 scalar at 40001/F=3;0, array length 0, and compare a fresh value with the source monitor. Ordinary polling does not require a spectrum special method.
  4. Dedicated file access sends RTU-format FC20 (hexadecimal 0x14) with CRC. Use a matching RTU or transparent link. Selecting ModbusTcp does not automatically add MBAP to this dedicated request; ordinary TCP register success does not validate file access.

Open the plugin and supported scope

Create a TCP client, TCP server, serial, or UDP channel, then create a device using Modbus C20 master. Supported types include Boolean, Byte, common integers, Float, Double, String, and Decimal.

This serial example uses COM3, 9600 baud, 8 data bits, no parity, and 1 stop bit. Configure matching conditions on the source. Add a channel named C20-Serial, select SerialPort, and enter each port setting. Use the actual port, parity, and electrical interface required by the device manual.

C20 serial channel with COM3 and 9600 8N1

Add device C20-RTU, select Modbus C20 master, associate C20-Serial, and start with a 1000 ms interval. Enable the channel and device after completing configuration.

Adding the Modbus C20 device associated with C20-Serial

Plugin properties

SettingDefaultRangeDescription
Modbus typeModbusTcpModbusTcp or ModbusRtuC20 currently provides TCP and RTU adapters; do not select ModbusAscii.
Default station1Source-specificUsed for ordinary addresses without a station and for derived statistics/configuration reads. Device storage is a byte; editor overrides accept 1–247. Do not use an S= override to switch an entire spectrum operation across stations.
FC1 maximum coils16001–2000Bits per ordinary FC01 read, separate from spectrum sample count.
FC2 maximum discrete inputs16001–2000Bits per ordinary FC02 read. Input variables must be read-only.
FC3 maximum holding registers1001–125Ordinary polling limit. Reducing it does not split the dedicated fixed 96-register configuration request.
FC4 maximum input registers1001–125Registers per ordinary FC04 read, not variable rows.
FC15 maximum coil write19681–1968Ordinary batch-write limit, separate from the FC05 spectrum response length.
FC16 maximum register write1231–123An ordinary array write must fit both this limit and the source range.
DTU IDEmptyRegistered identifierAssigns inbound DTU connections in TCP server mode; separate from station. Leave empty for direct links.
Heartbeat contentEmptySource heartbeatEmpty inherits the channel; nonempty overrides it in default TCP Server DTU mode only. Enter the actual heartbeat, not the spectrum trigger.
Heartbeat is HexOffOn/offOff matches UTF-8 text; on matches hexadecimal bytes. Does not change C20 framing or DTU identifier encoding.
Read/write timeout3000 msResponse budgetPer-operation wait. A spectrum operation makes multiple requests and is not guaranteed to finish in three seconds.
Pre-frame delay0 msBefore each sendSeparate from sampling interval and spectrum axes.
Failure retries3Driver policyAffects failed operations. A retry does not establish that a new source capture completed.
Read/write duty cycle3At least 1Gives reads an opportunity during sustained write contention; not a percentage.
Write priorityOffOn/offScheduling policy, not confirmation of completed spectrum collection.
Data formatABCDABCD/BADC/CDAB/DCBAUsed by ordinary values, file amplitude/phase, and configuration conversion. Dedicated spectrum samples have fixed big-endian fields; this setting cannot arbitrarily redefine their layout.
String byte reversalOffOn/offExchanges characters inside words for ordinary String access; not a waveform channel-order setting.

Under Plugin Properties, change framing to ModbusRtu for this serial example. Enter the source station, shown as 1. Function-specific batch limits apply to ordinary register operations, separately from file quantity.

C20 ModbusRtu framing, station 1, and ordinary batch limits

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

C20 runtime and ABCD data-format settings

Ordinary address fields follow the Modbus master field reference: area, zero-based offset, bit, station, write function, and five conversion overrides. Set read-only for input areas; register bits are 0–15 and bit areas reject suffixes. Write functions are 5/6/15/16 and String requires len= in bytes. Ordinary array length counts elements and does not set dedicated file length.

Select C20-RTU and add an ordinary variable under Real-time Variables. If the first holding register is signed 16-bit, enter name C20_HR0, address F=3;0, type Int16, read-only permission, and array length 0. Leave the special method empty.

C20 ordinary holding-register variable F=3;0 with Int16 type

Open Field Editor, select HoldingRegisters and start offset 0, and leave unused overrides unchecked. Confirm to fill the address back in and save. Enter dedicated file numbers and spectrum triggers in the dedicated forms below.

C20 ordinary address editor with holding area and zero-based offset

Addresses and special methods

Common addresses use 00001, 10001, 30001, and 40001. 40001;s=2; selects station 2 and 40001;w=16; selects FC16 for writes.

MethodPurposeParameters
ReadFileAsyncRetrieve waveform pointsExplicit station, file number fileAddress, offset within the file startAddress, and length in source-defined units. These are not 4xxxx register references. Returns amplitude, phase, and cycle for each parsed point.
ReadAtlasDatasAsyncRead statistics/configuration and trigger a spectrumaddress identifies the source-defined coil trigger. Returns amplitude, frequency count, total energy, raw samples, PRPD, and PRPS. Sends an FC05 trigger; confirm that source operation is permitted first.
ReadFrequencyDataAsyncRead amplitude, frequency count, and total energyUses the same spectrum coil address to locate six statistics registers, interpreted as three signed 32-bit values. Frequency count must not be relabeled Hz without the source definition.
ReadAtlasSettingAsyncRead three-channel calibrationThe form still requires a nonempty address. The current operation reads 96 holding registers from zero-based offset 1 at the device default station; the input does not select a different configuration block. Returns base, dB base, additional base, and sensor parameters, without a configuration-write operation.

If the source map defines channel 1’s trigger at zero-based coil 0x0202, enter decimal F=1;514 (traditional reference 00515). This is a trigger, not holding register 514. Its statistics start at holding offset 0x0300 (decimal 768) and occupy six registers for amplitude, frequency count, and energy. F=3;514 does not select that spectrum. Apply this example only to a matching source map.

Special methods return structured objects or point lists. Supply their actual parameters rather than configuring a single Float or using ordinary array length as method length. Verify interactively first. Shared method-call permission and variable configuration are covered in Collection Configuration.

Device debug

Open Development Configuration → Collection Configuration, select the Modbus C20 device, and open Protocol Debug at the top of the workspace. Dedicated file/spectrum operations supplement the common debug modules. Read Spectrum sends a source trigger write internally. Check frequency/configuration first and confirm the trigger is permitted before retrieving a full spectrum.

FeaturePurpose
File Area and WaveformStation defaults to 1 and the form accepts 1–255. File address and start address default to 0 and accept 0–65535; quantity defaults to 1 and accepts 1–8192. Input bounds do not establish device support. Obtain file numbers, length units, and maximum segments from its protocol.
Spectrum and FrequencyDevice address must be nonempty and at most 256 characters. Frequency, configuration, and spectrum buttons return different results.
Results and detailFile points show cycle, phase, and amplitude, with export of the complete current snapshot. Spectra show three-channel PRPD scatter and PRPS detail. Do not turn cycles/phases into a time axis without a known sampling rate.

Each file point uses signed 16-bit amplitude and an unsigned 16-bit phase counter: phase is counter modulo 360, cycle is integer division by 360. The valid response payload determines parsed point count; it need not equal the input quantity. A frequency count of zero can return statistics without a spectrum (isAtlas=false); inspect the source capture state before treating this as a connection failure.

After confirming an ordinary register read, open File Area and Waveform. Enter station, file number, offset within the file, and quantity, then click Read File. The displayed 1 / 0 / 0 / 1 are starting form values; use the file number and quantity units from the source map. Compare returned cycle, phase, and amplitude with the vendor tool.

C20 file and waveform form with station, file number, offset, and quantity

Switch to Spectrum and Frequency and enter the source-defined trigger address. For the zero-based coil 0x0202 example above, use F=1;514. Read frequency or configuration first; click Read Spectrum only when a capture trigger is permitted.

C20 spectrum form with F=1;514 and its three read operations

Verify the configuration

  1. Verify the station and channel with one common register read.
  2. Read a known file segment under File Area and Waveform.
  3. Read a device-defined address under Spectrum and Frequency and compare it with the vendor tool.

Troubleshooting

SymptomCheck
Common address failsChannel, framing, station, address, and data type.
Waveform is emptyFile address, start address, quantity, and device file state.
Spectrum read failsDevice address, current collection state, and C20 function support.
Serial device does not respondPort ownership, baud rate, parity, stop bits, and framing.