Skip to main content

SecsSerialMaster

Purpose

SecsSerialMaster exchanges SECS-I half-duplex transactions, reassembles multi-block messages, and receives active device messages.

Open the plugin

Enter "Development Configuration → Collection Configuration", create a device and select "SecsSerialMaster" in "Collection Plugin".

Supported channels and data types

Channel typePre-configuration check
Serial PortConfirm that the serial port is not occupied by other programs and maintains the same baud rate, data bits, stop bits and parity bits as the device.
TCP ClientConfirm network reachability of the device IP, port, and gateway to the device.

Optional data types: Boolean, Byte, Int16, UInt16, Int32, UInt32, Int64, UInt64, Float, Double, String

Plugin properties

Protocol parameters

SettingDescription
Device identificationDefault: 0; Range: 0~32767; Fill in: text input. Set the device ID used for protocol communication.
Byte interval T1Default: 10000; Range: 1~2147483647; Fill in: digital input. Set the byte interval T1 used for protocol communication.
Line response T2Default: 5000; Range: 1~2147483647; Fill in: digital input. Sets the line response T2 used for protocol communication.
Multi-block interval T4Default: 10000; Range: 1~2147483647; Fill in: digital input. Sets the multi-block interval T4 used for protocol communications.
Collision priorityDefault: 0; fill in: drop-down selection. Sets the collision priority used for protocol communication.

Running parameters

SettingDescription
NAK retry timesDefault: 3; Range: 0~10; Fill in: number input. Sets the number of NAK retries used by the plugin when running.

Address rules

  • Address Description
  • s=1;f=3;w; send main message and wait for S1F4
  • s=6;f=11; Subscription device active S6F11
  • s=1;f=13;w;<List Length="0" /> carries SECS-II XML data

Special methods

MethodPurposeParameters
ExchangeMessageAsyncExchange SECS-I messagesaddress=s=1;f=3;w;

Functions

FunctionPurpose
Message inputEnter s=, f=, optional w, and optional SECS-II XML data.
Message exchangeSend a primary message and wait for its secondary message when w is present.
ResultShow the returned message, transaction result, or line error.

Device debug

Enter "Development Configuration → Collection Configuration", select the current device and click "More Functions", then open "Debug".

Dedicated debugging page

The protocol debug page accepts one complete SECS-I address and message description and performs one exchange.

SecsSerialMaster debug subpage 1

Debugging notes

Verify the exchange first with test SECS-I text or hexadecimal content; message sending requires write permission and secondary confirmation.

Verify the configuration

  1. Ask the equipment supplier for one read-only test message, such as the supported s=1;f=3;w; query.
  2. Run the exchange and confirm the expected secondary message, for example S1F4. Check the device ID and returned structure.
  3. When sending SECS-II XML, validate the item types and nesting on a test device first.
  4. For active-message variables, use the actual S/F address and trigger one test event to confirm the variable update.
  5. Do not send an S/F message with unconfirmed meaning to a production device.

Troubleshooting

  • Message exchange times out: Check device ID, S/F, w, and T1, T2, T3, and T4 timers.
  • NAK is frequent: Check serial settings, parity, block boundaries, retry count, and line quality.
  • Multi-block message cannot be reassembled: Check T4 and link stability, then inspect block sequence and checksum errors.
  • Simultaneous sends fail: Make the collision-priority setting match the equipment agreement.
  • SECS-II parsing fails: Check item type, length, and nesting; reduce the message to the smallest valid form.
  • The serial port device does not respond: Confirm that the port is not occupied and that baud rate, data bits, stop bits, and parity match.