Skip to main content
Version: 8.1

SECS/GEM Simulator

Overview​

The SECS/GEM Module includes the capability to add and configure equipment simulators. Equipment simulators include basic functionality and have the ability to handle and respond to a number of SECS messages. You can add status variables, equipment constants, reports and collection events to a simulator, allowing you to model a simulator after an existing tool. You can also add hard-coded responses to messages that do not exist in the simulator. These functions allow the simulator to act as a stand-in for tools that do not provide any type of emulator, or only provide one at great cost.

Simulator SDL File​

A simulator is driven from data in its SDL file. This file is the same format as the SDL file used for equipment connections, but it also defines variables, reports, collection events, and hard-coded responses. The simulator SDL file is read when a simulator is started.

You can modify the simulator SDL file within the Gateway. Navigate to Configuration area and click on the SECS/GEM Simulator link. Click on the "sim variables" link next to the simulator you want to modify. The SDL file will be displayed in a tree, allowing you to br /owse its contents. You can change individual values on an object in the tree. Click the "Save SDL File" button at the top to save any changes you made. You can also click the "Edit Raw SDL File" link to edit the text of SDL file directly. This can be handy when you need to change several objects at once, or see a full view of the SDL file. Click the "Save SDL File" button at the top to save any changes you made. Don't forget to restart the simulator and its equipment connection after you made changes to the SDL file.

Simulator SDL Utilities​

Modifying the simulator SDL file works well for small adjustments, but attempting to create variables, reports and collection events from scratch directly within the SDL file is extremely painful. To eliminate this pain, the Simulator Variables page has a number of utilities that can automate the creation of these objects. Note that after these objects are created, you will still need to modify the simulator SDL file directly to modify or delete the objects.

Default Messages​

By default, the Simulator can respond to the following requests.

  • S1F1 - Are You Online
  • S1F3 - Selected Equipment Status Request
  • S1F11 - Status Variable Namelist Request
  • S1F13 - Establish Communications Request
  • S1F15 - Request OFF-LINE
  • S1F17 - Request ON-LINE
  • S2F13 - Equipment Constant Request
  • S2F15 - New Equipment Constant Send
  • S2F17 - Data and Time Request
  • S2F23 - Trace Initialize Send
  • S2F29 - Equipment Constant Namelist Request
  • S2F31 - Date and Time Set Request
  • S2F33 - Define Report

While the SDL can be modified, note that the Simulator can only respond to the requests listed above: you can add new messages to the simulator's SDL, like S999F1 and S999F2, but the Simulator by default will not respond to any requests using S999F1. If you wish to add new responses, you can create an Echo Response to simulate a response to any request not listed above. See the Echo Response section for more details.

The simulator implements the Communications State Model and the Control State Model from the GEM standard (SEMI E30). For example, sending an S1F15 message to a simulator will cause the simulator to move to the OFF-LINE state and will thereafter respond to most messages with S1F0. Sending an S1F17 message to the simulator will move it back into an online state. When control states change, an S6F11 report message is sent with the updated control state. The default startup control states are defined in the simulator SDL file.

Configuring a Simulator​

The following section details how to configure a SECS/GEM simulator.

  1. Navigate to the SECS/GEM Simulator page:

    • From the Configure section of the Gateway webpage, scroll down the list of links on the left until you see the SECS/GEM section. click on the Simulator link.
    • Alternatively, use the search bar located in the upper left corner of any page on the Gateway, and search for simulator.

      " "
  2. Once on the Simulators page, click on the Create New Simulator link.

  3. From here we can create a new simulator. In the very least, you will need to specify a name for the simulator.

  4. If this is the first SECS/GEM simulator device connection, then you can use the default values for the rest of the properties and skip to the next step.

    Subsequent simulators require a different port: two simulators cannot run on the same port. Note that there are multiple port properties.

    • If the Connection Mode is set to Active, then the simulator will use the Active Port.
    • If the Connection Mode is set to Passive, then the simulator will use the Passive Port.
    • If the Connection Mode is set to Alternating, then the simulator will try to use either the Active Port or Passive Port. As the name implies, the connection will attempt to alternate between the Active and Passive settings until a connection is established.
  5. Click on the Create New Simulator button to save your configuration and create the simulator device. You will see the Simulators page again.

  6. The simulator status will toggle between "Connecting..." and "Not Connected" until you create an equipment connection that connects to the simulator's IP address and port. Once the Equipment Connection is established, the simulator will report a status of "Communicating". You can then run SECS/GEM commands against the simulator's equipment connection and receive responses.

Simulator Properties​

When configuring a simulator, there are a number of properties that can be configured.

Property NameDescriptionDefault
Simulator NameName of the simulator.
Simulator DescriptionA description of the simulator.
EnabledWhether the simulator is enabled or disabled. A disabled simulator will prevent communication with the Equipment Connection.TRUE
Active IP AddressIP Address of Equipment Connection to connect to. Used when simulator is in Active mode.localhost
Active PortThe Port number of the Equipment Connection to connect to when simulator is in Active mode. When using multiple simulators, the port numbers need to be unique.5000
Passive IP AddressIP Address of Ignition that the Equipment Connection will connect to when the simulator is in Passive mode.localhost
Passive PortPort number that the Equipment Connection wil connect to when the simulator is in Passive mode. When using multiple simulators, the port numbers need to be unique.5000
Device IDUnique identifier of equipment. Must be an integer.0
Connection ModeMethod used to connect.
  • ACTIVE- Will attempt to connect to the equipment at the given Active IP Address and Active Port.
  • PASSIVE - Will listen for a connection from the equipment at the given Passive IP Address and Passive Port.
  • ALTERNATING - Will switch between Active mode and Passive mode until a connection is made.
PAS

Advanced Properties​

Property NameDescriptionDefault
T3 Reply TimeoutSpecifies the seconds that the simulator will wait for an expected SECS message reply.45
T5 Connect Separation TimeoutSpecifies the seconds which must elapse between successive attempts to connect to an Equipment Connection after disconnection.10
T6 Control Transaction TimeoutSpecifies the seconds which a control transaction (such as LinkTest or Select) may remain open before it is considered a communications failure.5
T7 Not Selected TimeoutSeconds which a TCP/IP connection can remain in NOT SELECTED state (i.e., no HSMS activity) before it is considered a communciations failure. This timeout is only used in Passive mode.10
T8 Network Intercharacter TimeoutMaximum seconds between successive bytes of a single HSMS message which may expire before it is considered a communications failure. This applies to HSMS messages received from an Equipment Connection.5