News:

  • June 26, 2026, 09:16:51 PM

Login with username, password and session length

Author Topic: Program code block stops after runtime edit  (Read 9243 times)

davidbgtx

  • Hero Member
  • *****
  • Posts: 215
  • Host be the Most
Program code block stops after runtime edit
« 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

davidbgtx

  • Hero Member
  • *****
  • Posts: 215
  • Host be the Most
Re: Program code block stops after runtime edit
« Reply #1 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?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Program code block stops after runtime edit
« Reply #2 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.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

davidbgtx

  • Hero Member
  • *****
  • Posts: 215
  • Host be the Most
Re: Program code block stops after runtime edit
« Reply #3 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?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Program code block stops after runtime edit
« Reply #4 on: July 06, 2017, 09:17:01 AM »
Main. Just drive it with the same input condition as the EXIT.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

davidbgtx

  • Hero Member
  • *****
  • Posts: 215
  • Host be the Most
Re: Program code block stops after runtime edit
« Reply #5 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.

davidbgtx

  • Hero Member
  • *****
  • Posts: 215
  • Host be the Most
Re: Program code block stops after runtime edit
« Reply #6 on: July 06, 2017, 10:21:48 AM »
Redid the rung for run program Line_Run, and that fixed the issue. Thanks again.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Program code block stops after runtime edit
« Reply #7 on: July 06, 2017, 10:23:55 AM »
Redid the rung for run program Line_Run, and that fixed the issue. Thanks again.

Awesome!
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO