LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simple usb DAQmx Base problem

Hi,

I'm very new to LabVIEW but have been going through several examples that came with my usb 6008, it seem that what I'm trying to do is so simple that it has been over looked in examples and I cant seem to work back from anything thats similar but more advanced.

What I need to do is simply use the DAQmx Base and split the resulting array so that each of the 12 digital ports on the DAQ turns on or off an individual Boolean LED.

Any help with this would be great.

regards

Kevin B.
0 Kudos
Message 1 of 6
(2,842 Views)
Hi Kevin,

This shouldn't be too hard to sort out from the sounds of it. Which of the shipping examples have you been looking at then?

I'm not entirely clear on what you are trying to do, do you want to input boolean logic signals into the DAQ device and the light corresponding LED's on the front panel, or do you want to output boolean signals from the DAQ device that then light external LED's. Either of these should be fairly achievable, let me know what it is you are trying to do and I will have a look into it for you.

Best regards,

Peter H.
Applications Engineer.
NIUK.
0 Kudos
Message 2 of 6
(2,832 Views)
Hey Peter,

Right on both counts actually,

I have two USB 6008 devices, not sure if I can achieve what I want with one DAQ. With the first DAQ I want to read 12 Boolean signals outputted from a circuit and display each signal separately.

At the same time and on the same VI i need to have three Boolean toggle switches that will output through the second DAQ (unless this is achievable through the first but I doubt it cause I'm already using the 12 Digital I/O)

Also if possible I would like to have the option of using the other 9 ports on the second DAQ as extra inputs.

I've attached what I've got so far, I can use the first 8 ports of the DAQ but I cant seem to use seperate channels and so P1.0 - P1.3 wont respond to signals.

As you can see from the VI I'm trying to simulate the ouput of a traffic light system, and also want to provide input to the system through the same VI which will act as sensors on particular lane, the circuit I have does all the work, I'm only really interested in simulation and output from my VI

Any help would be great,

Kevin
0 Kudos
Message 3 of 6
(2,827 Views)
Hi Kevin,

I have made some modifications to your vi so it reads all twelve inputs correctly, to get it to work you need to go into the NI-DAQmx Base Task Configuration Utility and set up two new tasks. The first task is called 'digital task 8' and it is a digital input, with port 0 selected. The second task is called 'digital task 4' and has port 1 selected but apart from that the same settings.

Please find that VI attached.

Best regards,

Peter H.
Applications Engineer.
NIUK.
0 Kudos
Message 4 of 6
(2,808 Views)
Hi Pater,

The VI you changed for me works excatly how I need, thanks very much. Is it now possible to add four toggle switches to the same vi that will power Port1 on a second device (another 6008) and have the 8 lines of the port 0 on the second device also set up for input reading?


Thanks again for any help

Kevin
0 Kudos
Message 5 of 6
(2,788 Views)
Hi Kevin,

I've now made a second VI which uses the same task for Port 0 which uses 8 analog inputs (you can of course create another task here when you incorporate it into the first VI) and then a task called 'output task' on Port 1. This is the same as Digital Task 4 except it is set to inputs instead of outputs.

Hope this is what you need.

Best regards,

Peter H.
Applications Engineer.
NIUK.
0 Kudos
Message 6 of 6
(2,782 Views)