For detecting asynchronous events such as changes on the Digital Input terminals, the DAQC2plate supports
the use of interrupts. An excellent tutorial on how to use interrupts in Python can be found
here
. Note that all
Pi-Plates use the GPIO22 pin on the Raspberry Pi for generating an interrupt. If you don't choose to use
interrupts, GPIO22 is available for your applications.
Functions
General
addr
must be in the range of 0 through 7
● intEnable(addr) - enable interrupts from the DAQC2plate. GPIO22 will be pulled low if an enabled event
occurs.
● intDisable(addr) - disables and clears all interrupts on the DAQC2plate
● getINTflags(addr) - returns 16 bit flag value and clears all INT flags
The interrupt flag register mapping looks like:
The bit definitions are:
● DIN0: set when a transition occurs on DIN0 that set by the
enableDINint
function described below.
● DIN1: set when a transition occurs on DIN1 that set by the
enableDINint
function described below.
● DIN2: set when a transition occurs on DIN2 that set by the
enableDINint
function described below.
● DIN3: set when a transition occurs on DIN3 that set by the
enableDINint
function described below.
● DIN4: set when a transition occurs on DIN4 that set by the
enableDINint
function described below.
● DIN5: set when a transition occurs on DIN5 that set by the
enableDINint
function described below.
● DIN6: set when a transition occurs on DIN6 that set by the
enableDINint
function described below.
● DIN7: set when a transition occurs on DIN7 that set by the
enableDINint
function described below.
● A2D: not used at this time
● Oscope: used in oscilloscope mode to signal the end of a sweep
● MOTOR 1 STOPPED: when enabled in the Motor Controller Mode, signals when stepper motor 1 has
completed a MOVE operation
● MOTOR 2 STOPPED: when enabled in the Motor Controller Mode, signals when stepper motor 2 has
completed a MOVE operation
● N/A: Not Assigned
● N/A: Not Assigned
● N/A: Not Assigned
● N/A: Not Assigned
Digital Input
The following functions control interrupt generation on the Digital inputs:
addr
must be in the range of 0 through 7
bit
must be a value between 0 and 7
Содержание DAQC2plate
Страница 1: ...DAQC2plate Reference Guide Version 1 04 ...