LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LAB VIEW SOFTWARE WITH DAQ NOT PERFORMING

Good AfternoOn, I am Ricardo Hungria from Louisiana State University at the moment I am working with the NI-PXI-1052 HYBRID COMBINED WITH THE NI-PXI-8196 Data Acquisition system.

My experiment consists in measuring the strain of a concrete road for that purpose I am placing instrumentation (strain sensors and thermocuoples) inside the road, each strain sensor is plugged to the to a scxi 1314 terminal card, and each card is plugged to a scxi-1520 terminal modulus. The thermocouples are plugged to a  sxci 1303 terminal card, and each card to a 1102 terminal modulus. Everything is reading properly, but the VI, is only working for seven channels, when I want it to work for 9, (possibly in the future I am going to plug 26 sensors in total), so I want to make the express vi SELECT SIGNALS to work for all the sensors that are attached to the DAQ.

 

The second Issue that I have is that the data in only being collected for 1 second, and I want the device to work for 5 minutes during the experiment.

 

I wish you an excellent day,

 

Thanks for the help.

 

Best Regards,

Ricardo Hungria

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

Well, a better title (not all caps, please) would be "I Don't Know Enough LabVIEW to Program a Simple DAQmx Task".

 

Step 1 -- for anything other than a simple Demo to show students "how easy it is to collect data using LabVIEW -- you don't need to know any programming", you should always avoid the Dreaded DAQ Assistant and its Evil Twin, the Dynamic Data Wire.

Step 2 -- you need to learn the basics of LabVIEW (which you might have already done).

Step 3 -- when coming to the Forum to ask for help on your Program that doesn't work, you should always attach your program, either as an entire LabVIEW Project (compress the Folder that contains the Project and attach the resulting .ZIP file) or if it only has a few VIs, attach the VIs.  Among other things, this will let us judge if you "pass" Step 2.

Step 4 -- Read (and use the information in) Learn 10 Functions in NI-DAQmx and Handle 80 Percent of your Data Acquisition Applications.  

Step 5 -- Before trying to program your hardware, test your hardware with MAX.  [This will also let you create a Task that will simplify using DAQmx].  This can ensure that you are asking your hardware to do things "within range" (for example, not trying to program 9 channels on an 8-channel device).

 

Bob Schor

0 Kudos
Message 2 of 5
(2,047 Views)

Dear Bob_Schor, I have been trying to upload the VI, and and the Data Collection file, and just about five minutes ago, I was able to upload the files. As I stated before, I would like the express signals VI to allow me to collect more than 7 signals, and I would like the data collection file to give me results for at least 5 minutes (300 seconds).

Could you help me this issue?



Best Regards,

 Ricardo


@Bob_Schor wrote:

Well, a better title (not all caps, please) would be "I Don't Know Enough LabVIEW to Program a Simple DAQmx Task".

 

Step 1 -- for anything other than a simple Demo to show students "how easy it is to collect data using LabVIEW -- you don't need to know any programming", you should always avoid the Dreaded DAQ Assistant and its Evil Twin, the Dynamic Data Wire.

Step 2 -- you need to learn the basics of LabVIEW (which you might have already done).

Step 3 -- when coming to the Forum to ask for help on your Program that doesn't work, you should always attach your program, either as an entire LabVIEW Project (compress the Folder that contains the Project and attach the resulting .ZIP file) or if it only has a few VIs, attach the VIs.  Among other things, this will let us judge if you "pass" Step 2.

Step 4 -- Read (and use the information in) Learn 10 Functions in NI-DAQmx and Handle 80 Percent of your Data Acquisition Applications.  

Step 5 -- Before trying to program your hardware, test your hardware with MAX.  [This will also let you create a Task that will simplify using DAQmx].  This can ensure that you are asking your hardware to do things "within range" (for example, not trying to program 9 channels on an 8-channel device).

 

Bob Schor




Download All
0 Kudos
Message 3 of 5
(2,038 Views)

Here is your problem in the DAQ Assistant.  You are collecting 18 Million samples at a rate of 1 kHz.  That means it will take 18,000 seconds to get data, 300 minutes, or 5 hours.  Your DAQ buffer isn't big enough to collect that much, and the DAQ assistant will time out after 10 seconds anyway.  You need to collect smaller numbers of samples more frequently.

 

Please take Bob's advice and do some tutorials.

 

I don't understand your statement about not being able to select more than 7 channels.  But that is the least of your problems right now.  Once you learn LabVIEW and DAQmx, those problems will go away.

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

Thank you for attaching your VI.  It shows me you have only Express VIs and Dynamic Data Wires in your program, which (probably) means that you need to Learn More LabVIEW.  Here is my recommended Course of Action (which will lead you to be able to solve your own problem):

  1. Do my "Step 5" first.  Connect your hardware up to MAX and get MAX to acquire the 9 channels you want and to show them to you.  This article will explain how to set up Test Panels to test your devices.
  2. Next, do Step 4, and Learn 10 Functions in NI-DAQmx and Handle Your Data Acquisition Application.  It's been a while since I read it -- I just "revisited" it, and realize that it may be a little more "intimidating" at first than it should be.  So here's a Short Cut (there should be, and may there is, a White Paper explaining this Method, but if not, here it is):
    1. Open MAX (again).
    2. Create a Test Panel for your Device (as you did in Step 1) and configure it.
    3. Now click Create Task, choose your Device, and duplicate the setting you did in Test Panel.  Name this something sensible (DAQmx might want no spaces in the Task Name).
    4. Let's assume your task is Analog Input on some Channels, continuous acquisition at some frequency and some # of points.  You need three DAQmx functions to acquire one set of samples, and just need to add the Loop of your choice to collect multiple Samples.  The functions are DAQmx Start Task, DAQmx Read, and DAQmx Stop Task.  Drop them down on your Block Diagram and wire them together (in that order).  Since we are assuming Analog Input and multiple Channels, on the DAQmx Read, choose N Channels, N Samples, and I recommend 1D Array of Waveforms for the output.
    5. Right-click the Task input of Start Task and wire a constant.  See the little down-arrow on the (empty) Constant?  Click it -- it should show you the Task you created in Step 3.  Choose that Task.
      1. Now look at the DAQmx Read.  Read its Help (right-click on the Read and choose Help).  You want to wire something to the Number of Channels input -- if you remember how many channels you specified in the Task, wire this number.  If you forgot, get the Task to tell you.  Wire a DAQmx Timing Node (see the DAQmx Palette) between Start Task and Read, passing the Error Line and Task line through it.  Right-click the displayed Property and Select Property "Sample Quantity, Samples per Channel".  Right-click again and
      2.  
      3. "Change all to Read" (you want to read this Property).  Wire the Samples per Channel into the Read VI.
      4. Wire something to the Output of the Read VI (like a Chart) so you can see the Results.
    6. Run the VI.  It should take one set of samples and stop (which is what you programmed).  Think how you would make it take multiple sets of samples.
  3. If you can't follow these steps, do my Steps 1 and 2 (Learn more LabVIEW).

Here's how the 3 DAQmx Functions + 1 Property Node VI should look, with no Express VIs and none of those awful Dynamic Data Wires --

Simple DAQmx AISimple DAQmx AI

Bob Schor

 

P.S. -- after writing the above, in the hopes of teaching you enough that you can do this yourself, I took a look at your code, and noticed that your Express VI is configured for three Strain Gauges.  I've not worked with Strain Gauges, and don't know how the Module you are using to collect the samples works, nor what its limitations are (maybe it can't handle 9 signals?).  Of course, you need to have sufficient hardware to acquire the signals you need, so provide additional information.  Also, you talk about the total length of acqusition time (5 minutes = 300 seconds), but say nothing about the sampling rate you desire.  I see you asked the device to take 18 million samples at 1 kHz -- most DAQ devices don't have megabytes of internal memory to store that much data.  You need to learn more about Data Acquisition, I think -- go find an engineer who understands Signals, sampling, data sizes, etc. (or someone who has a few months experience with LabVIEW data acquisition to clue you in.

Message 5 of 5
(2,019 Views)