CONEX-LDS
Command Interface Manual
3.0
Python example
#=========================================================================
# Newport Proprietary and Confidential Newport Corporation @2012
#
# No part of this file in any format, with or without modification
# shall be used, copied or distributed without the express written
# consent of Newport Corporation.
#
# Description: This is a Python Script to access CONEX-LDS library
#=========================================================================
=
# Initialization Start
# The script within Initialization Start and Initialization End is needed
for
# properly initializing Command Interface for Conex-LDS instrument.
# The user should copy this code as is and specify correct paths here.
import sys
# Command Interface DLL can be found here.
print "Adding location of Newport.CONEXLDS.CommandInterface.dll to
sys.path"
sys.path.append(r'C:\Program Files\Newport\MotionControl\CONEX-LDS\Bin')
# The CLR module provide functions for interacting with the underlying
# .NET runtime
import clr
# Add reference to assembly and import names from namespace
clr.AddReferenceToFile("Newport.CONEXLDS.CommandInterface.dll")
from CommandInterfaceConexLDS import *
import System
#=========================================================================
# Constant
ON = 1
OFF = 0
#*************************************************
# Procedure to open communication with instrument.
#*************************************************
def CONEXLDS_Open (instrumentKey):
# Create a CONEX-LDS instance
LDS = ConexLDS()
print 'Instrument Key=>', instrumentKey
ret = LDS.OpenInstrument(instrumentKey)
print 'OpenInstrument => ', ret
return LDS
#*************************************************
# Procedure to close communication.
#*************************************************
def CONEXLDS_Close(LDS):
LDS.CloseInstrument()
#*************************************************
# Procedure to get the controller version (VE)
#*************************************************
def CONEXLDS_GetControllerVersion (LDS, address, flag):
17
EDH0333En1022 — 12/18
Содержание CONEX-LDS
Страница 1: ...CONEX LDS Electronic Autocollimator Command Interface Manual V1 0 x...
Страница 24: ......