CL logic to make LCNC buttons work like industrial machines

More
5 years 9 months ago #193925 by Todd Zuercher
I think he was. Having tried it myself in the past,. not sure I'd recommend it.

Please Log in to join the conversation.

More
5 years 9 months ago #193937 by cmorley

Please Log in to join the conversation.

More
5 years 9 months ago #194122 by Mike_Eitel
Sorry for late answer
This file is ASCII. Easy to edit.
With a bit fiddeling you can understand f.x. that one rung is one line.
So moving a line to another position moves it.
I remember that i also replaced var names.... etc.
Mike

Please Log in to join the conversation.

More
5 years 9 months ago #194123 by Mike_Eitel
Honestly, i find CL a pain in the...
But to write real simple plc logic much more efficient than hal.
I'm a fan of iec61131.
Mike

Please Log in to join the conversation.

More
5 years 9 months ago #194125 by rodw

Mike_Eitel wrote: Honestly, i find CL a pain in the...
But to write real simple plc logic much more efficient than hal.
I'm a fan of iec61131.
Mike


Me too, I've never bothered to look at CL. becasue I've never programmed a PLC.
I'd just write a custom component in C which I think is Linuxcnc's jewel in the crown.

Its funny, there has barely been a mention of CL for ages and all of a sudden a few people are discussing it.

Please Log in to join the conversation.

More
5 years 9 months ago #194126 by Mike_Eitel
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

Please Log in to join the conversation.

More
5 years 9 months ago #194388 by nkp
I10 - ?
I11 - ?
I13 - ?
==============================
When you first start the program, almost always an error:
can't do that (EMC_TRAJ_SET_TELEOP_ENABLE) in auto mode with the interpreter paused

Lcnc 2.7 Axis
PS
The scheme needs improvement

Attachment not found


net mode:is:auto classicladder.0.in-14 halui.mode.is-auto

Please Log in to join the conversation.

More
5 years 9 months ago #194416 by nkp
This works fine.

Attachment not found


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

Please Log in to join the conversation.

More
5 years 9 months ago #194510 by bevins

rodw wrote:

Mike_Eitel wrote:
Its funny, there has barely been a mention of CL for ages and all of a sudden a few people are discussing it.


I use at least a few rungs on every machine I do. There is always something easier to do in CL than HAL.

I once did a point to point Biesse with the zones, photocells pushbuttons and green lites's using CL.

Please Log in to join the conversation.

More
5 years 9 months ago #195471 by The Feral Engineer

nkp wrote: I10 - ?
I11 - ?
I13 - ?
==============================
When you first start the program, almost always an error:
can't do that (EMC_TRAJ_SET_TELEOP_ENABLE) in auto mode with the interpreter paused

Lcnc 2.7 Axis


PS
The scheme needs improvement

Attachment not found


net mode:is:auto classicladder.0.in-14 halui.mode.is-auto


I don't get any error messages when I use it (2.8.1). I have made a few changes to it since I posted this, nothing crazy, just centralized the grouping of the physical and gamepad buttons I was using. Pressing cycle start should bring the machine to auto mode, not alarm. I did, however, add halui.mode.is-auto to I6 after posting my file here.

To answer your other question, I10, I11 and I12 (formerly i13) are for a different circuit. Those are assignments to two separate probe circuits, using separate inputs and an internal relay to switch between them.

Long story short, my machines have a hardwired tool setter mounted to the table and a spindle probe. Both setter and probe are NC, so when the spindle probe is disconnected from the machine, the signal is broken, so the probe is in a constant trigger state. I12 is a relay that flags mcodes using sets probe-relay true/false. I12 is tied to both a classicladder input signal as well as spindle inhibit, so when the spindle probe is active, the spindle cannot rotate.

see attached. I commented at the top of each rung section. I make little tutorial videos on basic CL and HAL for youtube, so sometimes my samples get attached to my CL files, but they don't usually get in the way.

Please Log in to join the conversation.

Time to create page: 0.873 seconds
Powered by Kunena Forum