Function Library
•
107
6.19 Position Compare Control
@ Name
_8132_Get_CompCnt – Get counter value from comparator
_8132_Set_CompCnt – Set counter value in comparator
_8132_Set_CompMode – Set compare mode
_8132_Set_CompData – Set comparator value
_8132_Get_CompData – Get current comparator value
_8132_Set_CompInt – Enable comparator Interrupt
_8132_Set_CompHome – Set comparator origin
_8132_Get_CompSts – Get comparator status
_8132_Build_Comp_Table – Build compare table
_8132_Set_Comp_Table – Enable/Disable compare table
_8132_Build_Comp_Function – Build a linear compare table by a
function
@ Description
_8132_Get_CompCnt /_8132_Set_CompCnt:
Read or write the counter value in FPGA comparator on PCI-8132.
_8132_Set_CompData / _8132_Get_CompData:
Read or write the current value for position compare
_8132_Set_CompMode :
Set position compare rule for one axis. User can choose the compare
direction from this function
_8132_Set_CompInt:
Enable/dis able the comparator interrupt. If user uses a compare table
for “on the fly compare”, the comparator interrupt must be enabled.
Interrupt will trigger kernel driver to load next compare point and send
a Windows Event to notify user’s AP. If the frequency of comparator
output is too high, the Windows Event won’t be received by AP without
lost but the hardware trigger will be send correctly without delay.
_8132_Set_CompHome:
Reset the comparator’s counter to zero. This function usually follows
by home_move() to make sure that two counter are the same before
any motion.
_8132_Get_CompSts:
Get current status of comparator
_8132_Build_Comp_Table:
PCI-8132 provides a convenient interface for user to input their
compare points. User can pass an array pointer to this function to
notify PCI-8132. The maximum points of this table are 1024 long
integer value.
_8132_Set_Comp_Table:
Once user builds a compare table by _
8132
_Build_Comp_Table(), he