LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help to corroborate transition from Traditional NI-DAQ to NI-DAQmx?

I'm was given a LabVIEW program that is funtional with Traditional NI-DAQ. Because we are making the exact same experiment that another Lab. already did. They were kind to give us the program so i can put it to work. The main difference is that they use a BNC-2090 and we are using a BNC-2090A with a USB 6281. So the program does not work with the hardware mainly because 2090 works with traditional and 2090A is daqmx. And i'm trying to edit it replacing the traditional vi's for the daqmx vi's to be able to run the program with NI-DAQmx. how can i verify that i have make a good transition (replacing of vi's) from traditional to daqmx. My main worry is the AO ONE PT.vi because it has a value parameter that send to the AO1. I change it for a create channel (AO-voltage-basic) that does not have that parameter. any help is appreciate in advance.

 

And i'm trying to edit it to run the program with NI-DAQmx.

 

0 Kudos
Message 1 of 5
(2,607 Views)

First off this other company did not do you any favors in giving you this code.There is a lot to talk about with everything that you should not do here. Using flat sequences as a no no most of the time. Wires everywhere, local variables. There is a lot going on here and it could be done much easier and more efficient.

 

The reason that you do not have an AO value is because you need an DaqMX write vi. If you place it on your diagram and pass the task to it you will have a connection called data to hook the 1 and the local variable to.

Tim
GHSP
0 Kudos
Message 2 of 5
(2,599 Views)

First, the 2090 and 2090A are just dumb terminal blocks so neither are associated with traditional DAQ or DAQmx in any way.

 

Second, your VI has no chance of working right now. You simply cannot have multiple tasks on the same hardware resource (either an analog output or analog input) without starting and stopping each one before you use the next task. Better to combine all channels into a single task.

 

Third, the AO one update is equivalent to doing a DAQmx Create Channel followed by a DAQmx Write.

 

Fourth, try to write the code without any local variables. I would also recomend you not use the stacked sequence structure. It looks like there is a lot of duplication of code. I suspect you could design something that has a single acquisition state where you might read/set changed parameters from an array and tied to the iteration count. The wiring is simply too sloppy to see what is actually going on.

0 Kudos
Message 3 of 5
(2,594 Views)

Thanks i understand what you are saying when i start to read the daqmx vi's i see that almost everything in the program could be done much more easy and readable unfortunate my deadline is kind of going fast has kripy kreme doughnuts on sunday so i can't do too much changes . The lab give me the program because is suppose to be already working for the experiment that we are going to do. but there was the little detail about the drivers so i have go play operation in the program by my owe since nobody knows who write the program from the other Lab. Still daqmx write vi was very helpful thanks.

 

 

 

 

0 Kudos
Message 4 of 5
(2,579 Views)

This may assist with your transition:

 

http://zone.ni.com/devzone/cda/tut/p/id/4342

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 5 of 5
(2,553 Views)