Discussion:
How to output 5 digial waveforms from 6024E
(too old to reply)
Love Electronics
2007-06-15 13:40:12 UTC
Permalink
Good day all,

 

I am new to DAQ and Labview and I have done an electronic circuit using semiconductors components (TTL/CMOS) to light a sequence of 32 LEDs. Now I need to design this using the Labview software. (555 timer to generate a clock, binary counter to produce the code and then decoder to lighten the LED in sequence).

 

I have a DAQ PCI card PCI 6024E card, and as I understand it has 16 analogues input/output and 7 digital I/O and 2 counters.

 

I need to design the digital output to give me digital waveforms like a sequence of pulses, or the same as a binary counter will give.

 

The 2 counters which the card have, and in the manual the counter have only 3 connections (signal, gate and output). I don't know if I can use it to give me 5 lines output like the TTL binary counter will (4 for the code and the 5th as a selector).

 

I have been told that I can use the digital I/O to give me such sequence without using the counter!!, I have set my card to give 5 digital as outputs using the NI (Measurement & Automation), but now the Labview program which I don't know.:mansad:

 

Is there an example or file I can use or modify to do this. If there is an online book or resources regarding this it would be great.
AdamB
2007-06-18 13:40:11 UTC
Permalink
Hi there,
In the example finder there is a vi called "Write Dig Port.vi".  This is a great place to start.  Just set up the right channels, and provide the output with an array of Hex values.  Each one will be outputted in turn.

Possible problem, the digital outputs on these cards are not clocked so you will have to use software timing.  How accurate does the timing need to be?

Any other questions just fire away.

AdamB
Love Electronics
2007-06-18 16:40:14 UTC
Permalink
Thanks for the reply,
The timing has to be accurate, I need a continuous signals comming out from the 5 digital outputs just like the sequence shown in the attached graph.
I think the example you mentioned is doing it manually!!
 
 


sequence.JPG:
Loading Image...
AdamB
2007-06-18 16:40:15 UTC
Permalink
Hey there,
You are right the example does this manually, but with a timed for loop and an array of the required values you should be able to get the timing accuracy down to about 1 maybe 2 ms.
As I mentioned these cards do not have clocked digital lines and so you can only output one update at a time.
For the pattern you are suggesting you would need clocked output lines to get higher accuracies.
How does this look?
AdamB
 


Write Dig PortCountUp.vi:
http://forums.ni.com/attachments/ni/70/7021/1/Write Dig PortCountUp.vi
Love Electronics
2007-06-19 10:40:12 UTC
Permalink
Do you mean that I can't get the pattern I want using this card, and i have to use another one!!
 
AdamB
2007-06-19 10:40:13 UTC
Permalink
No,
 
The pattern is possible (the code I attached does this for you)
Its the accuracy that will never be more than 1 or 2 ms (and that's being optimistic)
 
What you are actually doing is just counting up from 0 to 31 so you don't even need the pattern that I have shown you(the binary Array)
You just need to create an array of U8 numbers counting from 0 to 31 and feed these to the digital output one at a time (as shown)
 
 
Thanx
 
AdamBMessage Edited by AdamB on 06-19-2007 05:22 AM
AdamB
2007-06-19 10:40:13 UTC
Permalink
Hi again,
Thought you might like this:
(written in LV 8.0.1)
 
AdamB


Write%20Dig%20PortCountUp[1].vi:
http://forums.ni.com/attachments/ni/70/7030/1/Write%20Dig%20PortCountUp[1].vi
AdamB
2007-06-27 14:40:16 UTC
Permalink
Here you go.
Happy Programming....
 
AdamB


Write%20Dig%20PortCountUp[1][1].vi:
http://forums.ni.com/attachments/ni/70/7090/1/Write%20Dig%20PortCountUp[1][1].vi
Love Electronics
2007-08-21 19:40:14 UTC
Permalink
Hi Adam,
Thank you for the program, i tried it and it worked, just have one question what does the customisable bit pattern do. why you didn't directly put the array pattern to the DAQ task.
One more thing, I have done a program to read the analog input corresponding to the 32 LEDs. It is attached, could you plz help me to do the synchoronisation between the 2 program. It just keep on reading the data over and over also I can save it manually. But both ways don't work as I want them to work automatically. Plz read my previous thread
<a href="http://forums.ni.com/ni/board/message?board.id=170&amp;message.id=264539" target="_blank"> http://forums.ni.com/ni/board/message?board.id=170&amp;message.id=264539</a>
I couldn't do it I kept on trying with no luck.
Thanks for your kind help.

Loading...