LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I limit the physical channels a user can select from?

Currently taking a LabVIEW course, and one of the tasks for the code I'm making is to allow the user to select between the ai0 and ai1 (or both) channels in the front panel. I'm using an NI-myDAQ with the DAQmx driver functions, and at the moment i just have a regular physical channel control hooked to the create channel function. But it allows the user to select from channels that aren't compatible with the rest of the program. How do I limit the user selection to only the two channels i want? I know from the rules y'all can't do my homework for me, but hopefully asking for advice/suggestions such as this isn't too much.

0 Kudos
Message 1 of 2
(1,714 Views)

Hi bret,

 

basic idea: implement an enum with 3 items (ai0, ai1, ai0+1) and wire it to a case structure. Inside the case structure you prepare the correct DAQmx channel constant for each selection…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(1,706 Views)