CL logic to make LCNC buttons work like industrial machines

More
15 Jan 2021 18:10 #195473 by The Feral Engineer

nkp wrote: This works fine.


net auto classicladder.0.in-00 pyvcp.run
net feed-hold classicladder.0.in-01 pyvcp.feedhold
net program-idle classicladder.0.in-02 halui.program.is-idle
net single-block classicladder.0.in-03 pyvcp.step
net mode:is:auto classicladder.0.in-04 halui.mode.is-auto
net btn-stop classicladder.0.in-05 pyvcp.stop

net auto-mode-select classicladder.0.out-00 halui.mode.auto
net cycle-start classicladder.0.out-01 halui.program.run
net feed-resume classicladder.0.out-03 halui.program.resume
net single-block-select classicladder.0.out-04 halui.program.step
net program-stop classicladder.0.out-05 halui.program.stop

net feed-hold-select classicladder.0.out-02 halui.program.pause


Hope you find it useful. I've got it working on my machine with no issues after a few minor adjustments :)

Please Log in or Create an account to join the conversation.

More
15 Jan 2021 18:14 - 15 Jan 2021 18:14 #195474 by The Feral Engineer

Mike_Eitel wrote: Make's sence to me.
If you are coming from standart automation world, plc programing is the absolute best way to go. C can only be acceptet for specialities. I f.x. dislike C as IT does not prevent me from my typos in concern of theses dam... ; 's. ;-()
Mike


I'm not a C programmer, I work for a machine tool company, so PLC is right up my alley. I actually switched to LCNC because it had an available PLC section (one of many reasons). I never spent much time writing my own logic, but I've had to troubleshoot it in the past, so I had a vague understanding of it - getting into writing my own circuits made it so much clearer :).

I've found a bit of a useful mid-ground between HAL and CL. The two tie together almost poetically.

as a PS, I find that loadrt toggle is a little easier on the eyes than a set/reset circuit in CL and loadrt multiswitch would be an absolute pain to write as ladder logic. It's very subjective :P
Last edit: 15 Jan 2021 18:14 by The Feral Engineer.

Please Log in or Create an account to join the conversation.

More
15 Jan 2021 19:36 #195482 by Mike_Eitel
To be honest:
I nearly hatte CL. There are so many easier ways in 61131 to write a Programm.
But you take what you get.. And once you get it running it's stable.
Mike

Please Log in or Create an account to join the conversation.

More
15 Jan 2021 19:47 #195486 by The Feral Engineer

Mike_Eitel wrote: To be honest:
I nearly hatte CL. There are so many easier ways in 61131 to write a Programm.
But you take what you get.. And once you get it running it's stable.
Mike


I like it. It almost feels like home to me. I cracked open the ladder on a machine at one of my customers the other day and I felt like I was wrapped in a warm blanket of logic. Plus, it kinda reassured me that I was pointed in the right direction. I only started having a crack at it about a month ago, but I learned so much in a very short time due in part to the fact that I wasn't completely green, I had a few ripe splotches to get me going :lol:

I'm going to be undertaking a retrofit project with my old vocational high school on a Fadal VMC15. The students in the pre-engineering and advanced manufacturing technology are learning PLC logic, hydraulics, pneumatics, etc. in the class, so they're going to tackle the electrical end and the students in machine tool tech (where the machine is located) can assist by machining adapter plates for everything once it all gets off the ground. My role is to kinda guide them along, introduce them to LCNC and have them apply their knowledge of AB plc to CL. Gives them a little insight on the similarities and differences of what they learn vs. what they'll apply after graduation. Should be interesting.

Please Log in or Create an account to join the conversation.

More
15 Jan 2021 21:45 #195489 by Mike_Eitel
Yes AB and Modicon have been the CL lovers.. But long times ago.
And yes u can also kind of CL in IEC61131. One of the 6-7 languages u can use.

Please Log in or Create an account to join the conversation.

More
15 Jan 2021 22:32 #195493 by The Feral Engineer

Mike_Eitel wrote: Yes AB and Modicon have been the CL lovers.. But long times ago.
And yes u can also kind of CL in IEC61131. One of the 6-7 languages u can use.


Fanuc and Mitsubishi still use plc ladder logic, so that's what I was most familiar with. My background is in Applications engineering, so I always spent most of my time in front of machines, teaching people how to use them. The backend stuff is still pretty new to me, but sadly, I think I've picked up more in the last 6 months than some of the dedicated service guys in my office know after 20 years in the industry :lol:

Please Log in or Create an account to join the conversation.

Time to create page: 0.119 seconds
Powered by Kunena Forum