On this page
SECS HSMS
SECS HSMS exchanges SECS/GEM messages over HSMS, handles transactions, and receives active device messages.
Compatible devices and models
| Device series / model examples | Connection requirements |
|---|---|
| Semiconductor equipment exposing an HSMS listener | The gateway TCP client connects to the equipment listener. Match Session ID, stream/function and Item structure; configure events and commands from its GEM definitions. |
Configure HSMS Passive and obtain the message dictionary
- Enable the equipment HSMS listener and record IP, TCP port and Session ID. This plugin uses a TCP client to initiate the connection; two active endpoints do not form its required connection.
- Obtain the equipment S/F, W-bit and SECS-II Item definitions. An SVID encoded as UInt16 differs from the same number encoded as UInt32.
- Create the gateway TCP client, match Session ID, then complete Select and Linktest. HSMS Selected does not establish GEM communication or OnlineRemote.
- Start with String for SECS-II response text. If supported by the equipment,
s=1;f=3;w;<List Length="0" />requests all status values and waits for the matching S1F4. Encode explicit SVIDs according to the equipment dictionary.
Queries and incoming messages differ
An address with w sends a primary message and waits for its secondary. s=6;f=11; without w receives incoming S6F11; it does not define reports, link events or enable reporting on the equipment.
T3 covers data replies, T6 control transactions, T7 the unselected connection and T8 fragmented-message reception. Adjust the timeout for the failing layer. Recipe paths are relative to the equipment directory on the gateway backend, not browser-computer absolute paths.
Open the plugin
Enter “Development Configuration → Collection Configuration”, create a device and select “SECS HSMS” in “Device Plugin”.
Supported channels and data types
| Channel type | Pre-configuration check |
|---|---|
| TCP Client | Confirm 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
This list describes types allowed by the plugin editor. Address width, arrays, string length and read/write restrictions still follow this page; it does not mean that every address supports every type.
Plugin properties
Protocol parameters
| Setting | Description |
|---|---|
| Session ID | Default 0; range 0–65534. Match the equipment HSMS Session ID; 65535 is reserved for control messages. |
Running parameters
| Setting | Description |
|---|---|
| Data Transaction T3 (ms) | Default 45000; range 1–65535. Maximum wait for a data transaction reply. |
| Control Transaction T6 (ms) | Default 5000; range 1–2147483647. Maximum wait for a control transaction reply. |
| Unselected Connection T7 (ms) | Default 10000; range 1–2147483647. Maximum time a connection may remain unselected after it is established. |
| Fragment Receive T8 (ms) | Default 5000; range 1–2147483647. Maximum wait for the next network fragment of one HSMS message. |
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
| Method | Purpose | Parameters |
|---|---|---|
| TestLinkAsync | Perform link test | No parameters |
| ExchangeMessageAsync | Exchange SECS-II messages | address=s=1;f=3;w; |
| ReadStatusVariableNamesAsync | Read GEM status variable names | statusVariableIds=1,2,3 |
Finite GEM operations
Set the device’s GEM device profile JSON before starting it. An empty profile keeps raw message exchange available. Use the manual for the actual model and firmware or its verified point list to provide Source, Revision, status types, Local/Remote codes, report value order, event links, and allowed commands. Field and enum names are case sensitive; unknown or duplicate fields and invalid limits reject startup.
This example shows the format. Replace every SVID, DVID, RPTID, CEID and state code with values confirmed by the equipment documentation:
{
"Source": "Equipment model and protocol manual",
"Revision": "Firmware or point-list revision",
"Variables": {
"control": { "Id": { "Type": "UInt32", "Value": "1002" }, "Kind": "Status", "Type": "Binary" },
"temperature": { "Id": { "Type": "UInt32", "Value": "10" }, "Kind": "Data", "Type": "Single" }
},
"Control": { "Variable": "control", "OfflineValues": [1, 2, 3], "LocalValue": 4, "RemoteValue": 5 },
"Reports": { "sample": { "Id": { "Type": "UInt32", "Value": "100" }, "Variables": ["temperature"] } },
"Events": { "changed": { "Id": { "Type": "UInt32", "Value": "50" }, "Reports": ["sample"] } },
"Commands": { "START": { "Parameters": { "PPID": "ASCII" } } },
"OperationTimeoutMilliseconds": 60000
}Use device method calls to establish GEM communication, request online state, and refresh control state. HSMS selection confirms transport readiness; online acceptance confirms the request was accepted. Report configuration, remote commands and recipe writes require the actual status variable to confirm OnlineRemote.
| Method | Purpose |
|---|---|
| GetGemStateAsync / RefreshGemControlStateAsync | Read confirmed state for this connection, or query the equipment’s current control state. |
| EstablishGemCommunicationAsync / SetGemOnlineAsync | Establish business communication, or request online/offline using online. |
| ConfigureGemReportsAsync | Define, link and enable the configured reports; stop at the first rejected stage. |
| SetGemEventsEnabledAsync | Enable or disable events configured in this connection using enabled. |
| RemoveGemReportsAsync / DeleteGemReportDefinitionsAsync | Remove configured report relationships, or remove definitions left by a partially completed configuration. |
| GetGemReportsAsync | Read recent bounded reports for this connection; this list is not a historical archive. |
| ExecuteGemCommandAsync | Send an allowed command and its parametersJson object; return the original acknowledgement and parameter rejection details. |
S6F11 validates the event, report, value order and exact data types against the profile. A valid first report can update variables subscribed to s=6;f=11;; duplicates are acknowledged once more without publishing, and invalid reports are rejected without updating variables. Diagnostics retain at most 64 batches with a combined raw payload budget of 1 MiB. Disconnect clears communication, control and report state. Reconnection does not replay online requests, report configuration or commands.
An acknowledgement of acceptance for later execution returns Accepted=true and ExecutionCompleted=false. Confirm completion using subsequent equipment state or a completion event. With a profile configured, raw entry points cannot bypass these methods for managed online, report, command or recipe messages.
Recipe files
To enable recipes, add this Recipes property to the same profile:
"Recipes": {
"AllowedNames": ["recipe-a", "recipe-b"],
"BodyType": "Binary",
"MaxBodyBytes": 65536,
"MaxDirectoryEntries": 128,
"AllowUpload": false,
"AllowDelete": false
}This is one property of the profile. Supported bodies are Binary and ASCII, limited to 1 MiB per recipe. The directory limit cannot exceed 1024 entries. Omitting Recipes disables recipe operations; upload and deletion each require their own permission flag.
Recipe directory defaults to ProtocolFiles/SECS/Devices/{DeviceId} under the backend data root, with the device ID substituted automatically. Method parameters accept only forward-slash relative file names within that configured directory. Absolute paths, parent traversal and linked directories are rejected.
| Method | Parameters and behavior |
|---|---|
| GetGemRecipeNamesAsync | Query the equipment’s directory and return only allowed names. |
| DownloadGemRecipeAsync | name, relativePath, overwriteLocal=false; publish one local file after the complete transfer and renewed connection and authorization checks. |
| UploadGemRecipeAsync | name, relativePath, replaceExisting=false; read the backend file, obtain equipment loading permission, then send the body. |
| DeleteGemRecipeAsync | name; delete one explicitly allowed recipe. |
Replacement never deletes first. A rejected loading permission prevents transmission of the body. Results contain body length, SHA-256 and the equipment acknowledgement, without the recipe body. Loss of the acknowledgement after a write returns OutcomeUnknown=true; check the equipment directory and content before deciding the next action. Do not blindly replay a timed-out write.
Device debug
Enter “Development Configuration → Collection Configuration”, select the current device then open “Protocol Debug” at the top of the workspace.
Dedicated debugging page
The protocol debug page provides link and message operations and status-variable queries.


Debugging notes
Test the HSMS/SECS-II link first; message exchange requires write permission and secondary confirmation, SVID query remains read-only.
Functions
| Function | Purpose |
|---|---|
| Linktest | Run an HSMS Linktest to confirm that the session is available without sending a business-control message. |
| Message exchange | Send an S/F message with optional SECS-II data; wait for the secondary message when w is present. |
| Status-variable names | Query GEM status-variable names by SVID list. |
| Active-message monitoring | Check that configured S/F variables update when the equipment reports an event. |
Edit messages and GEM commands by field
Use Edit fields beside the message in Link and messages to maintain S/F, wait-for-reply, and SECS-II data under the device’s message rules. Confirm and fill back before exchange; pending fields prevent sending. Cancelling discards the message draft. Serial SECS-I message exchange uses the same workflow.
For a GEM remote command in Special methods, choose a permitted command first, then open its parameter field editor. Parameter names and SECS types come from that command’s equipment profile. Recheck fields after changing commands and preserve complete 64-bit integer text. This edits the command payload without changing the GEM profile. OnlineRemote, method authorization, and confirmation still apply.

Verify the configuration
- Run Linktest and confirm that the HSMS session is available.
- Enter approved test SVIDs such as
1,2,3, read their names, and compare them with the equipment documentation. - Exchange a message with a confirmed read-only meaning and verify the expected S/F secondary message.
- For active-message variables, trigger one approved test event and confirm that the matching S/F address updates.
- Do not send a business message whose meaning has not been confirmed to a production device.
Troubleshooting
- Linktest fails: Check TCP address, port, session ID, and HSMS Select state.
- The connection drops soon after it opens: Check T6, T7, and T8 timeout settings.
- SVID query fails: Confirm that the equipment is in communication state, the SVID exists, and GEM permissions allow the query.
- Message exchange times out: Check S/F, the
wflag, T3 transaction timeout, and whether the equipment should return a secondary message. - Active message does not update a variable: Check the S/F address, session ID, and message log.
Related links
- Collection configuration: View channel, device and common variable configuration.
- Plugin Index: Find other collection or data-forward plugins.