Awesome
ldpi - ladder engine for Raspberry PI GPIO Version 0.1 3/30/2012
ldpi executes ldmicro .int files generated by ldmicro, on the Raspberry Pi.
ldmicro is a Windows tool developed by Jonathan Westhues, see:
ldpi is a hack of Jonathan's ldinterpret.c, using his example for reading symbols to map references usable on the target machine. For this first attempt I just mapped GPIO 1-7 as GPI1-7 and GPO1-7. Use those names for your contacts and coils, respectively, in your ldmicro ladder, and compile it to Tnterpreted Byte Code. The resulting .int file is read and executed by ldpi "ladder-style", where the rungs are evaluated in order from top to bottom, and that process is repeated until you type Ctrl-C.
ldpi requires an installed wiringPi library to build; go here:
https://projects.drogon.net/raspberry-pi/wiringpi/
for instructions to git-clone and build it. Once it is installed, you can build ldpi with a simple:
$ make
FTP or SCP your .int file to the ldpi directory, and run it with:
$ sudo ./ldpi xxx.int
I messed with ldmicro a bit to try compiling with mingw and the POSIX libraries, but didn't get traction. So, for now, the workflow is:
Windows machine: - Create ladder program with ldmicro; - Compile to .int; - FTP/SCP the .int to your Raspberry Pi;
Raspberry Pi: - Run the .int file with ldpi.