PLC / Ladder Software


9 posts
by brettshelley » Mon May 28, 2012 9:23 pm
Well, proud to say I have a RPI.

I usually use a PLC with ladder software but am interested to know if this is possible on the unit?

I want to have a program that can access the GPIO using a linux software.

Is this possible??

Cheers,

Brett
Posts: 2
Joined: Mon May 28, 2012 8:58 pm
by rurwin » Mon May 28, 2012 11:58 pm
I wondered this a month or three ago. There are a few, but since it's so long ago I've forgotten them. The google search "ladder logic linux" should find them. As I remember there was nothing that screamed killer-app to me, and probably nothing that could work with the GPIO without a moderate amount of re-writing.
User avatar
Forum Moderator
Forum Moderator
Posts: 2904
Joined: Mon Jan 09, 2012 3:16 pm
by AndrewS » Tue May 29, 2012 1:05 am
If you'd be prepared to give Python a go, look at: http://pypi.python.org/pypi/RPi.GPIO/0.2.0 which works by using http://www.google.com/search?q=gpio+sysfs
User avatar
Posts: 3590
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
by rurwin » Tue May 29, 2012 8:04 am
I haven't tried it, but this one looks pretty good. It might need a few small mods to work with the RaspPi, but not many. On the other hand, it only seems to have had one release and that labeled alpha.

There's a much more mature product in ClassicLadder, but getting RaspPi support in there might be more work.
User avatar
Forum Moderator
Forum Moderator
Posts: 2904
Joined: Mon Jan 09, 2012 3:16 pm
by brettshelley » Tue May 29, 2012 9:51 pm
Thanks for the info. I will look into the software and let you know.

If a good ladder compiler was available this would make the rpi fantastic for automation.

Cheers

Brett
Posts: 2
Joined: Mon May 28, 2012 8:58 pm
by AshMoore » Sat Jul 21, 2012 11:35 pm
Hi Brett - any update on the PLC ladder programming situation? My Pi arrives in a couple of days, and this is my #1 project ambition.

Looking forward to hear more about your success! ;-)
Posts: 1
Joined: Sat Jul 21, 2012 11:32 pm
by farooqhasny » Sun Dec 02, 2012 10:54 am
Posts: 6
Joined: Thu Dec 29, 2011 6:28 am
by Serac » Sun Dec 02, 2012 12:48 pm
rurwin wrote:There's a much more mature product in ClassicLadder, but getting RaspPi support in there might be more work.


ClassicLadder should compile and run just fine on a Pi -- Driving the GPIO will take a little effort, but it would be a fairly trivial exercise in C programming (did a PCI driver some years back).

Ping me a PM if help is required.
Posts: 124
Joined: Wed Jul 18, 2012 2:49 pm
by butchergg » Sun Mar 31, 2013 4:00 am
I just posted my hack of ldmicro's ldinterpret to github:

https://github.com/butcherg/ldpi

Uses wiringPi to read and control the GPIO pins.

I tested it with a simple one-rung ladder, one contact energizing a coil, watched it run with the wiringPi gpio program hacked to include a 'top' command. I used gpio to mess with the contact (had to switch it to OUTPUT), and watched the coil follow the contact. Now, to order a gertboard...
Posts: 3
Joined: Sun Oct 28, 2012 6:14 pm