EasyManua.ls Logo

Pickering 41-670 - Python Programming Example

Pickering 41-670
62 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SECTION 4 - PROGRAMMING GUIDE
Page 4.23
PXI/PXIe LVDT/RVDT/Resolver Simulator Module 41/43-670
pickering
Python Example Code
switchSub = 5 #Switch Sub-unit
bankOset=11
bank = 2 # LVDT Bank (Sub-Unit) number
#Input Switches
error=card.OpBit(switchSub,((bank-1)*bankOset)+1, True)
error=card.OpBit(switchSub,((bank-1)*bankOset)+2, True)
error=card.OpBit(switchSub,((bank-1)*bankOset)+3, True)
if error:
# This function will take an error code and return a string description of
the error
err, errorString = card.ErrorMessage(error)
print(“Error: “, errorString)
exit()
#Output Switches
error=card.OpBit(switchSub,((bank-1)*bankOset)+5,True)
error=card.OpBit(switchSub,((bank-1)*bankOset)+6,True)
error=card.OpBit(switchSub,((bank-1)*bankOset)+8,True)
error=card.OpBit(switchSub,((bank-1)*bankOset)+9,True)
mode = card.DM_MODE[“RESOLVER”] # Setting Resolver Mode
error = card.VDTSetMode(bank,mode)
if error:
# This function will take an error code and return a string description of
the error
err, errorString = card.ErrorMessage(error)
print(“Error: “, errorString)
exit()
#Set position
position = -156.25#Between-180.00to180.00
error = card.ResolverSetPosition(bank, position)
if error:
# This function will take an error code and return a string description of
the error
err, errorString = card.ErrorMessage(error)
print(“Error: “, errorString)
exit()

Related product manuals