02-11-2020 10:40 AM
I am trying to acquire data across 3 load cells and record the 3 curves from a waveform graph as well as record the peak values reached. The module I am using is NI 9237 and program is LabVIEW 2016. In researching how to do it, it seems like I need to set up a trigger to acquire data between the desired set of values and save the sample, but from what I can find it seems that NI 9237 is not capable of setting up a trigger by itself (the trigger options within DAQ Assistant are all greyed out). See the attached file and snapshot below. Any help with this would be greatly appreciated!
02-11-2020 10:57 AM
I don't understand your definition of trigger in the example VI you posted. Trigger means something like "don't start acquiring until something else happens", like a digital input detecting a switch.
What is your "trigger" in the example you posted?
In your example, you are just acquiring data and writing to a file. So just do that. If you are saying "don't write data to a file until the values have peaked", then just keep acquiring data until your conditions are met, and when they are write to the file which is placed in a case structure.
02-11-2020 11:27 AM
My terminology was probably confusing, I am still very new to LabVIEW.
Basically, I need to start recording data only when the load is increasing and has reached a peak. The way I have the code currently, it just records everything including the zero load/noise values at the beginning which I don't want. So using your example, I meant trigger in the sense of: "Don't start acquiring data until the load has reached at least 5lbs, and stop acquiring data after all 3 load cells have reached a peak." Hopefully that clarifies the problem a little better.
Thanks
02-11-2020 11:52 AM
Well you have to acquire data because how else would you know if a level has been reached unless you are reading it.
You need to understand that you can put the part about "recording" the data to a file in a case structure based on the conditions of the data that you just read.
I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
Learn LabVIEW
02-11-2020
11:56 AM
- last edited on
12-20-2024
06:11 PM
by
Content Cleaner
Hi jpartain,
You should continuously acquire data and then pick out the data that meets your criteria after the fact. It will be much easier if you get rid of the "dynamic data" and express VIs. The express VI is a nice way to test out hardware functionality, but for anything beyond that you should just use the DAQmx functions you need. This should help you collect data faster as well, since you can open the instrument reference prior to the loop, and close it after the loop, instead of doing it every single iteration which is what the express VI does.
02-11-2020 01:24 PM
Thank you both for your input.
I'll work on it for a while and try to implement some of things we discussed and then post an update later with the results and (more likely) any more problems that arise!
02-11-2020 03:30 PM
Gregory,
I'm working on implementing DAQmx VI's instead of the Express like you suggested and I'm stuck here now. I've simplified it down to a single load cell reading for now just to make things simpler to figure out, then I can add the remaining load cells later. See below for what I've got so far.
02-11-2020 03:45 PM
Hi jpartain,
Can you explain why you're stuck? Are you seeing an error?
02-11-2020 03:56 PM
Yes I am getting Error 200077 at the Start Task VI. The program will run, but it doesn't record any data at all and when I stop it, this error appears. The load cell that this is reading is rated for 2000lbs, so I set the minimum to 0 and the max to 2000 in the Create Channel VI, but the Start Task VI seems to not accept those parameters.
02-11-2020 04:02 PM
Yes those might be voltages if you have not set any kinds of units. You can right click the DAQ Assistant >> Generate NI-DAQmx Code. Then look at the code it generates to see what settings you were using.