You're currently browsing the Ignition 8.0 docs. Click here to view the latest docs.

This function is used in Python Scripting.


Sends a JSON-formatted SECS message to a tool. An equipment connection must be configured for the tool in the Gateway.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.


system.secsgem.sendRequest(streamFunction, reply, body, equipment)

  • Parameters

String streamFunction - The stream and function of the SECS message to send. Example: "S1F13"

Boolean reply - Whether or not the SECS message expects a reply message.

Object body - This contains the body of a SECS message. The argument can be a Python Object or JSON string representing the body of a SECS message. If this argument is a string then it will be converted to a Python Object using the system.util.jsonDecode function.

String equipment - Name of the equipment connection to use.

  • Returns

Integer - The transactionID of the SECS message response.

  • Scope

Gateway, Vision Client, Perspective Session

Code Examples
Code Snippet - Sending a S1F1 Message
# Replace the string below with the equipment name you want to send the request to.
myEquipment = "EquipmentOne"

# Define the contents of the body. We're using an empty string, since S1F1 doesn't expect a body, and we need to define something (Python's None will result in an exception).
body = ""

# Store the returned transactionID in a variable. This script could be extended by using system.secsgem.getResponse to view the response. 
transactionID = system.secsgem.sendRequest("S1F1", True, body, myEquipment)


system secsgem sendRequest, secsgem.sendRequest

  • No labels