11-16-2011 10:26 AM - edited 11-16-2011 10:28 AM
In my program we enter a number of 9 digits and it should take every digit in that number and turn its corresponding light for 0.5 sec time difference between each digit. Im facing problem when i enter a number that has two identical consecutive integers, the light stays turned on. for example if we enter 201002438 the program will turn on the light for the zero digit for 1 sec without turning off. Can anyone help me please?
11-16-2011 10:37 AM
Do you want to leave the lights on for the numbers that have already been pressed? If not you will need to do this in two steps one that reads the numbers one at a time and then sends the correct light on for the specified time. The next step would be to send all of the light back to false for a small amount of time and then process the next number.
11-16-2011 10:50 AM
Something like this
11-16-2011 10:53 AM
11-16-2011 12:07 PM
Here is a slighly better way than what I orginally gave you. It is different than the design that you got on the other post but just as effective.
11-16-2011 12:35 PM - edited 11-16-2011 12:36 PM
Well, this is not exactly a duplicate post. In this case the OP was a bit less subtle about the origin of the problem, I would say the filename of the posted VI is a BIG hint. In the other thread, the filename is less suggestively named.
Or I could be wrong and two different posters had the same problem on the same day...
11-16-2011 12:55 PM
I think it's fairly obvious we're dealing with a homework hustler.
11-16-2011 01:09 PM
While we are teaching here there is one more small addition that I would add that would make it so you could input a number of any length and the software would automacally handle it.
11-16-2011 01:35 PM
@aeastet wrote:
While we are teaching here there is one more small addition that I would add that would make it so you could input a number of any length and the software would automacally handle it.
Are you teaching, or simply doing his (and the other fellow's homework)?
11-16-2011 02:02 PM
He at least had something to start with. I have seen many others on here that simply stated a problem and demanded a solution. I would also like to believe that even if the OP doesn't learn from what I did that someone else may see something that they could use somewhere else. I see things on here occasionally that I never new before even if I didn't use it the was the OP was using it.