Send Message
Sends a string to an In-Sight spreadsheet over a Native Mode connection, and optionally, triggers a spreadsheet Event.
Send Message Inputs
Syntax: SM"String"[Int]
Parameter | Description |
---|---|
Input | Description |
"String" | The string to set. The string must be enclosed with quotation marks. |
Int |
The Event code to set. This is an optional parameter.
|
Send Message Outputs
Returns a status code. The status codes are:
Status Codes | Description |
---|---|
1 | The command was executed successfully. |
0 | Unrecognized command. |
-1 | The number is either out of range (0 to 8) or not an integer. |
-2 | The command could not be executed. |
-6 | User does not have Full Access to execute the command. For more information, see User Access Settings Dialog. |
Example: Send a Text String
-
Assume cells A2 and A3 are populated as follows:
A2 = Event(80,0)
A3 = ReadMessage(A2)
The spreadsheet looks like this:
-
Place the sensor Online. Using the telnet client, issue the Send Message command, followed by the Set Event command. The command to send the string "Test" is SM"Test". The command to trigger Event 0 (Soft 0) is: SE0.
The ReadMessage function in cell A3 displays "Test".
Example: Send a String and Trigger a Spreadsheet Event
-
Assume cells A2 and A3 are populated as follows:
A2 = Event(80,0)
A3 = ReadMessage(A2)
The spreadsheet looks like this:
-
Place the sensor Online. Using the telnet client, issue the Send Message command to the In-Sight sensor. The command to send the string "Test" and trigger Event 0 (Soft 0) is: SM"Test"0.
-
Take the sensor Offline. The ReadMessage function in cell A3 displays "Test".