08-29-2012 04:29 AM
I want to create a program for students to take exam on. The number of questions can change from exam to exam... so let say we have an exam of 25 questions.
now i want create a box with a scroll bar in it, and inside this box will be the round LED's, each has the number of question from 1 to 25. and when the student click on any of them it automatically take them to that question. (e.g. if a student clicked on the LED numbered 21, it will take them to question 21).
I have no problem with writing the program... but I only have one problem: I will be changing the number of questions everytime, so I want to control the number of LED in that box via controller. so when I tell LabVIEW i have 35 quesstions, the program would generate 35 LED in that box... and if i change the control to 33, the program would automatically hide 2 LED's... (so more of an array of round LED that you can control its size)
is that possible?
Solved! Go to Solution.
08-29-2012 05:05 AM
Hi Mina,
See the thread below.It is discussing a problem similar to you:-
http://forums.ni.com/t5/LabVIEW/How-to-create-a-grid-with-arrays-and-booleans/m-p/1036520
08-29-2012 05:19 AM - edited 08-29-2012 05:26 AM
Have a cluster with lets say 100 LEDs
Based on your input control the visibilty of the LEDS in the cluster.
08-29-2012 05:44 AM
can you send me the vi of this picture you posted. i doubt i can write such complicated function.
08-29-2012 06:07 AM
Mina,
You can save that image as png file and then drag to your block diagram to get the code.I have attached the code.FP may not be neat .. But serves the purpose
08-29-2012 03:25 PM
Like this?
08-29-2012 03:39 PM - edited 08-29-2012 03:39 PM
I would go for array instead of cluster. Try the attached one with slight modification
08-29-2012 05:15 PM
thank you so much for the suggestions, but I still have two problems with it:
1- first, i need the control array to be numbered (i mean like above each LED, i need the number of the question from 1 to say 20, so they can know which to click on.
2- I need to design a boolen function so that only one LED light can be ON at any time. for example, if 15 is ON, and you clicked on 17, then 15 should goes OFF.
Thanks so much agian for helping me all 🙂
08-30-2012 02:37 AM
I have added the additional features.If you have not yet found a solution it will help to get started
Again - I have used Cluster. You may implement the same with Arrays,except for the fact that individual Labels may not be allowed for array elements
I have not checked it
08-30-2012 09:05 AM
Try this.