02-18-2013 03:40 PM
Hi everyone,
im trying to use two types of control ( numeric control) and ( vertical slider) to output analouge signal to the same port of DAQ ( lets say port ao). the problem is if i do that the DAQ will give error because the channel is shared. that is why i was thinking if there is a way to use boolean switch in order to disable the DAQ attached to one controller at a time?
for example if the switch is 1 it enables the numeric control and disables the vertical slider, and if its 0 it enables the vertical slider and disable the numeric control FOR THE SAME DAQ PORT (ONE PORT).
thanks alot.
🙂
02-18-2013 04:00 PM
I don't understand why you need two different controls and what you are calling a controller. If you want a vertical slider and a numeric control to set an analog output, simply right click on the slider and select Visible Items>Digital Display. Then you have a single control for setting the voltage.
02-18-2013 04:14 PM
oh sorry i didnt explain why i need that,
the numeric control is because im importing data from txt file to labview and they will be printed in numeric array and im using array index to send it to the DAQ to control the LED intensity so its is not manual adjusting its imported data.
the vertical slider is to make it manual control so when i dont have data to import to labview i use the sliders to adjust the analogue output of the DAQ
02-18-2013 04:25 PM
Then you just need a Boolean to switch between manual and file?
02-18-2013 04:26 PM - edited 02-18-2013 04:27 PM
yeah, but i dont know how to disable and enable the daq in labview.
02-18-2013 04:30 PM
I'm not sure why you really need to enable/disable anything since the manual control would be inside a case statement and would have no affect but you would use the disabled property to enable/disable a control. Just right click, select Create>Property Node and browse to the Disabled property. When it is created, you will need to right click on it and change it to Write. Right click on that to create a constant.
02-18-2013 04:39 PM
you mean only the (disable/enable) box of slider inside case structure and i keep the slider outside the case structure? sorry im new in labview if u find my questions a bit lame.
and how to disable the importing file feature when the sliders are ON?
02-18-2013 04:59 PM
I would imagine a simple case statement wired to a Boolean with text Import/Manual. The case statement would have property nodes inside to enable/disable and have the read file code in one case and the slider in the other.
02-18-2013 05:08 PM
wouldnt this still give error because the same DAQ port will be connected to two control elements?
i dont have labview now i will have access to it in 2 hours time when the lab opens
i will try it and let you know but i guess the VI refuses same port of daq used twice in one GUI.
and one more thing if you dont mind, i have asked for help once in the forum about gaussian best fit function. they helped me to create plot but i dont know how to place the gaussian best fit to it, do u mind if u give a look to it?
02-18-2013 05:21 PM
If you are using two separate analog outputs, then you would have an error whether the voltage is coming from a file or from a control, right? If in one case you drive 2 channels and in the other only one, you would have to stop whatever task that might be running and create a new task. On the other hand, if you always are going to have two channels, then you must use a single task and a single DAQmx Write.