Motion Control Theory
205
PCI-8254 / PCI-8258
Detailed operation methods are described below:
1. Set up interrupt events:
Use
APS_set_int_factor( )
to set up interrupt event for
waiting. The function returns interrupt event number if setup is
successful. You shall store event number in a parameter to be
used by later Wait functions.
The
APS_set_int_factor( )
function can be used to close
opened interrupt event as required by application.
2. Enable main interrupt switch:
Interrupt signal of hardware device can be received only when
the main interrupt switch of controller is opened. Open with
APS_int_enable( )
.
3. Waiting for interrupt trigger
Use
APS_wait_single_int( )
to wait for single interrupt event,
or
APS_wait_multiple_int( )
to wait for multiple interrupt
events concurrently.
The program enters sleep mode after entering this function.
That is, the program (or thread) consumes no CPU resources
until there is interrupt event or timeout occurred. You may use
the returned value from the "wait" function to ensure the
occurrence of event in waiting and execute followed application
steps.
4. Reset interrupt to non-signaled state
When there is event triggered and the program left the "wait"
function, the interrupt event is set in signaled state. To wait for
the same event's occurrence again, please reset the interrupt
status to non-signaled state manually. Call the "Wait" function
before reset will cause the Wait function to return directly.
Function for reset:
APS_reset_int( )
5. Close interrupt event and main interrupt switch
Finally, use
APS_set_int_factor( )
function to close individual
interrupt event, use
APS_int_enable( )
function to close main
interrupt switch to release all interrupt relevant resources.
Summary of Contents for PCI-8254
Page 2: ...ii Revision History Revision Date Description 2 00 2014 08 13 First release ...
Page 8: ...viii Table of Contents Important Safety Instructions 209 Getting Service 211 ...
Page 12: ...xii List of Figures ...
Page 14: ...xiv List of Tables ...
Page 24: ...10 Introduction ...
Page 54: ...40 Getting Start with The Installation ...
Page 78: ...64 Signal Connection ...
Page 111: ...Motion Control Theory 97 PCI 8254 PCI 8258 MCP2 Bode plot page ...
Page 222: ...208 Motion Control Theory ...