10-27-2008 03:27 AM
hi there,
Im am polling a DIO used as a trigger. So basically when the digital line goes high (true - boolean), my program acquires some AIs and performs two pulse width measurements using a counter. It appears that the counter outputs a wrong value for some reason for the first pulse duration measurement. Ive tried measureing the pulse width separately - i.e. without polling the DI - and it works fine but for some reason, when i poll the DI, it stops the pulse width calc from working properly
any ideas?
cheers
don
Solved! Go to Solution.
10-27-2008 04:31 AM
oh btw, im using a pcie 6259 DAq card and the digital input is a TTL from an SPDT relay.
thx.
don
10-28-2008 02:35 PM
Hi DAQ_Newbie,
It would be great if you gave a detailed description of your application, as there may be a better/more efficient way of tackling the issue than the way you're trying to do it. I can tell you that what I think is wrong with this VI (besides the subVIs not being posted) is that when the DO line is asserted high you send the notification in software to a case structure, create the pulse width measurement, and try to read a signal that has probably been gone for several milliseconds because of the delay in software and creating the task. Even if you could have the pulse width task start right away, it would still need the rising edge as a reference point for the measurement, but that is the very signal used to turn it on.
In the meantime, here are some great links for DAQ beginners that would probably help you get up to speed on the most important topics. I hope this helps.
Getting Started with NI-DAQmx: Main Page
Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications
10-28-2008 07:01 PM
hi mark,
thx for ur prompt reply.
Part of my application in essence, is to once a DI goes high, my app goes into first waiting for a trigger to start acquiring 10 AI channels, also waits for counter 0 to fire and measure the pulse width of a TTL signal twice.
What better way di u have in mind instead of polling the DI to trigger the case structure.
thx for helping
don
10-29-2008 03:21 PM
Hi Don,
It seems that you could do arm start triggering using a counter. Searching ni.com for "arm start trigger' may be a good start to finding out more, but here are a few links as well.
Hardware Counter Start Trigger for Counter Synchronization
NI-DAQmx: Counter Input Start Trigger