10-11-2007 11:26 AM
10-12-2007 04:43 PM - edited 10-12-2007 04:43 PM
Hi JPLEng
There are a couple of example programs in our Developer Zone that I think may be beneficial in helping you get started with your application. One in particular incorporates digital input operations with the event structure in LabVIEW, much like you are trying to do. The example is located here: Digital Change Notification using NI-DAQmx and LabVIEW 8.0. Here is a screenshot of the block diagram for this VI, just as a quick reference:
There is also another example that you may find useful for performing change detection, and it is located here: NI-DAQmx: Digital Change Detection Using the 653x.
Hopefully these can get you started, but if you have any further questions please feel free to post back!
Message Edited by Jaime F on 10-12-2007 04:46 PM
10-15-2007 03:44 PM
10-16-2007 06:11 PM
Hi Alex,
IRQ will probably be “jittery” just by the nature of interrupts.
Are you asking if when the <task out> pane finishes it then loops around to the timeout pane? The code will only execute either the <task out> or timeout event each time through the while loop. So you want to include whatever code you desire to execute inside the <task out> event pane.
It may not matter, but for completeness, please list what operating system (Windows 2000, XP, etc.) and what versions of LabVIEW, NI-DAQmx, Traditional NI-DAQ, and any other driver you are using. This can be done by opening Measurement & Automation Explorer (MAX), clicking on the Software tab, then each piece of software individually. The version is in the window on the right side.
P.S. A pulse of 500us is fine. I believe the minimum pulse width is ~10us.
10-22-2007 12:10 PM
10-23-2007 04:45 PM
All of your code inside the while loop continues to execute regardless of what happens inside the event structure. When the Event Registration Refnum detects a change, it sends a signal to the Event Dynamic Registration on the Event Structure, which fires the event "<task out>: Signal". Otherwise, you'll see the data sitting at the edge of the event structure without the event structure executing the code inside.
10-24-2007 07:31 PM
10-25-2007 06:35 PM
Hi JPLEng
First I would like to clarify when you say “move from one pane to the next” you refer to the event structure cases? Second the while loop is not going to run continuously the point of doing change detection is to avoid looping, the way it is going o work is that the “Even Structure” is going to sit and wait for the change in the line. I certainly was able to get to work but in a much simpler way, I did not try it with a 500 us clock I just did my self.
A change conditions is a raising edge or a falling edge in the lines specified in “DAQmx Timing VI” (change detection). The “Event Structure” has a time out set to 5 ms “blue constant” on the top left corner of the event structure change that to a larger value like 500ms, (play with the number). The ways you can satisfy this is by setting the change detection to one line and make it generate an event only in the rising edge. Check the context help for the (DAQmx Timing VI with the change detection set.
Regards
12-06-2008 02:02 AM
12-08-2008 11:24 AM - edited 12-08-2008 11:28 AM
Hi Roni,
I would suggest taking a look at this article: Considerations for UsingI-DAQmx Simulated Devices. Simulated devices created in NI-DAQmx 7.4 - 8.1 do not simulate timing. Task reads and writes will be return immediately, in later version of the driver simulated devices do simulate timing. Read and write operations will imulate the actual time they would take to complete as if they were being run in a physical device. Simulated devices in all driver versions do not simulate triggering. Triggers will return immediately.
I hope this helps, If you have any question please let me know.