HXP
Command Interface Manual
# Get object list
'---------------- Object list ----------------'
result, response, errString = hxp.ObjectsListGet()
objectList = response.split(
';'
)
nbObjects = len(objectList)
if
result ==
0
:
for
i
in
range(nbObjects):
i+
1
,
') '
, objectList[i]
else
:
'Error=>'
, result,
" : "
, errString
# Get GPIO analog gain
'------------ GPIO analog gain ---------------'
from
System
import
Array
strGpioArray = Array[str]([
'GPIO2.ADC1'
,
'GPIO2.ADC2'
,
'GPIO2.ADC3'
])
nbItems = len(strGpioArray)
result, responseArray, errString = hxp.GPIOAnalogGainGet(strGpioArray)
if
result ==
0
:
for
i
in
range(nbItems):
i+
1
,
') Analog Gain '
, strGpioArray[i],
" = "
,
responseArray[i]
else
:
'Error=>'
, result,
" : "
,
errString
# Get Controller Status
'------------ Controller Status --------------'
result, response, errString = hxp.ControllerStatusGet()
if
result ==
0
:
'Controller Status=>'
, response
else
:
'Error=> '
, result,
" : HXP error ",
errString
'--------------- End of script ---------------'
# unregister TCP IP server
hxp.
CloseInstrument();
95
EDH0318En1042 — 12/18