Announcement

Collapse
No announcement yet.

Help with Click ramp cycle newbie

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts


  • Help with Click ramp cycle newbie

    Thanks for taking a look at this. I am a newbie to Click and PLC ladder in general so hopefully the program is not too messy. I am working with a C0-02DR-D (analog cpu). Interfaced to a Cmore Micro. The basic function of the program is to receive a "voltage setpoint" via the Cmore and then have the click output the scaled voltage. This output should smoothly ramp up and there are some math routines in the program to perform this. The setpoint transfers and I can initiate the ramp cycle with the F2 key on the cmore. The click ramps up to the setpoint and all seems well. It will even smoothly ramp up to a higher voltage setpoint when it is entered. The problem I am running into is when I enter a lower setpoint then what the voltage output is set to. The logic shows that the "pos_neg_toggle" is now a -1 but the output voltage does not seem to change in relation. I also can not figure out how to get C1 (ramp start seal) to reset. Hopefully this makes some sense and it is not too convoluted. I am open to constructive criticism on this. Thanks again to anyone that can lend a helping hand!

    -Chris
    Attached Files


  • #2
    Originally posted by HCS Plating View Post
    Thanks for taking a look at this. I am a newbie to Click and PLC ladder in general so hopefully the program is not too messy. I am working with a C0-02DR-D (analog cpu). Interfaced to a Cmore Micro. The basic function of the program is to receive a "voltage setpoint" via the Cmore and then have the click output the scaled voltage. This output should smoothly ramp up and there are some math routines in the program to perform this. The setpoint transfers and I can initiate the ramp cycle with the F2 key on the cmore. The click ramps up to the setpoint and all seems well. It will even smoothly ramp up to a higher voltage setpoint when it is entered. The problem I am running into is when I enter a lower setpoint then what the voltage output is set to. The logic shows that the "pos_neg_toggle" is now a -1 but the output voltage does not seem to change in relation. I also can not figure out how to get C1 (ramp start seal) to reset. Hopefully this makes some sense and it is not too convoluted. I am open to constructive criticism on this. Thanks again to anyone that can lend a helping hand!

    -Chris

    I think the use of the For structure was ill suited for your program. We do not need to pre-calculate how many times this will run unless we have no feedback on the output voltage. Since we are modifying that value we can use the PLC to tell us when to stop.

    Also, I didn't look too closely at your math... not sure where you got the 0.01with 1 second modify? It looks like you wanted to ramp the voltage at a rate of 0.01 units/sec?

    I apologize if I stepped on your toes by rewriting this... just trying to help , hopefully you can gain some insight from my code.
    Attached Files

    Comment



    • #3
      muhteeus, Please do not think you are stepping on my toes. I greatly appreciate the time and help! Your program is way more simple than mine. I did have to make one small change to get it to function properly. When the ramp would start it would just continue to count up as the C1 ramp start was keeping the ramp locked. This is the first rung. I just moved the link to before the compare function voltage set point > voltage output. This corrected the issue and now it will ramp up and back down depending on the set point. The reason the time was different in the original program was just for testing purposes so i could speed it up. As for time based modification, at some point I will be trying to add a few different ramp speeds and I will need to be able to modify the time variable. Is this possible with the "SC_" variables? Also the PLC seems to overshoot/undershoot the setpoint by .000001 and this causes it to bounce back and forth. Would you have any suggestions to tell the PLC "if you are within .001 stop"? Sorry for the questions I am new to this ladder logic. I have done some Basic programming and Fanuc CNC language but this takes a different way of thinking so far from what I have seen. Anyway THANKS AGAIN!!!!

      Comment



      • #4
        I have attached my most recent program. I reworked it and it uses a subroutine for the ramp cycle. There are two selections to be made from initial screen, one for "ramp1" one for "ramp2". Let me know what you think.
        Attached Files

        Comment



        • #5
          Sorry I haven't replied sooner. Checking out your code now!

          Comment

          Working...
          X