LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure Channels in Real-Time Waveform Acquisition and Logging (NI-DAQmx) Sample Project Config File

Hello all,

 

I'm working through adapting this sample project and am looking for some insight on settings in the Utility - Configuration File Generator.vi.

 

If I want 16 channels of daq (all the same type - thermocouple) how should I configure the channel scale array?

 

Also, is there a document that explains the samples per read and number of reads to save properties?

 

Thank You.

 

Michael

0 Kudos
Message 1 of 10
(3,844 Views)

Hi Michael,

 

It looks like the each entry in the channel scale array represents a scale factor for its corresponding channel - Item 0 contains the scale factor for channel 0. For example, in the project's default configuration, 4 channels are specified, and the first 4 entries in the array are initialized to 1 - meaning that no scaling will occur. For 16 channels, you should set the first 16 values in the array to whatever scale factor you want (I'd recommend 1 as the default).

 

Samples per read determines the number of samples that are read into the program from the DAQ device on each individual read. If you dig down into the code and find the actual DAQmx read function, it's configured to perform a finite N sample N channel read each time it's called - and each of those reads, it will read the number of samples specified by samples to read from the DAQ device to the PC.

 

Number of reads to save determines how many different reads are performed by the program (you can see this if you view the Acquire and Log Data subVI). That subVI keeps a count of the number of reads that have been performed (the number of times it has been called) and terminates the program when that count matches this parameter.

 

Unfortunately, I wasn't able to track down a document that discusses these parameters, but I hope that these descriptions help.

 

Regards,

Ryan K.
Product Manager, ATCA and BEEcube
National Instruments
0 Kudos
Message 2 of 10
(3,808 Views)

Thanks Ryan.  When viewing the data from the thermocouples, I'm getting values in C.  Would I use the scale array to change the values to read in F? 

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

I don't believe you'll be able to use the scale array to do that conversion. It looks like that array is primarily meant for scaling by a single scale factor, and the Celsius to Fahrenheit conversion requires adding a constant in addition to multiplying by a scale factor. You could implement that conversion manually in the code if you wanted, but you'd have to make that modification on your own.

 

Regards,

Ryan K.
Product Manager, ATCA and BEEcube
National Instruments
0 Kudos
Message 4 of 10
(3,729 Views)

Can you give the examples "Labview Real-time Waveform Acquisition and Logging (NI-DAQmx) Sample Project" for me ?I can't fide it ,Please!Thank you!

0 Kudos
Message 5 of 10
(3,523 Views)

@六月 wrote:

Can you give the examples "Labview Real-time Waveform Acquisition and Logging (NI-DAQmx) Sample Project" for me ?I can't fide it ,Please!Thank you!


I believe you need to have LabVIEW Real-Time and NI-DAQmx installed in order to see this sample project in the Create Project dialog.

0 Kudos
Message 6 of 10
(3,520 Views)

I have installed,but it not in my Project Explorer windowSmiley Sad

0 Kudos
Message 7 of 10
(3,508 Views)

I think the order of installation matters. If you installed NI-DAQmx first, then LabVIEW Real-Time, you won't see the sample project. You have to install LabVIEW Real-Time first, then NI-DAQmx. Because I think the NI-DAQmx installer checks to see if LabVIEW Real-Time is installed before it installs the RT+DAQ sample projects.

0 Kudos
Message 8 of 10
(3,505 Views)

yes,you're right,I go to try it ,Thank you!

0 Kudos
Message 9 of 10
(3,501 Views)

I find it ,thank u againSmiley Happy

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