How to use Classic Ladder

More
06 Aug 2013 01:32 #37417 by nichis
I want to use Classic Ladder only for simulating ladder programs; is this possible?
I have already used Simatic Step 7 and now i would like to redo that programs over Classic Ladder

In the terminal I write
halrun
loadrt classicladder_rt
loadusr classicladder

and the GUI starts; I click "Editor" button and I draw something, then I click "Run" button but when I check or uncheck the Vars like %I0, %I1 nothing happens..
What have I to do?

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

More
06 Aug 2013 02:09 #37418 by cmorley
Replied by cmorley on topic How to use Classic Ladder
Those variables are driven by HAL pins so can not be modified in the Vars window.
B variables can be modified in the vars widow, if they are not driven by anything else.

So what you can do is either temporarily use B vars for input and output or drive the actual HAL pins for testing.

Another thing your missing is connecting CL to threads. The logic won't run without being connected to threads and started.

loadrt threads
addf classicladder.0.refresh thread1
start
The following user(s) said Thank You: nichis, waltao

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

More
06 Aug 2013 02:50 #37420 by nichis
Replied by nichis on topic How to use Classic Ladder
Thanks, in this way it works.

or drive the actual HAL pins for testing.


How can I do this? I have red some tutorial but i can't understand very much; do you know any good guide?

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

More
06 Aug 2013 03:13 #37422 by cmorley
Replied by cmorley on topic How to use Classic Ladder
use HAL commands in the terminal.
type help (after halrun is started) for a list of HAL commands

examples:
setp classicladder.0.in-00 1
sets the %I0 contact true

show pin classicladder.0.out-00
gives specific pin info eq for %Q0

show pin
gives all HAL pin info

loadusr halmeter
will allow you to continuously monitor any HAL pin - you can load as many as you like.

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

More
07 Aug 2013 22:36 #37480 by nichis
Replied by nichis on topic How to use Classic Ladder
I'm very grateful to you cmorley!
I have another doubt: I read I can use Modbus communication for linking a real PLC to my program, or I use Classic Ladder as a bridge to the external PLC linking I/O using a .HAL file; is this right?
The problem is that I can't realize how to link a real PLC to my pc and using HAL file.
I have worked with Simatic Step 7 so I would like to do a comparison

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

More
08 Aug 2013 12:17 #37490 by cmorley
Replied by cmorley on topic How to use Classic Ladder
Your welcome.

CL will act as a modbus master. It definitely works serially.
I have heard it also works through Ethernet but have never done it my self.

It is also supposed to be able to work as a TCP Modbus slave but I could not get it to work, don't know anyone who has other then the original author.

It's a bit of a pain to get it set up.
This is a start for serial comunication:
www.linuxcnc.org/docs/2.5/html/ladder/cl..._ladder.html#_modbus

Chris M
The following user(s) said Thank You: nichis

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

More
08 Aug 2013 12:20 #37491 by cmorley
Replied by cmorley on topic How to use Classic Ladder
I might add there are other HAL modbus component options depending what version of linuxcnc you are using.
None are specific to PLCs most use them for VDFs. I think there is a general modbus component, but it's probably only in the developer version.

Chris M
The following user(s) said Thank You: nichis

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

Time to create page: 0.134 seconds
Powered by Kunena Forum