The finesse of classic ladder, getting started

24 Oct 2017 16:04 #100748 by Nitram

I have a pneumatic way lube pump, pressure lifts the plunger, then release of that pressure squirts in lube to the ways.
The cycle is approx once every 4 minutes while the machine is under motion (has a feed rate).
The timer should be cumulative, ie if motion stops 3 minutes in, then when it resumes again, the timer will activate after the remaining 1 minute of motion thereafter.
The timer resets and continues to time up in the same fashion, cycle after cycle.

I thought this would be a great way for me to explore classic ladder in a simple way and learn along the way.

I was hoping someone could tell me how close I am to being on the right track.

I am trying to use a comp function with hysteresis to define when the machine is in motion (ie when a feed rate is TRUE).
I think my syntax on that function is slightly off.
But, here is a copy of my custom.hal and a picture of the world's simplest CL.
Whilst this will progress to being in use on my machine, breaking the ice with CL is important to me too.

I can already see that I need to de-power the air solenoid after its stroke to allow the cycle to recommence correctly from its NO state, but I'm not sure how to accomplish that.

Very intrigued how it all ties together.

Thanks for all the help.

# Include your custom HAL commands here
# This file will not be overwritten when you run PNCconf again

loadrt classicladder_rt
addf classicladder.0.refresh servo-thread

loadusr -w classicladder -- marty_ladder_test.clp

loadrt comp count=1
addf comp.1 servo-thread

setp comp.1.hyst 0.01 #small value to also detect when feeds are low
setp comp.1.in0 0.0 #default value for in0 is 0.0
net motion.current-vel comp.1.in1 => comp.1.in1

#network comp result to CL input pit to start timer
net plcinput <= comp.1.out

#network CL output to way lube pump solenoid
net plcoutput classicladder.0.out-00 hm2_5i24.0.7i84.0.2.output-06

28 Oct 2017 20:40 #100953 by BigJohnT
It's been a while since I did my Hardinge but IIRC I used two timers one for on time and one for off time and motion.current-vel to know I was moving. I'll try and dig it up in a bit.

28 Oct 2017 20:45 #100954 by Nitram
Thanks John, as I said, I'm intrigued how CL ties in to HAL, I can see it being a very powerful tool, hence why I'm keen to see a basic example for me to use as a building block to better grasp the concept.

Kind regards,
29 Oct 2017 11:01 #100968 by BigJohnT
For some reason I can't open up the old classicladder clp file from my hardinge, but I did some work on a tutorial a while back on my web site

29 Oct 2017 11:07 #100969 by Nitram
Thanks John.
I did take an overview of your tutorials, and I'll take a little more time now to absorb them more fully.
The "Turret Example" is one I haven't looked at yet but will do that now.
Thanks Again!
29 Oct 2017 13:59 #100973 by BigJohnT

# Way Oiler
setp mult2.2.in0 1000
net mult-vel mult2.2.in1 <= motion.current-vel 
net in-motion classicladder.0.floatin-00 <= mult2.2.out
net oil-on hm2_5i20.0.gpio.045.out <= classicladder.0.out-07

The following user(s) said Thank You: lamandesigns
Time to create page: 0.102 seconds
Powered by Kunena Forum