From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating channels for typed-in user input in DAQMX

Good Day!
I am working on a program to collect approximately 30 different signals (voltage, thermocouple, and current signals), to monitor and analyze a waste-heat recovery system. I would like to create several channels in the program structure which source their data from values that are typed in by the user. For example, I would like the user to have the ability to type in the speed/RPM of a machine and have that value saved simultaneously with the data coming from the voltage/current/thermocouple cards. This seems like it should be fairly straightforward, but I can't seem to figure it out.

 

I have attached the most up-to-date version of the VI, which does not contain the user-input data lines that I'm referring to. Can anyone point me towards some resources to help me learn how to do this?

0 Kudos
Message 1 of 7
(2,543 Views)

Hello meierdh

 

I saw your VI, do you mind walking me through it a little bit. I assume that the first section is you creating all of the channels and the while loop is the one responsible for acquiring the data. I also saw that you created all of the channels in the same task, is there a reason for you to do that?

 

Regards

Sebastián

Message 2 of 7
(2,477 Views)

Hi,

You are correct in that the first section creates and configures all of the channels. However, the data is saved just upstream of the while loop. The while loop is used to display the data on the front panel. I created all of the channels on the same task because it seems easiest and most efficient - do you think it should be done differently?

0 Kudos
Message 3 of 7
(2,453 Views)

meirdh,

 

Well, when I create a task in LabVIEW or NI MAX i create a different task for each measurement type, i.e. a task for voltage, one for current and one for temperature (like for your case). I haven't tried doing it all in the same task. Have you tried it, is it working? I will try to do it in the afternoon and let you know what results I come across.

Message 4 of 7
(2,441 Views)

Sebesrasa,

It works just fine, but I am just having a hard time creating a place for the user to enter values while the VI is running. Essentially, what I would like to do is create additional channels which are not linked to a particular physical input, but instead are linked to the front panel where the user has the option to enter a number as the Vi runs. 

0 Kudos
Message 5 of 7
(2,421 Views)

meierdh,

 

When you create a channel it is always linked to a physical input, because that channel will be linked to the characteristics of the device you are using for measurement. When you say you wish to link some data to the front panel? Do you mean to create a simulated signal? If that is the case, then using a DAQmx task will not work because a DAQmx task will always take real measurements. If you want to create a simulated signal, you can do that with the Signal Generation VIs and you can configure to control them through the Front Panel

Message 6 of 7
(2,409 Views)

I ended up solving this on my own. I haven't tested it extensively yet, but it seems to be working in initial tests. See the attached code if you're interested. 

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