Program Generation
04/99
28
Getting Started with C7-621-AS-i
Programming of the
FC2
is now complete. The module can be saved and transferred to the CPU.
Now you must also consider the possible faults in your belt control. In the SIMATIC Manager open the
FC1.
Insert the program line
AN M16.0
in
Network 1
. The complete network then looks like this:
Network 1 : Initial position
AN
DB1.DBX0.0
// Opto_Bero: no parcel
AN
DB1.DBX1.0
// Position switch: no parcel
A
DB1.DBX0.1
// Ejector in initial position
AN
M16.0
// No fault
=
M15.0
// Initial position
In
Network 3
insert the program line
O M16.0
so that the conveyor belt will be deactivated if a fault
occurs.
Network 3 : Belt OFF
A
DB1.DBX2.3
// Belt_OFF switch on casing
O
M16.0
// Belt OFF
R
DB1.DBX4.0
// Output Belt_ON
Save the function
FC1
and overwrite the block in the CPU by reloading.
Finally, the organization block
OB1
must be adjusted. In the SIMATIC Manager open the
OB1
, insert
a network and call the function
FC2
.
Network 3 : FC 2 call
Call
FC2
Save the OB1 and overwrite it in the CPU by reloading.
To save the PLC program in the C7-CPU so that it is powerfail-proof, you must transfer it to the C7-CPU
flash memory. How to do this is described in the following section.