News:

  • August 14, 2026, 11:48:46 PM

Login with username, password and session length

Author Topic: Alternate to RAMPSOAK?  (Read 10665 times)

stgislander

  • Jr. Member
  • **
  • Posts: 12
Alternate to RAMPSOAK?
« on: March 31, 2023, 08:32:58 AM »
I have to operate some hydraulically actuated doors open and close.  I use the PID controller in DMD to drive servo valves.  The RAMPSOAK works perfectly when starting at either endpoint.  Two of my RAMPSOAK algorithms have three ramp and two soak points.

My customer asks what happens is the door is sitting somewhere in the middle due to a malfunction of some kind.  Using the current RAMPSOAK configuration (0% to 100% and vice versa), the door moves quickly to the start point and then ramps to the end point.  It is this quick movement that is causing an issue with my customer.

Is there an alternative to the current RAMPSOAK that basically performs the same function but allows me to enter the algorithm somewhere in the middle using the door position as the starting point?

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: Alternate to RAMPSOAK?
« Reply #1 on: March 31, 2023, 09:50:00 AM »
Depending on how you have your RAMPSOAK setup, you can use logic to enter at a Preset other than 1 and change the Time Period or Rate with logic as well.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: Alternate to RAMPSOAK?
« Reply #2 on: March 31, 2023, 09:50:49 AM »
RAMPSOAK is just predefined step behavior.  Stage programming is basically RAMPSOAK on steroids.

Create a code block that represents your "programmable RAMPSOAK".  Each Stage would be a "step" in your RAMPSOAK.  You can do whatever you want in that stage.  Once it reaches what you consider "done" for that "step", you would do a JMP to the next Stage.  Basic RAMPing can be done with a y=mx+b equation in a MATH box on a Timer box accumulator.  A "soak" would just be a Timer instruction (T.Done would JMP).  But then your more complex stuff could be whatever you want in that Stage (step).

Stage programming also lets you do a ton of "sequencing" behaviors you can't do that with RAMPSOAK.  Stage can branch to go down 2 (or more) different paths (multiple JMPs within a stage), loop (JMP to earlier stage), create parallel concurrent flows (SGDIVERG) and then bring them back together (SGCONVRG).  You can even RUN other Program codeblock from within a Stage - and let it be ITS own thing (even another Stage diagram running), and then have the ParentProgram Stage wait for the OtherProgram to EXIT by having the JMP in the ParentProgram stage be keyed off the OtherProgram.Done bit.

Very powerful sequencing capabilities.  Stage programming is a Ladder Logic version of Sequential Function Charts.

stgislander

  • Jr. Member
  • **
  • Posts: 12
Re: Alternate to RAMPSOAK?
« Reply #3 on: March 31, 2023, 10:32:42 AM »
Thanks for the suggestions.

To RBPLC - Sounds simple.  It won't start exactly at my current position but I can at least start in the current ramp segment.

To franji1 -  That's probably where I need to go.  I'm currently playing with a separate RAMPSOAK to handle each segment (start, middle, end).  Door position logic selects which RAMPSOAK enter.  It's difficult to follow on the ladder view but it looks like it it has promise.

stgislander

  • Jr. Member
  • **
  • Posts: 12
Re: Alternate to RAMPSOAK?
« Reply #4 on: March 31, 2023, 11:14:12 AM »
Can anyone provide an example if this in the Step Preset definition.

"One situation where using a variable location is quite useful is with a cyclic profile where one or ore of the first step are initialization steps. Initially setting the Step Preset to 1 will run all of the steps, then changing the Step Preset to the first step of the cyclic portion of the profile will skip the initialization steps on subsequent passes through the profile."

If one bypasses the initialization on subsequent iterations of the RAMPSOAK, how does the program know what value to start ramping with?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: Alternate to RAMPSOAK?
« Reply #5 on: March 31, 2023, 11:21:50 AM »
Can anyone provide an example if this in the Step Preset definition.

"One situation where using a variable location is quite useful is with a cyclic profile where one or ore of the first step are initialization steps. Initially setting the Step Preset to 1 will run all of the steps, then changing the Step Preset to the first step of the cyclic portion of the profile will skip the initialization steps on subsequent passes through the profile."

If one bypasses the initialization on subsequent iterations of the RAMPSOAK, how does the program know what value to start ramping with?

If the initial value is not the ending value of the previous iteration, don't skip the INIT step, just make the value be a variable that you set from another rung depending on whatever (other rung could monitor state of MyRampSoak.Step or  MyRampSoak.Done).

stgislander

  • Jr. Member
  • **
  • Posts: 12
Re: Alternate to RAMPSOAK?
« Reply #6 on: April 03, 2023, 11:04:44 AM »
That's a thought I've been playing with.  Using the MyPID.PV as the initial value for the INIT step.  In previous test though it seems like my customer and I discover a case where it causes an issue.

There are currently two ways for me to operate the door servo.  One mode is a normal operating mode where it is sequenced with the operation of solenoid operated locking pins.  In that mode I feel confident that the door will always start from the full open or full closed and locked positions.  The second mode is what I call maintenance mode.  Only the door servo itself is controlled.  I added this mode to be able to recover the door in the event the door is initialized in some unknown position.  A physical toggle switch locks out the normal mode sequences, and unlocks the maintenance mode sequences.

I originally planned to use the same RAMPSOAK control in both modes.  I may change that.  Putting the additional logic to determine what step to enter the RAMPSOAK and to initialize MyPID.SP to MyPID.PV would keep my normal operating mode ladder clean. 
« Last Edit: April 03, 2023, 11:32:34 AM by stgislander »