LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

binary number to DAQ Assistant

Hi all,
 
I have a 7-bit binary number. Each bit represents a digital signal, which I'd like to produce using DAQ Assistant.  How can I do that?  Right now, I break the binary into 7 bits and process each bit individually (see attachment).  Is there any simpler way to do it?  Also, I'm using PXI-6713 card to produce the 0-5V signals.  I didn't finish connecting the DAQ assistant because it gave me error even though I changed the channel number.
 
Thanks,
-Ep
0 Kudos
Message 1 of 6
(3,122 Views)

I don't understand at all what you are doing with the Relay Function and Simulate Signal. If you had attached the actual VI instead of an image, it might have made more sense but what you want to do with outputing a digital pattern from a numeric control is exactly what the shipping example called Write Dig Port does. Open the Example Finder and its Hardware Input and Output>DAQmx>Digital Generation. You can also use the DAQ Assistant by wiring it up as shown below.

Message Edited by Dennis Knutson on 10-24-2007 09:50 PM

0 Kudos
Message 2 of 6
(3,110 Views)
Thanks, Dennis.
Well, I'm new to Labview.  I thought since PXI-6713 is an  analog output card, I'd output 5V for logic 1 and 0V otherwise.  After doing that, I thought there must be a better way of doing it.
Thanks for your reply.  One more question: in your wiring diagram, just before the DAQ assistant, what block is that?  And what does it for?
 
Regards,
-Ep
 
 
0 Kudos
Message 3 of 6
(3,089 Views)

It is an analog output card but it also has 8 digitial lines. I guess I just never thought about using analog out. That's why the image you posted had me confused.

The function is Build Array. The DAQ Assistant is limited to the types of inputs it will accept. To use a numeric control, you have to convert it to an array first. The shipping example I mentioned does not require a build array. It will take a numeric directly.

0 Kudos
Message 4 of 6
(3,084 Views)
Thanks, Dennis.  It works fine now.
Is there any advantages of doing it using DAQ Assistant compared to the way in the shipping example, vice versa?

Regards,
-Ep
0 Kudos
Message 5 of 6
(3,070 Views)
I've never used the DAQ Assistant for anything except a quick check to see if the hardware is working. I started writing LabVIEW code a very long time before there was ever a DAQ Assistant so I'm comfortable with the lower level functions. The DAQ Assistant actually uses the DAQmx functions. You can see this for yourself by right clicking on the Assistant and selecting Open Front Panel. There is a little bit more overhead with the Assistant and there is more flexibility by using the low level functions. For a lot of basic operations, you may not notice any difference, though.
0 Kudos
Message 6 of 6
(3,067 Views)