LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to run two inputs in one loop?

I'm trying to run a while loop that has two inputs and one output.
The two programs are:
-A Thermocouple which is connected to a controller which sends an output
-A flowmeter that sends an input voltage to be read in LabView.

When I run both programs separately they work fine, but when running in the same loop I get an error.
The Error is in the input DAQ assitant of the Thermocouple. This is the message:

"Error - 50103 occured at DAQmx Readv(Analog 1D wfm NChan NSamp).vi."

This error also comes up when running both programs on separate loops, separate files, but simultaneously. I think I'm just missing a command. Is that right?

Can someone help me to figure out what the problem may be.

Thanks!!!!
0 Kudos
Message 1 of 7
(3,046 Views)
You've probably trying to read two different analog inputs on the same board with two separate DAQmx tasks. Instead of a separate task for each analog read, have a single task that reads both channels.
0 Kudos
Message 2 of 7
(3,029 Views)
My problem is that the inputs are one voltage and the other is a temperature read by a thermocouple. When I try to set up the thermocouple in the list of the input voltage tasks, it stays with the voltage specifications. In other words, the reading is not correct.

What should I do?
0 Kudos
Message 3 of 7
(3,022 Views)
What version of NI-Daq are you using? Prior to 7.4 you couldn't mix measurement types in one task, so you were forced to create individual DAQmx Global channels then use them individually in your DAQ section. In NI-MAX 7.4 you can now create a single task that has different types of measurements, then call that task in your DAQ area of code. It NI-Max7.4 is a big file, but the download is free from the NI download site.


Putnam Monroe
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 4 of 7
(3,019 Views)
Hi Putnam,

I have version 7.1, so I think I would have to set up different DAQmx's for my inputs (voltage from a flowmeter and temperature from a Thermocouple.) That is what I have been doing from the very beginning, but when I run the program I get an error message:

"Error - 50103 occured at DAQmx Readv(Analog 1D wfm NChan NSamp).vi."

Do you know where the error may be?

Thanks!!!

Gustavo
0 Kudos
Message 5 of 7
(3,008 Views)
I think you should try what I suggested. Look at the attachment. There are two separate create channel functions (one for voltage and one for tc) but a single DAQ task.

p.s. 7.4 refers to the version of NI-DAQ not NI-MAX. You have version 7.1 of LabVIEW. I would recomend the upgrade of NI-DAQ.
0 Kudos
Message 6 of 7
(3,001 Views)
Oops, started the message refering Ni-DAQ and mistyped Ni-MAX, mid-afternoon slump I guess. As Dennis' vi shows you can configure each of the channels seperately, by configuring NI-DAQmx global channels and then calling them from your program. I would recommend Ni-DAQ 7.4, it has solved a couple of issues that I was having at one customer and has some interesting features. One is the ability to simulate a number of NI DAQ cards in NI-Max. Although the simulations are not very complete they allow doing configuration in your LabVIEW program without actually having the board(s) installed in your development system.

Putnam Monroe
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 7 of 7
(2,988 Views)