Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Traditional DAQ to DAQmx with DAQpad-6016

I have used the Vi for several years and it fits most of our applications. I have been using the PCMCIA card and now our new DAQ System requires a USB input for the DAQpad-6016. I ahve rmoved the Traditional VIs and replaced with Daqmx but with no success. The text file columns with data are wrong; no time stamp, only at the start, and the chart does not update. What can I do to keep the vi the same but use DAQmx to start the acquisition, update the chart and have the text file read correctly.
Any
0 Kudos
Message 1 of 10
(3,740 Views)

I am trying to post the VI; no luck.

I have used the VI for several years and it fits most of our applications. I have been using the PCMCIA card and now our new DAQ System requires a USB input for the DAQpad-6016. I have removed the Traditional VIs and replaced with Daqmx but with no success. The text file columns with data are wrong; no time stamp, only at the start, and the chart does not update. What can I do to keep the VI the same but use DAQmx to start the acquisition, update the chart and have the text file read correctly?

Any help would be appreciated.

Labview 8.5.1; Report generation 1.1.2

 

0 Kudos
Message 2 of 10
(3,728 Views)
Hello jbc,

Thanks for your post!

I see you want to have a program that you can use for many applications. If you could tell us a little more about what you are doing, AI, AO, DI/O etc... It is also great that you are converting over to DAQmx functions as these will give you great functionality. I know that sometimes it can be hard to change over so I would like to point you to the NI-Example Finder. Here you will find many DAQmx programs that are already set up to do most applications, even reading and witting to a file like you are doing in your application. I don't have a specific example for you but I would encourage looking through the example finder. To get to this, open LabVIEW and go to Help << Find Examples. Under this go to Hardware Input and Output << DAQmx. Let me know if any of these examples help you find your way to upgrading your programs. If you can post your code we also might be able to help more as well. If you are having trouble attaching the code you can also attached just a screen shot as well. I wish you the best and please post back if you have any other questions.

Cheers!

Corby_B
http://www.ni.com/support
0 Kudos
Message 3 of 10
(3,707 Views)
0 Kudos
Message 4 of 10
(3,702 Views)
Corby,
0 Kudos
Message 5 of 10
(3,701 Views)
Corby, I
0 Kudos
Message 6 of 10
(3,700 Views)
All Vis included; it keep sending a reply when I do not want it to. I know examples are provided but I keep trying to use them but I do not receive the results I need. When I use Daqmx for files the headers are in the wrong place and the time stamps are not in one column next to the data. The columns are for the chnnel string headers and the rows under the headers are for timestamps, and data corresponding to the header string. JBC
0 Kudos
Message 7 of 10
(3,699 Views)
Hello jbc,

Thanks for your post back!

I see that in your program (8 Channel TEMPLATE.vi) you take a 2D array of your data and then scale it from there. When switching to DAQmx how do you set up your DAQmx read.vi Do you set the read to Analog >> Multiple Channels >> Multiple Samples >> 2D DBL, does that not allow your data to then be read correctly and put into your excel templates. The data should be the same coming out of the read and it should allow you to send the 2D DBL to all the places that you did before using the Traditional DAQ functions. I would also like to point you to a dev zone that talks about the new DAQmx functions and how the polymorphic VI's allow you to do different things with the same VI's

DAQmx


Let us know if any of this information helps you and please post back with your findings!

Cheers!

Corby_B
http://www.ni.com/support
0 Kudos
Message 8 of 10
(3,687 Views)
Corby, The file is incorrect; data is not going to the correct column and the timestamp is not showing on each row; and every few samples a time stamp appears across one row in lots of columns. The digital displays above the chart do not show the correct reading; if any. I only need sample rates per second of 1 to 100 s/s for different applications. It remains constant for one file; if I need slower or faster samples; I start an new file. I have attached the VI and a Data file. Still confused any help is greatly appreciated. Thank you, JBC
0 Kudos
Message 9 of 10
(3,654 Views)

It has been a very long time since I've used traditional DAQ and even longer since I used the 2D dbl instead of a waveform data type. The help for the traditional DAQ says:

waveforms is a 2D array that contains analog input data in scaled data units. The data appears in columns, where each column contains the data for a single channel. The second (bottom) dimension selects which channel column. The first (top) dimension selects a single data point for that channel. The array must be transposed before graphing.

And the help for DAQmx says:

data returns a 2D array of samples. Each row corresponds to a channel in the task. Each column corresponds to a sample from each channel. The order of the channels in the array corresponds to the order in which you add the channels to the task or to the order of the channels you specify with the Channels to Read property.

It looks to me like you need to transpose the data you are getting.

0 Kudos
Message 10 of 10
(3,651 Views)