08-09-2007 11:15 AM
08-10-2007 04:34 AM
Hello Love,
I'd just like to clarify exactly what you want to achieve.
At the moment you are powering 32 LEDs from 5 DIO lines from you NI DAQ card. Are you powering multiple LEDs from a single line or are they multiplexed in some way?
Every 500ms you want to drive the 5 digital signal to the LEDs and at the same time read the single analogue signal from your sensor. Is this correct?
Also what NI DAQ card are you using?
Cheers
Tom | NIUK
08-10-2007 04:45 AM
Hi Tom,
The 5 DIO is deriving 2 decoders each handling 16 LEDs, so 4 lines addresses the decoders and the 5th as selector to enable the 32 LEDs in sequence.
It is not necessarily the time will be 500ms, it will be either, 100ms or 10ms or in between these two values.
I have 6024E and 6071E.
Cheers
Love
08-10-2007 05:10 AM
Hello Love,
With the NI PCI-6071E your best bet would be to generate a clock a pulse width of your choice (500, 50 or 10ms) and then use this signal as your timing source for the other DAQmx tasks (the digital output and the analogue input.)
Examples of how to generate a clock, and how to use external clock timing for Analogue and Digital tasks can be found the LabVIEW Example Finder under Hardware Input & Output >> DAQmx.
Cheers
Tom | NIUK
08-10-2007 05:20 AM - edited 08-10-2007 05:20 AM
Hi Tom,
Thanks for your support.
Could you plz point out to a certain example, and how I can link it to my program.
Thanks
Message Edited by Love Electronics on 08-10-2007 05:25 AM
08-10-2007 07:01 AM
Hello,
Using an external line to clock an Analogue Input task:
Hardware Input & Output >> DAQmx >> Analogue Measurements >> Voltage >> Acq&Graph Voltage - Ext Clk.vi
Using an external line to clock an Digital Output task:
Hardware Input & Output >> DAQmx >> Digital Generation >> Write Dig Channel - Ext Clk.vi
To generate a clock:
Hardware Input & Output >> DAQmx >>Generating Digital Pulses >> Gen Dig Pulse Train - Continuous.vi.
Cheers
Tom | NIUK
08-10-2007 08:36 AM
Just to add a tidbit or two. Remember that there may be some physical response time between firing the digital bit to turn on the LED and having your sensor reach its steady-state response value. This will limit your max sequencing speed.
As far as I know, your E-series boards don't support hardware timed digital output. So your digital output sequencing will need to be software timed. I think you might also use software timing for your Analog input. That being the case, I would make sure the software timing delay comes between the digital output and the analog input. As soon as you take an analog input reading, you can immediately produce the next digital output.
-Kevin P.
08-11-2007 11:54 PM
Hi Kevin,
Thanks for the tips, but I am kinda lost here. I am not expert in Labview so you could imagine.
How to do a “software timing for your Analog input”. What I understand from the E series issue is that it depend on the speed and memory of the PC.
I qoute: “That being the case, I would make sure the software timing delay comes between the digital output and the analog input.” Does this mean to connect the delay of the DIO sequence to the AI input as well.
Thanks
08-13-2007 04:15 AM
Hi Tom,
Using an external line to clock an Digital Output task:
Hardware Input & Output >> DAQmx >> Digital Generation >> Write Dig Channel - Ext Clk.vi
This example is not applicable to my DAQ cards!!
Have open the exmple finder and it shows that this example is not supported by both cards.
08-13-2007 12:09 PM
If you configure a DAQmx analog input task without calling DAQmx Timing to identify a hardware timing signal, then the task will be "software timed." In other words, each time you make a software call to DAQmx Read, the board will immediately sample all the AI channels and return this data to you.
With regard to sequencing, I meant something along the following lines. You'll have a repetive loop. Inside this loop, you'd first generate your digital output pattern. Next you would wait for some short finite time to give your sensors a chance to fully respond. Then you'd take your next analog sample. Having finished this, your loop can progress to the next iteration and change the digital output pattern immediately.
-Kevin P.