12-19-2008 08:19 AM
Hi all,
I'm using DAQmx Read function to capture a hardward reset signal from another outside source (see example .vi). The reset suppose to clear all LED within the case.
But I now have a problem where the reset doesn't always clear until you have to hold the reset switch for a while or have to push reset more than 1 time.
Please advice.
Thanks
12-19-2008 08:28 AM
How are you using this VI? It only executes once when you hit the run button. (Please don't tell me you are using Run Continuous).
All of those Strict Boolean property nodes you have in there, they don't have any boolean control references wired to them.
What is a "Uson"?
When posting a question, please put a little more descriptive title in the message subject. All the messages in this forum are "LabVIEW Questions".
12-23-2008 10:02 AM
Hello dphan128,
Ravens Fan is correct, judging from your VI and the behavior you're describing it sounds like you may be running this VI continuously (or you may have a newer version of the VI you posted because this one doesn't have any LEDs or references to LEDs). Another option would be that you're calling this VI as a sub VI within a loop, either way it would be good to know exactly how you're using this VI.
Just to make sure I follow what you're trying to do I'll recap. You want to press a button that will sent a TTL high pulse to a digital input of a DAQ device. Once this trigger is received you want to turn front panel LEDs on or off. However, in your current setup you have to either hold the button down for a while or press it multiple times to toggle the LEDs.
If this is the case it sounds like you may not be reading the digital input often enough. If you press the button and send a signal to the digital input and then release the button before it reads the value then you will miss the button press. There are a couple ways to prevent this:
1. Sample the digital input more frequently.
2. The best solution would be to use digital change detection. This will detect changes on the digital line and generate a software event--an ideal structure for what it sounds like you're trying to do. The only limitation is that not all NI Hardware supports change detection. Check the link below to see if your hardware does.
Here are a few resources you may find useful:
The Industrial Feature Set: Change Detection
Digital Change Detection in NI-DAQmx
Which NI DIO Devices Support Change Detection?
There is also a LabVIEW shipping example for change detection located in the LabVIEW Example Finder. To open these examples start LabVIEW and go to Help» Find Examples... Then navigate to Hardware Input and Output» DAQmx» Digital Measurements» Read Dig Chan-Change Detection.vi.
I hope this helps, and have a great week!
Cheers,
01-07-2009 10:43 AM
Thank you Brooks,
You really gave me good idea of what to do.