Commands and Formats
Commands are sent from the client to the sensor. The commands are not case sensitive. However, the readprop command's metrics path argument is case sensitive.
The command format is:
<COMMAND><DELIMITER><PARAMETER><TERMINATION>
If a command has more than one parameter, each parameter is separated by the delimiter.
Similarly, the reply has the following format:
<STATUS><DELIMITER><OPTIONAL RESULTS><DELIMITER>
The status can either be "OK" or "ERROR". The optional results can be relevant data for the command if successful, or a text based error message if the operation failed. If there is more than one data item, each item is separated by the delimiter.
You can change the delimiter and termination characters in the Special Character settings in the GoPxL interface. For more information, see Ethernet ASCII Protocol.
Measurement IDs come from the ID field in the connection map. Be sure to add measurements to the connection map and make note of the IDs of the measurements you need to add to the data format. |
Ethernet ASCII client commands
Command |
Arguments |
Description |
---|---|---|
start | - | Starts the sensor. |
stop | - | Stops the sensor. |
trigger | - | Software Trigger. |
loadjob | Job name |
Load the specified job file. |
result | - | Return the measurement data specified in the custom format string. |
One or more measurement ids, separated by command delimiter. |
Return the measurement data for each measurement id in the following format string: M[ID],V[VALUE],D[DECISION],... Example: result,0,1 Output: OK,M0,V-5000,D0,M1,V5000,D1 |
|
measurement | One or more measurement ids, separated by command delimiter. |
Return the measurement data for each measurement id in the following format string: M[ID],V[VALUE],D[DECISION],... Example: measurement,0,1 Output: OK,M0,V-5000,D0,M1,V5000,D1 |
value | One or more measurement ids, separated by command delimiter. |
Return the measurement value for each measurement id in the following format string: M[ID],V[VALUE],... Example: value,0,1 Output: OK,M0,V-5000,M1,V5000 |
decision | One or more measurement ids, separated by command delimiter. |
Return the measurement decision for each measurement id in the following format string: M[ID],D[DECISION],... Example: decision,0,1 Output: OK,M0,D0,M1,D1 |
stamp
|
- |
Return the time, encoder and frame index stamp values for the first stamp id found. Order of values returned is: Time, Encoder, Frame. Example: stamp Output: OK,Time,381497381349,Encoder,0,Frame,18, |
One or more of these arguments in any order, separated by the command delimiter: "time" "encoder" "frame" |
Return the specified stamp value(s) in the order of the provided arguments. Example: stamp,time,frame Output: OK,381497381349,18 |
|
A stamp ID. |
Return the time, encoder, and frame index stamp values for the passed stamp ID. Example: stamp,1 |
|
time | One or more stamp ids, separated by command delimiter. |
Return the time stamp value for each stamp id. Example: time,1 Output: OK,381497381349 |
encoder | One or more stamp ids, separated by command delimiter. |
Return the encoder stamp value for each stamp id. Example: encoder,1 Output: OK,0 |
frame | One or more stamp ids, separated by command delimiter. |
Return the frame index stamp value for each stamp id. Example: frame,1 Output: OK,18 |
align | - | Performs the alignment operation. |
clearalign | - | Clears sensor alignment. |
readprop | One or more string representing a resource whose property to return, separated by command delimiter. |
Return the resource JSON object specified by the resource path. It is possible to use JSON pointer to retrieve a specific value within the JSON document.
Example #1: readprop,/system Output:
OK,{"_links":{"self":{"href":"/system"}},"_schema":
Example #2: readprop,/system#/runState,/system#/autoStart Output: OK,1, true |
The following lists the possible errors for each command.
Command |
Arguments |
Description |
---|---|---|
start | ERROR,Could not start the sensor | |
stop | ERROR,Could not stop the sensor | |
trigger | ERROR,Could not trigger | |
loadjob | ERROR,Job name required. | Job name has to be provided as a command argument. |
ERROR,Failed to load job <job name>.job | ||
result | ERROR,There is no measurement data to output. Please confirm that the sensor is running | Could not find any measurements. Make sure protocol's connection map is not empty and the sensor is running. |
ERROR,Invalid parameter. Please verify your input | Provided command argument was invalid. It must be a number. | |
ERROR,Specified measurement ID not found. Please verify your input | Could not find a measurement data for specified ID. | |
ERROR,The custom format string is not valid. Please verify your input | Custom format string is invalid. | |
measurement | ERROR,One or more measurement id must be provided | Measurement ID has to be provided as an argument. |
ERROR,There is no measurement data to output. Please confirm that the sensor is running | Could not find any measurements. Make sure protocol's connection map is not empty and the sensor is running. | |
ERROR,Invalid parameter. Please verify your input | Provided command argument was invalid. It must be a number. | |
ERROR,Specified measurement ID not found. Please verify your input | Could not find a measurement data for specified ID. | |
value | ERROR,One or more measurement id must be provided | Measurement ID must be provided as an argument. |
ERROR,Invalid parameter. Please verify your input | Provided command argument was invalid. It must be a number. | |
ERROR,Measurement with ID not found. | Could not find a measurement data for specified ID. | |
decision | ERROR,One or more measurement id must be provided | Measurement ID must be provided as an argument. |
ERROR,Invalid parameter. Please verify your input | Provided command argument was invalid. It must be a number. | |
ERROR,Measurement with ID not found. | Could not find a measurement data for specified ID. | |
stamp | ERROR,Invalid stamp command format | Invalid command arguments. |
ERROR,One or more stamp id must be provided | Stamp ID must be provided as an argument. | |
ERROR,Invalid parameter. Please verify your input | Provided stamp ID was invalid. It must be a number. | |
ERROR,Stamp with ID not found | Could not find a stamp data for specified ID. | |
time | ERROR,One or more stamp id must be provided | Stamp ID must be provided as an argument. |
ERROR,Invalid parameter. Please verify your input | Provided stamp ID was invalid. It must be a number. | |
ERROR,Stamp with ID not found | Could not find a measurement data for specified ID. | |
encoder | ERROR,One or more stamp id must be provided | Stamp ID must be provided as an argument. |
ERROR,Invalid parameter. Please verify your input | Provided stamp ID was invalid. It must be a number. | |
ERROR,Stamp with ID not found | Could not find a measurement data for specified ID. | |
frame | ERROR,One or more stamp id must be provided | Stamp ID must be provided as an argument. |
ERROR,Invalid parameter. Please verify your input | Provided stamp ID was invalid. It must be a number. | |
ERROR,Stamp with ID not found | Could not find a measurement data for specified ID. | |
align | ERROR,Could not align | |
clearalign | ERROR,Could not clear alignment | |
readprop | ERROR,String representing a resource must be provided | Resource path must be provided as an argument. |
ERROR,Could not read property |
Resource may not exist. |
Data Output Format Mode
Polling Mode
Polled data output is displayed using the custom format. You can modify this format in the GoPxL interface. For more information, see Ethernet ASCII Protocol. Because polling mode is always available, even when asynchronous output is enabled, you can always modify the custom format.
Format Mode |
Description |
---|---|
Custom |
This format can be changed/edited by the user. The default format is: %time, %value[0] %decision[0] |
Asynchronous Mode
When asynchronous output mode is enabled, the data output can be in one of three formats:
Format Mode |
Description |
---|---|
Standard |
This is a pre-defined format that cannot be changed: M[id],V%value[id],D%decision[id],... |
Standard with Stamp |
The format is the Standard format pre-pended with the time and encoder information. This is a pre-defined format that cannot be changed: T%time,E%encoder,M[id],V%value[id],D%decision[id],.. |
Custom |
This format is the same as the format used by polling mode. You can change this in the GoPxL interface. For more information, see Ethernet ASCII Protocol. Default format: %time, %value[0] %decision[0] |
Measurement Output Format
Field |
Type |
Address offset | Description |
---|---|---|---|
Value | 32s | 0 |
Measurement value. This value is the actual measurement value multiplied by 1000. If the measurement value is invalid, the string "INVALID" is the output for the measurement value. |
Decision | 8u | 4 |
Measurement decision. Bit 0: 0 = Fail1 = PassBit 1: 0 = Decision value is valid1 = Decision value is invalid |