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
bankOset=11
bank = 2 # LVDT Bank (Sub-Unit) number
#Input Switches
error=card.OpBit(switchSub,((bank-1)*bankOset)+1, True)
error=card.OpBit(switchSub,((bank-1)*bankOset)+2, True)
error=card.OpBit(switchSub,((bank-1)*bankOset)+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)*bankOset)+5,True)
error=card.OpBit(switchSub,((bank-1)*bankOset)+6,True)
error=card.OpBit(switchSub,((bank-1)*bankOset)+8,True)
error=card.OpBit(switchSub,((bank-1)*bankOset)+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.00to180.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()