You are here: Technical References > Remote Access to PLC Variables > HTTP Interface for Reading PLC Variables > HTTP Response — JSON Format

HTTP Response — JSON Format

{
“<var1>” : { “value” : “<value1>”, “errorstatus”: “<errorstatus1>”},
“<var2>” : { “value” : “<value2>”, “errorstatus”: “<errorstatus2>”},
“<var3>” : { “value” : “<value3>”, “errorstatus”: “<errorstatus3>”},
[…]
}

JSON parameter values:

Error Status Description
<var1>,<var2>,< var3>,… The PLC"Programmable Logic Controller" A Programmable Logic Controller, PLC, or Programmable Controller is a digital computer used for automation of industrial processes, such as control of machinery on factory assembly lines. Used to synchronize the flow of inputs from (physical) sensors and events with the flow of outputs to actuators and events variable names
<value1>,<value2>,<value3>,... The values of the corresponding variables above
<errorstatus1>,<errorstatus2>,<errorstatus3>,... The error status (as described below)

Error Status:

Error status returned from the server while reading a variable informs the user about any error that has occurred on reading a particular variable.

The following error status strings can be returned by the server:

Error Status Description
ok Variable value read successfully
not found The requested variable is not found in the application.

Example:

HTTP Command

GET kas/plcvariables?variables=TravelSpeed,IntegerVar,UntitledST.LocalVariable&format=json

Response

{
"MachineSpeed" : {"errorstatus" : "ok", "value" : "100.000000"},
" IntegerVar " : {"errorstatus " : "ok","value" : "20"},
“UntitledST.LocalVariable” : {"errorstatus " : "not found","value" : "”},
}

 


Stay Connected with Kollmorgen

Copyright © 2015 Kollmorgen™