Writing the User Program 6.5.2.
Create programs to be used to check operations.
A specific language is used for the operation check programs. Refer to Power PMAC User’s
Manual and Power PMAC Software Reference Manual for details.
1
In the Solution Explorer pane,
open Project name – PMAC
Script Language – PLC
Programs – plc1.plc.
2
In the programming area of the
plc1.plc tab page, write a program
as shown on the right.
This sample program repeats the
measurement every second.
* In this example, PDO mapping
is assumed to be the default
setting. If you want to change
PDO mapping, rewrite the
“Slave_0....” description.
while(sys.ecatMasterReady==0){};
ECAT[0].Enable = 1;
P1000 = Sys.Time + 1;
while(P1000 > Sys.Time){};
Slave_0_7000_2_Trigger = 1;
P1000 = Sys.Time + 1;
while(P1000 > Sys.Time){};
P1001 = Slave_0_6000_6_TriggerAck;
P1000 = Sys.Time + 3;
while(P1000 > Sys.Time){};
Slave_0_7000_2_Trigger = 0;
P1000 = Sys.Time + 1;
while(P1000 > Sys.Time){};
P1001 = Slave_0_6000_6_TriggerAck;
close