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: 

N Channel independent configuration with DAQmx

For an application, where I need to give the user, the options of configuring 8 analog channels independently, what would be the best way to go ? ( He needs to set the min, max values, samples and acquistion type - SE, Diff etc )

Use 8 sets of "DAQmx CreateChannel( AI_Voltage_Basic)+ DAQmx Start Task + DAQmx Read VIs" or is there a VI which does this configuration as a single sub-VI ? I have searched enough to find one such.

Any ideas that can provide a compact solution would be welcome.

Thanks

Raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 1 of 4
(2,302 Views)
Hello Raghunathan,

Thank you for contacting National Instruments.

If you want to configure each channel independently, you will have to create a Task with all channels you want to modify, then pass that Task to a Channel Property Node. You can then set the options for each channel independently. First you select the channel(s) you want to modify, then you set the properties to modify below. You can do this for as many channels as you like in one Property Node.

See the attached VI for an example of this.

I hope this helps,

Sean C.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,296 Views)

@Sean C. wrote:
Hello Raghunathan,

...you will have to create a Task with all channels you want to modify, then pass that Task to a Channel Property Node. You can then set the options for each channel independently. ...

See the attached VI for an example of this.

I hope this helps,

Sean C.
Applications Engineer
National Instruments




Dear Sean,

Thanks.

I guess I got your point. Let me repeat the steps - just to make sure:

1. In the example sent by you, create the required properties for all 8 channels using "add element".

2. Give a descriptive name for each channel.

3. Next click on each node and select "Create Control". This will provide the required user control on the panel.

4. Group all properties for each channel ( min, max,type,etc) properly and lay them out neatly.

5. Finally pass the duplicate reference out of this synthesised proprty node to a DAQmx Read VI.

Is that right ?

Now I think I sort of realise the power of DAQmx VIs.

Regards

Raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 3 of 4
(2,286 Views)
Hello Raghunathan,

That is basically correct. Be aware that the channel names that are wired to the "ActiveChans" property were not assigned. Those are the physical names of the channel. If you have set up your task to use virtual channels, then you can use the virtual channel names instead. Also be aware that the "ActiveChans" property indicates that all of the following properties apply to that channel.

I hope this helps,

Sean C.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,268 Views)