Download IO_SIMULATOR.zip - 46.06 KB
Download PLC.zip - 70.53 KB
Download resource.zip - 423 B
Here is my first version of PC PLC simulator program. I dreamed about it for almost 15 years and now my dream come true.
I’ll keep it as real as possible, if I have plenty of time. Any contribute is thankful.
Programmable Logic Controller was designed for most industrial application.
In order to control peripheral electronic devices such as Relay、Magnetic-contactors、solenoid valve…etc. It is intended to be an Interpreter.
The PLC programming language is knowen like ladder diagram symbol, Person who is familiar with electronic automatic control, should be familiar with it. PLC was controlled by input and ladder program after program computation PLC will control output, after all you can control electronic devices as you want.
PLC.exe is a Programmable Logic Controller simulator program. It is parsing ladder program, reading input and doing computation then doing output.
In the simulator environment, we don’t need I/O control card. I have wroten a program IO_SIMULATOR.exe to simulator input and output via file input.txt and output.txt the example ladder program also included in files for downloading
running screen snapshot
1. the PLC program running, click Sel Ladder file to load ladder program
2.Select ladder file
3.Click Run to start PLC
4.You can stop at any time as you want by click Stop
5.After PLC is running, you can use IO_SIMULATOR.exe to simulate input and watching output.
6.click X000 and X001 to switch on input X000,X001 then ouput Y000 will switch on by PLC.
7.click X006 to switch on input X006 after 5 sec output Y002 will switch on by PLC.
8.click X002 to switch on input X002 in order to switch off output Y000(in our ladder program Y000 with Counter were mutually exclusive) then click X005 on/off for 5 times then output Y002 will be switch on by PLC
You can enjoy editing ladder program to test PLC program in ordering to check whether it is enough or any suggest.
I know it’s just simulator, but after improvI/O control module it can be real PLC for daily life.
I hope I can provide all of design document including Flow diagram,status diagram but it will take many time.
PLC program just implement a multimedia timer to computation timer object and parsing,computation working thread to computation ladder program to control output to proper status.
IO_SIMULATOR is just only an interface for control input and see output status via file,name input.txt and output.txt each byte indicate X000 to X007 and Y000 to Y007.
Ladder program was like the following,I don’t spend more time to do more desicriptions
Before complaining about that it was so ugly, I need to talk about my dream.
I want it to be a kind of application, and I planed to develop an Editor that it can edit ladder program and also can monitor computation status as soon as possible (I know in computer world what real time is , so I use the word as soon as possible),I also want to develop an GUI editor as for an Interface to control PLC, after all ,it can be applyed in many other environments as your application as possible.