Waiting for a simple trigger input from parallel port using digitalio
2 views (last 30 days)
Show older comments
Hello everybody!
I am sucessfully sending a trigger signal through the parallel port using this code:
daq = daqhwinfo('parallel');
dioOut = digitalio('parallel','lpt1');
addline(dioOut,0:7,0,'out');
putvalue(dioOut.line(:),255); % (open trigger)
putvalue(dioOut.line(:),0); % (close trigger)
and then I need to wait for an answer from the connected device, which will send back a simple trigger signal that I try to catch with
dioIn = digitalio('parallel','lpt1');
addline(dioIn,0:7,0,'in');
Check = getvalue(dioIn);
the thing is that I get Check = [0 0 0 0 0 0 0 0] Which is the value set by
putvalue(dioOut.line(:),0);
not the value that my device is sending back to the PC trough the parallel port.
Any idea of how to get this value from the parallel port? It can be sent at any time following the trigger sent as output...
Thxs
0 Comments
Answers (0)
See Also
Categories
Find more on National Instruments Frame Grabbers in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!