Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Directsoft 5 Subroutine

Status
Not open for further replies.

TransD

Electrical
May 15, 2011
21
US

I am programming a subroutine in Directsoft 5. The subroutine scrolls through indicator lights when activated. When coming out of the subroutine, sometimes one of my indicator lights sticks on. It depends on when I flip the switch to come out of the subroutine as to which one of the lights stick on sometimes. I have tried the RSTI command in Directsoft 5 but to no avail. Can anyone help steer me in the right direction? Thanks.
 
Replies continue below

Recommended for you

I would have to see you code to render a reply.
 
I'm new to this too, so take this for what it's worth, but remember your sub only runs when it's called EACH cycle. If the the condition that calls the sub is no longer true, then the sub will not run and "clean up" at the end. I think a flag is the way to call the sub. That way you can make sure the sub finishes doing everything you want and then clears the flag.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top