CONEX-LDS
Command Interface Manual
result, version, errString = LDS.VE(address)
if flag == 1:
if result == 0 :
print 'CONEX-LDS firmware version => ', version
else:
print 'VE Error => ',errString
return result, version
#*************************************************
# Procedure to get the laser status (GP Command)
#*************************************************
def CONEXLDS_GetPositionsAndLightLevel (LDS, address, flag):
# Get X, Y positions and light level Using GP Command
result, posX, posY, lightLevel, errString = LDS.GP(address)
if flag == 1:
if result == 0 :
print 'Position X => ', posX
print 'Position Y => ', posY
print 'Light level => ',lightLevel, "%"
else:
print 'GP Error => ',errString
return result, posX, posY, lightLevel
#*************************************************
# Procedure to get the laser status (LB? Command)
#*************************************************
def CONEXLDS_GetLaserStatus (LDS, address, flag):
result, laserStatus, errString = LDS.LB_Get(address)
if flag == 1:
if result == 0 :
print 'Laser status => ', laserStatus
else:
print 'LB_Get Error => ',errString
return result, laserStatus
#*************************************************
# Procedure to set the laser status (LB Command)
#*************************************************
def CONEXLDS_SetLaserStatus (LDS, address, laserStatus, flag):
result, errString = LDS.LB_Set(address, laserStatus)
if flag == 1:
if result != 0 :
print 'LB_Set Error => ',errString
return result
#*************************************************
# Main
#*************************************************
# Initialization
instrument="COM19"
displayFlag = 1
address = 1
# Create a CONEX-LDS interface and open communication.
LDS = CONEXLDS_Open(instrument)
# Get controller revision information
result, version = CONEXLDS_GetControllerVersion(LDS, address, displayFlag)
# Get laser status
result, iLaserStatus = CONEXLDS_GetLaserStatus(LDS, address, displayFlag)
if result == 0 :
# If the laser is OFF then turn the laser ON
EDH0333En1022 — 12/18
18
Содержание CONEX-LDS
Страница 1: ...CONEX LDS Electronic Autocollimator Command Interface Manual V1 0 x...
Страница 24: ......