News:

  • April 30, 2024, 12:05:27 PM

Login with username, password and session length

Author Topic: Stage Retentive Bits  (Read 2175 times)

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Stage Retentive Bits
« on: August 11, 2017, 09:41:36 AM »
I was on my scheduled days off when I was contacted by a supervisor with an issue with one of my projects. He claims the jogging bits were hanging up and not resetting, causing issues. The machine ran for months with no issue, so I don't know what caused it because I wasn't on site. I talked him through resetting the bits to the proper state through text, and it was the last I heard of it. I'm back in today, so I got a chance to talk to him and look at the project. He had talked to AD support, and they said the stages could be causing it to hang up. I don't see how that could happen. Here is my logic:



This is a dancer setpoint. The line ramps to a stop before it loses the run signal. The unwind is a standalone unit. It doesn't get the speed from the rewind. So, when it stops, the dancer is usually high or low (depending on the direction the roll is unwinding). I made these stages to jog the unwind to put the dancer at the midpoint when the line stopped. So, it compares the dancer position (PV) to the upper and lower comparative points (setpoint +-20 as uppertest and lowertest) and then decides which way the unwind has to jog. It sets the bits to jog, jogging the unwind in the proper direction, until the bit is reset in the later stage. I don't see how this could have any opportunity to hang up. Am I wrong here?

PLCGuy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 677
Re: Stage Retentive Bits
« Reply #1 on: August 11, 2017, 09:53:59 AM »
Not sure if this would help, but when you set c1 and jmp to S1 same time. I usually set c1 then on the next rung jump to S1. that makes sure c1 is set. I had a instances when that fixed a problem i was having in another program. But I do see you set and reset the bits before the jmp command. Be careful there. When I first did stage programming I would set/reset bits after the jmp command and that did not work out so good sometimes.

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Stage Retentive Bits
« Reply #2 on: August 11, 2017, 10:20:08 AM »
Instead of using Set/Rst drive C13 and C14 using unconditioned OUT instructions in S1 and S2 respectively.
An output is a PLC's way of getting its inputs to change.

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: Stage Retentive Bits
« Reply #3 on: August 11, 2017, 10:40:44 AM »
Instead of using Set/Rst drive C13 and C14 using unconditioned OUT instructions in S1 and S2 respectively.

For some reason, I always forget you can do this in Stage because I'm so conditioned to not being able to do it normally. I think this is a much more streamlined solution (though I don't believe it was the problem).

Garyhlucas

  • Hero Member
  • *****
  • Posts: 400
Re: Stage Retentive Bits
« Reply #4 on: August 11, 2017, 10:57:49 AM »
I avoid set/reset like the plague. Sooner or later you leave one set and bad stuff happens. I was helping a customer recently with a machine problem and he mentioned that a function sometimes worked and sometimes didn't. The guy that had programmed it had used set/reset and sure enough I found where it sometimes missed a reset.

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Stage Retentive Bits
« Reply #5 on: August 11, 2017, 11:22:00 AM »
If you are truly paranoid place a RST of C13 and C14 in Stage 0.
An output is a PLC's way of getting its inputs to change.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3663
    • Host Engineering
Re: Stage Retentive Bits
« Reply #6 on: August 11, 2017, 02:30:26 PM »
Sets and Resets work as defined.  They have no side-effects related to Stage or EXITing a program code-block (but OUT coils DO turn OFF whenever you leave a stage or EXIT a program).

However, that doesn't necessarily mean that the contact logic driving the Sets and Resets is always valid  ;D.

PLCGuy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 677
Re: Stage Retentive Bits
« Reply #7 on: August 12, 2017, 02:32:26 PM »
b-carlton, i get paranoid lol, i do reset all stages, all outputs and all bits in my Stage0 before going onto the program. Actually when e-stop occurs everything gets reset and program goes to the Stage0. when E-stop is good and a few other things, then I jump out of Stage 0.