Hi!
We have an application wherein signals from limit switches and optoswitches need to be used to control program flow.
As an example, we are doing serial read/write inside a timed while loop. We wish to stop this loop when there is activity from my limit switch. The limit switch gives a TTL signal.
How do I achieve this?
I cannot continuously poll the DI pins because that takes CPU time and might affect my timed loop which needs to run at the speed of a few miliseconds per iteration.
Can I use this digital signal from my limit switch to initiate a timed while loop inside which I have the stop function for the other while loop?
Please feel free to suggest alternative methods (fastest method is best).
We
are using LV 7.1 and hardware is PXI chassis with 6025 daq board and 8423 serial board. OS is Win2000
Thanks and looking forward to some quick solution.
- Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA