06-25-2013 08:30 PM
i have an incoming boolean state, when true the led turns on. all i need is after 100ms turn the led off again. i'm having real difficulties coming up with a solution. the attached image shows i tried with Elapsed Time but it only works the first go-around and I can't figure out how to reset this timer to 0 at the beginning of the loop.
06-26-2013 08:12 AM
I think I got it to work, although it may not be the correct approach, but if it works it works right?!
06-26-2013 08:35 AM - edited 06-26-2013 08:38 AM
Be careful with the exagerated use of local variables. Why don't you simply wire the "Numeric" indicator instead of using several read/write local variables for the same value?
I've made something. It's still not the best approach, but it's way more simple.
[EDIT: Today it's not my day. I'm having issues to attach an image. What I would do is to create a case structure: IF something is TRUE, then your led is true. Use wait(ms) to determine the delay.]
06-27-2013 02:51 AM
Here's an option:
If your program is going to become more complex, consider using a state machine.
steve
07-15-2013 12:39 PM
HI,
Can you attach an image for the program? I am getting problems in creating one.
Thank You