Chapter 4: PowerDAQ Software (SDK)
88
Method B. Generate event when specified edge
is detected
See SDK Example
DIEvents.c
This method is very similar in setup parameters with Method A. The
difference is that you should additionally enable and set up event
notification. Like the analog output subsystem, the digital input can
share the same event handler with other subsystems or have its own
event handler.
Initialization
•
Reset digital input subsystem
#
_PdDInReset(
…
) clears latch and configuration
register
Set up digital input configuration
•
Set up edge-sensivity configuration
#
_PdDInSetCfg(…) use this function to specify input
line and an edge to be detected. Configuration
word is explained in Digital I/O Architecture section
of this manual
#
_PdAdapterEnableInterrupt(…) with dwEnable = 1
#
_PdDInSetPrivateEvent(…) set up event object
#
_PdSetUserEvent(…) use DigitalIn as a subsystem
name. There is only one digital input event defined
– eDInEvent. This means that one or more edges
were detected
Event handler
•
Check event
Содержание PD2-MF
Страница 5: ...Table of Contents iii Index 137 ...
Страница 11: ...1 1 Introduction ...
Страница 18: ......
Страница 19: ...9 2 Installation and Configuration ...
Страница 34: ......
Страница 35: ...25 3 Architecture ...
Страница 63: ...53 4 PowerDAQ Software Development Kit PD SDK ...
Страница 106: ......
Страница 107: ...97 5 Calibration ...
Страница 109: ...99 A Appendix A Specifications ...
Страница 110: ...Appendix A Specifications 100 ...
Страница 112: ......
Страница 113: ...103 B Appendix B Accessories ...
Страница 118: ......
Страница 119: ...109 C Appendix C Application Notes ...
Страница 125: ...115 D Appendix D Warranty ...
Страница 128: ......
Страница 129: ...119 E Appendix E Glossary ...
Страница 152: ......