Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically remove devices from Max

I have one laptop that can be connected to different cDAQ systems.  Each system is identical built with a cDAQ 9178 with 4 modules.  The VIs are written using DAQAssistant for data collection.  Every time a different system is connected, NIMax loads the system but with a different alias name.  Becasue of the different alias name, the code does not see the connected chassis.  What is the best way to resolve this issue without having to open NIMax to manually remove the chassis that is not connected so that the connected chassis is loaded with the correct alias?

0 Kudos
Message 1 of 4
(4,660 Views)

I would suggest doing an export from MAX on a system that is configured the way that you want.

 

http://digital.ni.com/public.nsf/allkb/0E0D3D7C4AA8903886256B29000C9D5A

 

Then programmatically using the NI System Configuration Import (mode Replace All) from your application to ensure the system is always configured the way that you want.

 

http://zone.ni.com/reference/en-XX/help/373107E-01/nisyscfg/import/

0 Kudos
Message 2 of 4
(4,628 Views)

Hi VPEA,

 

I would not recommend trying programatically delete devices in MAX. I think a good way to get around this is to give each chassis an alias in MAX. Then, simply change the alias in your LabVIEW application to match the appropriate device. You can then switch between chassis as needed just by using the VIs. I hope this helps.

 

 

Best Regards,

Roel F.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 4
(4,624 Views)

Thanks for the responses and sorry for my delay.  I have been pulled to another part of the code for now.  When I return to this part, I will try these recommendations and will reply again.  Thanks again.

0 Kudos
Message 4 of 4
(4,564 Views)