32
4
In the programming area of the
plc1.plc tab page, write a
program as shown on the right.
This example program turns a
servo ON, starts user program 1
for the motor, then exits periodic
execution of the PLC user
program.
5
Setting the start of the user
program
In the Solution Explorer pane,
open
Project name
–
Configuration
–
pp_disable.txt
.
6
In the programming area of the
pp_disable.txt tab page, add the
program shown on the right to
the last line.
The pp_disable.txt program is
automatically executed when the
Controller starts.
This example program runs the
PLC1 script.
open plc 1
while(sys.ecatMasterReady==0){};
P1000=Sys.Time+1;
while(P1000>Sys.Time){};
ECAT[0].Enable=1;
P1000=Sys.Time+1;
while(P1000>Sys.Time){};
cmd"&1enable";
P1000=Sys.Time+5;
while(P1000>Sys.Time){};
cmd"&1b1r";
disable plc 1;
close
enable plc 1;