Steps: _ 1)start simatic and start a new project
2)right click on the project name and choose insert new
object then insert simatic 300 station 3)open hardware then add by dragging and dropping rail and cpu 312 and some I/O modules then press save and compile 4)click right on modules and from address adjust each module address and try that simatic will not give you the chance to make a confliction 5)Now you will find the cpu in the project and S7- program inside it from blocks insert new object and choose function 6)Choose function number and symbolic name and comment then press ok the new function will appear beside OB1 which is inserted automatically with any S7-program 7)Double click on function FC 1 to open it 8) Now return to simatic manager and go to symbol table which is inside the S7-program and double click to open. 9) Define 3 symbols then press save o Input: Start push button and give it address I0.0 o Input: Stop push button and give it address I0.1 o Output: Starting order and give it address Q0.0 Solution a Write in FC1 the following code
Then call FC1 in OB1
Solution b. FC1 logic will change to be 2. Number of times motor run and alarm after 500 times and stop alarm after reset:_ Define symbols
Create FC 2 and write the following code in it
Don't forget to call FC2 in OB1 3. Motor 2 starting automatically after motor 1 by 5 minutes:_ Define symbols
Create FC3 and write the following code in it: _
Note that motor 2 will only start if motor 1 still running for 5 minutes and motor two will stop automatically if motor 1 stops If motor 2 needed to stop independent to motor 1 make this logic in FC3 Don't forget to call FC3 in OB1