EasyManua.ls Logo

Omron CK5M-CPU 1 Series - Page 31

Omron CK5M-CPU 1 Series
75 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
31
3
Creating the PLC program
In the Solution Explorer, open
Project namePMAC Script
LanguagePLC Programs
plc1.plc.
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.
open plc 1
while(sys.ecatMasterReady==0){};
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

Related product manuals