02-18-2013 05:28 PM
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?
02-18-2013 05:46 PM
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?
02-18-2013 05:52 PM
i have only 4 analogue channels ( 2 DAQ each with 2 analogue channales) each controls on color so im having a limit on that.
02-18-2013 05:58 PM
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.
02-18-2013 06:06 PM
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.
02-18-2013 06:18 PM - edited 02-18-2013 06:18 PM
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.
02-19-2013 05:24 AM
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
02-19-2013 09:18 AM
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.