Chapter 16 Motion Counter Value API | PCI-DMC-A01 / PCI-DMC-B01
16-4 Revised March, 2012
16.5 _DMC_01_get_target_pos FORMAT
I16 PASCAL _DMC_01_get_target_pos (U16 CardNo, U16 NodeID, U16 SlotID, I32* pos)
Purpose
Retrieves the current value of the target position.
Parameters
Name Data Type Unit Description
CardNo U16 Number Unit CardNo is between 0~15
NodeID U16 Number Unit Node ID
SlotID U16 Number Unit Slot ID
pos I32* Number of
pulses
Position counter value for current position (see
the Notes below for explanation)
Example
U16 CardNo=0;
U16 NodeID =1;
U16 SlotID = 0;
I32 pos=0;
I16 status= _DMC_01_get_target_pos (CardNo, NodeID, &pos);
NOTE
※ After issuing a motion command, if you are relying on _DMC_01_get_target_pos to
return the pos so you can decide the next step, put in a delay of 10~100ms (this value
can be adjusted based on CPU performance and programming approach) before
executing _DMC_01_get_target_pos to ensure that the data is correct.