07-19-2021 03:39 PM
Hi All,
I am very new to LabVIEW and have no real training on how to use it other than what I have read online. I am having an issue creating a program that uses a NI compact DAQ system along with current input and thermocouple cards in order to monitor 4 temperatures and 3 pressures (from pressure transducers). I have set up multiple MAX tasks in order to specify which terminal each temperature or pressure will read from as well as ranges and scales (for current to pressure). Currently the VI is giving the error
"Error -50103 occurred at DAQmx Start Task.vi:7220001
Possible reason(s):
The specified resource is reserved. The operation could not be completed as specified."
I need to read the temperatures and pressures every one minute and write the data to a csv file, I would also like to be able to create a new file to write on each time the program is run and subsequently stopped, preferably with a date and time stamp. The VI I am using is attached below, please respond with tips or information on what I can do.
07-20-2021 03:35 AM
Hi prosep,
@prosep91 wrote:
I have set up multiple MAX tasks in order to specify which terminal each temperature or pressure will read from as well as ranges and scales (for current to pressure). Currently the VI is giving the error
"Error -50103 occurred at DAQmx Start Task.vi:7220001
Possible reason(s):
The specified resource is reserved. The operation could not be completed as specified."
Most probably you are trying to create DAQmx tasks, which contain exactly one channel. This is only supported by DAQ hardware using one ADC per channel, while most DAQs only use one ADC and a MUX for all channels!
Simple rule: for DAQ devices with one ADC+MUX you need to setup just one DAQmx task for all channels.
As you setup those task in MAX we cannot examine your settings just from looking at the VI.
(I prefer to define DAQmx task in the VI using plain DAQmx functions!)
07-20-2021 08:53 AM - edited 07-20-2021 08:58 AM
Hi prosep,
now I had a chance to look into your VI…
After cleaning up (just a little bit) I get this:
07-20-2021 09:49 AM
Hey GerdW,
So I deleted the While Loop along the outside and removed the unnecessary tag channels. Do I need to put my DAQmx read functions in series of one another in order for one task to initiate all of them? Or do I just need to connect one task that includes all channels to each one as is. Currently the T1 1001-1003 functions all use the same temp range and are just different terminals on one DAQ card, T1 1004 uses a differrent temp range. Pi 1001-1003 all use the same scale and likewise are just different terminals on a current input DAQ card. Please let me know what you recommend doing.
07-20-2021 10:07 AM
07-21-2021 10:04 AM
Hi GerdW,
I have attached my revised VI below, as well as my trial data sheet. My temperature ranges for T1 1001-1003 is 0-150 C and T1 1004 is -20-20 C. Pressure was scaled from 4-20 mA to -30-190 psi for all P1 channels. The DAQ cards are not wired up yet but I am wondering if the data eludes to error in the program. Also do you know how I can get the delimited spreadsheet to denote a date and time stamp when started and create a new file with a certain name each time the program is started?
Thanks,
Prosep
07-22-2021 03:08 AM
Hi prosep,
@prosep91 wrote:
Also do you know how I can get the delimited spreadsheet to denote a date and time stamp when started and create a new file with a certain name each time the program is started?
07-22-2021 08:57 AM
Hi prosep,
@prosep91 wrote:
I have attached my revised VI below, as well as my trial data sheet. My temperature ranges for T1 1001-1003 is 0-150 C and T1 1004 is -20-20 C. Pressure was scaled from 4-20 mA to -30-190 psi for all P1 channels. The DAQ cards are not wired up yet but I am wondering if the data eludes to error in the program.
The VI looks much better now!
You still can improve it:
When you want to use a different filename for each run of your VI then you should not use a filename constant! Build your filepath using BuildPath and string formatting functions…