Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: davidbgtx on July 06, 2017, 08:28:54 AM

Title: Program code block stops after runtime edit
Post by: davidbgtx on July 06, 2017, 08:28:54 AM
I have a program code block (Line_Run)that after performing a Runtime Edit, randomly stops. In attached pics you can see that the enable rung is true and the exit rung is false. I have to switch PLC to program mode then back to run to get the code block to run again. Please help
Title: Re: Program code block stops after runtime edit
Post by: davidbgtx on July 06, 2017, 08:43:08 AM
Noticed that PLC was 1.41 version. I updatre to 2.02 and 3.07. Will see if that helps any. Was this a known bug in 1.41?
Title: Re: Program code block stops after runtime edit
Post by: BobO on July 06, 2017, 08:53:10 AM
No bug that I'm aware of.

Probably not a relevant point, but the enable state of the RUN has no effect on a running block. RUN is edge triggered, so it starts a block on input edge, then does nothing.

I would like to see you use the EXIT condition to drive a counter in code that always runs, to confirm that it isn't firing.
Title: Re: Program code block stops after runtime edit
Post by: davidbgtx on July 06, 2017, 09:02:22 AM
I would like to see you use the EXIT condition to drive a counter in code that always runs, to confirm that it isn't firing.
[/quote]

in the main or Line_Run code block?
Title: Re: Program code block stops after runtime edit
Post by: BobO on July 06, 2017, 09:17:01 AM
Main. Just drive it with the same input condition as the EXIT.
Title: Re: Program code block stops after runtime edit
Post by: davidbgtx on July 06, 2017, 09:31:40 AM
Yeah, edge triggered, forgot all about that. That's my problem, I've "or"ed the run so it can't restart once I exited. Back to the drawing board, thanks for your help.
Title: Re: Program code block stops after runtime edit
Post by: davidbgtx on July 06, 2017, 10:21:48 AM
Redid the rung for run program Line_Run, and that fixed the issue. Thanks again.
Title: Re: Program code block stops after runtime edit
Post by: BobO on July 06, 2017, 10:23:55 AM
Redid the rung for run program Line_Run, and that fixed the issue. Thanks again.

Awesome!