I busy to develop a micro-plc base on arduino mega 1280, with 2 serial prompts (usb and com1).
I want to know if some one have developed a hardware base on arduino mega + ENC28J60 Ethernet
and maybe some open transistor for output.
you put the label you want to use in your plc program in arduino_plc.
// #define your_label the_pin_name
#define switch1 i1
#define switch2 i2
#define light o3
You modify the timer in the def_timer
// Set the timer value use in your plc program in second.
#define temp1 11 //sec
#define temp2 12 //sec
#define temp3 13 //sec
And you write your logic equation in plc :
// Write your logic equation here (and more if you can).
light=switch1 or switch2;
You compile and put in arduino mega, the you have a plc, with serial interface to
See input, output, timer ……
strcat( reply, “You can type :\r\n\r\n” );
strcat( reply, " di Display input\r\n");
strcat( reply, " do Display output\r\n");
strcat( reply, " dm Display memory\r\n");
strcat( reply, " da Display analog value\r\n");
strcat( reply, " dt Display timer\r\n\r\n");
strcat( reply, " sm x Set the memory x\r\n");
strcat( reply, " rm x Reset the memory x\r\n\r\n");
strcat( reply, " dl Display the loop done by sec\r\n\r\n");
arduino_plc.rar (16.9 KB)