LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Select different devices and configuring differents properties channels.

hi,

I have two LAN devices (cDAQ9181-Name1, cDAQ9181-Name2), which I need to select one or another in the front panel options. Both are the same but I need that my code could choose one or other. And after that I need to configure a different parameters in each channel. For example:

 

Channel ai.0--> differential, max value 20 minimum value -1 custom scale 30A

Channel ai.1--> differential, max value 3.6 minim value 0. scale 12V

...

 

How can I select first the device and after that the configuration?

Could anybody help me?

 

Thanks,

 

regards,

 

Anna. 

regards,

 

Anna. 

 

 

 

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

Do your channels change all the time and you really have to be able to define Min/Max/Custom scale at run-time? If not, the easiest is to define everything in MAX under two different Tasks (one for Device A and one for Device B).  Then, all you need to do is select the "Task" ("DAQmxTaskName" control) and run your application.

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

Hi,

The only thing that can change it is the name of the device, but how I can configurate each channels depend on the device? 

0 Kudos
Message 3 of 5
(2,519 Views)

Go into Measurment and Automation Explorer (MAX).  Normally, I create "Global virtual channels" and then create tasks from those channels that are already configured with range, scaling and DIFF/NRSE.  The task will decide of the rate.

 

Are you familiar with MAX?  If not, you should open it and learn more about the "Global Virtual Channels"

 

On the left hand side, Select "My System" -> "Data Neighborhood" -> "NI-DAQmx Global Virtual Channels"  and create a new one.  You will see the options offered. Once you've created those GVC, select the "NI-DAQmx Tasks" and create a new one.  After it is created, select it and look at all the timing options at the bottom of the window.  Everything should be ready to be used in your application.

 

In your application, you can let the user select a Task (name the tasks according to the cDAQ if you wish to make it look like you are listing the devices.)

 

 

 

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

Continuing with information from this thread:http://forums.ni.com/t5/Multifunction-DAQ/General-DAQ-adquisition-program-read-and-save-in-a-file/m-...

 

You are making things way more difficult on yourself than it needs to be.  Setup 1 task to handle reading both the currents and voltages.  Use the Configure Logging VI in the DAQmx->Advanced palette.  If you want a good example of how to use this, go to the LabVIEW Example Finder and do a search for "voltage - continuous input".  You should be able to find a VI of that name in the list.

 

Now for the view, you can right-click on the legend of your graph and select "Visible Items->Plot Visibility Checkbox".  This way a user can select exactly which signals they will see.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(2,475 Views)