LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[cDAQ] - Autosearch & Connecting

Is there a way for LabVIEW to automatically search for the cDAQ that is connected to the computer and reconfigure the ports I want to connect to? I know whenever I plug my cDAQ into a different port it ends up creating another cDAQ item on NI MAX i.e. cDAQ2, cDAQ3, etc and this will make my program not run anymore. I am curious as to how I would be able to search for the specific cDAQ that is connected (only one is connected at any given time) and reconnect my port & lines accordingly to the cDAQ.

0 Kudos
Message 1 of 4
(3,028 Views)

Hi Allan,

 

- you can search for currently active devices using a DAQmx property node

- you can read the hardware serial number for each DAQmx device using a property node

- you can read the hardware type ("name") for each DAQmx device using a property node

 

When you have done those steps all you need to do is simply look for cDAQ devices with correct hardware serial!

Then you know the DAQmx device name (like "Dev0") and you can use/build the correct port/channel names…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(3,025 Views)

I am new to property nodes could you show me an example of how this would be done exactly?

 

0 Kudos
Message 3 of 4
(3,001 Views)

Hi Allan,

 

try this:

check.png

I'm using a German LabVIEW version: Gerätenamen = device names, AktivesGerät = active device, GerätSeriennr = device serial number…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 4
(2,988 Views)