ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable DAQ using boolean control

yeah true,,

 

all this boolean idea is to ensure i use ONLY ONE channel to control one LED color whether its manual control or by file because i only have 4 channels and 4 led colors so i have to find a way to use only one channel :/.

 

so that means no way to do this only by increasing the number of channels?

0 Kudos
Message 11 of 18
(1,875 Views)

I don't quite understand. You can use as many channels as you have on the DAQ board. Why are you objecting to using 1 channel per color?

0 Kudos
Message 12 of 18
(1,869 Views)

i have only 4 analogue channels ( 2 DAQ each with 2 analogue channales)  each controls on color so im having a limit on that. 

0 Kudos
Message 13 of 18
(1,866 Views)

You are still confusing me. You said you have 4 LED colors so doesn't that mean you want 4 analog outputs? Perhaps if you explain exactly what you are trying to drive.

0 Kudos
Message 14 of 18
(1,861 Views)

I have 4 led colors and each one of them is connected to one DAQ port  

example

red is connected to daq1-ao

blue is connected to daq1-a1

green is connected to daq2-a0

amber is connected to daq2-a1

 

so in my GUI i have two modes: 

one running by file ( the output will be listed in array form each connected to one daq port using array index to control one color intensity)

and the other manual control ( four vertical sliders each connected to one daq port to control one color intensity)

 

 

now i want to use the same port to send two different analogue outputs: sometimes from the manual mode and sometimes from running by file mode. BUT I WANT TO USE THE SAME DAQ PORT.

 

that is why i need to disable one of them to be used to send signal to that channel at a time = giving the user one option, either using the manual control or running by file contro;..

 

 

is it clear now? i can send u my gui in an hour time. i dont have labview installed here, only in my university labs.

 

0 Kudos
Message 15 of 18
(1,856 Views)

So fine. What I described earlier will work then. You will write data for ch1 from either a file or a control, write data to ch2 from either a file or a control. The disabling will just be a visual thing. You will be actually enabling/disabling one or the other because one or the other would be in a case statement.

 

 

0 Kudos
Message 16 of 18
(1,849 Views)

Hi, i tried it in the lab today it doesnt work, the daq doesnt change its value

is there a way i can disable part of the gui by pressing boolean button ? maybe i can disable one part at a time and run the other,. like when manual control is on the other mode running by file gets disabled and vice versa.

thx

0 Kudos
Message 17 of 18
(1,835 Views)

You can choose to read or not read any front panel controls that you want. I showed you one way with case statements. Another is to run different states in a state machine. Since 'it doesn't work' is a pretty bad description of what exactly is wrong and you have not posted your code, I don't see how I or anyone else can help. Please understand the basics of LabVIEW and programming in general. Disabling part of the GUI means modifications to the block diagram/code. A front panel control can be disabled with a right click option but that only means a user cannot change the value. The control would still be read unless you make a modification as I already mentioned.

0 Kudos
Message 18 of 18
(1,826 Views)