01-15-2011 02:40 PM
Hi guys. i am fairly familiar with Labview now but cant seen to get my head around this problem. i have a slider which is numbered from 1 to 10. below the slider i inserted 10 LED lights. my aim sis to use the slider to turn on and off the lights. for an exmaple, when i set the slider to one, the light on the far left should go on. when i set the slider to 2, the first light should go on and the second light next to it should go on, and the pattern continues. i thought of using the number to array boolean but it didnt seem to do the trick. could you please help me out. i have attached the basic layout of how i wanted the objects to be arranged
kind regards
joe
Solved! Go to Solution.
01-15-2011 04:20 PM
Maybe something like this?
01-15-2011 04:23 PM
Genius! totally what i was looking for. thats a lot
01-15-2011 06:12 PM
Ok i followed your example and is definatley a step foward. for the bast hr and a half i have battling to figure out why i cant get the program to work with negative numbers. i have resized the slides scale to -1 and 1 with 0 inbetween. -1 should turn on the red light on the left, 1 should turn on the green light on the left and 0 is neutral, all lights are off. i have got the 0 and 1 working as expected but cant get the -1 to respond :s. any tips again please?
01-15-2011 06:23 PM
Ok i think i have done it the right way :D. let me know what you think
01-15-2011 07:16 PM - edited 01-15-2011 07:18 PM
Overly complicated.
01-15-2011 07:28 PM
If you still want multiple LEDs on each side, here's one possibility... (For only two LEDs, use Dennis's solution.)
01-16-2011 03:11 PM
wow! simplicity at its best! thats really straight forward to understand. i think you are right about making complicated circuits. the reason why i had asked to know how to do this was because i wanted to learn how to control motor directions using a slider. so after i thought i had got the easiest way of giving out 2 different outputs using a slider, i replaced the lights with switches that changed the direction of the motor. i successfully did this for the first motor and it rotated fairly well, but wanted to control 4 in total. so i simply copied and pasted the code and re-asigned the switches to different motors. when i did this, the results did work BUT the motors went very very slow. the movement was not steady and kept skipping. i think this its due to the coding being overly complicated thefore causing a serious lag. if you could please have a look
kind regards
joe
01-16-2011 03:20 PM
Why do you coninue to post if you do not take the given advice? Why should anyone answer when the advice is ignored?
01-16-2011 03:26 PM
i apologise. i didnt mean to seem like i was ignoring feedback. i just wanted to show what i had done so far. im working on the code now as we speak using the picture provided from the previous post.
kind regards