First Project
75/142
netPLC C100 | Startup Guide
DOC090701UM02EN | Revision 2 | English | 2009-10 | Released | Public
© Hilscher, 2009
3. Edit PLC Program
¾
Fill in the following PLC Program
var1 := var1 + 1;
%QB1 := var1;
opc_ib0 := %IB0;
opc_ib1 := %IB1;
%QB0 := opc_qb0;
°
A short explanation regarding the programming example
var1 := var1 + 1;
Variable var1 is incremented each PLC cycle.
%QB1 := var1;
The value of variable var1 is written to the output byte %QB1.
opc_ib0 := %IB0;
und
opc_ib1 := %IB1
;
Input bytes %IB0 and %IB1 are copied to the variables opc_ib0 and
opc_ib1. This is the preparation, that the OPC server can access to the
input data.
%QB0 := opcqb0;
The value of variable opc_qb0 is copied to the output byte %QB0. This
is the preparation, that the OPC server can access to the output data.
Remark: Output byte %QB1 is used from the PLC program and
therefore can’t be accessed by the OPC server.
4. Save
project
¾
Save project using menu entry
File > Save Project
°
The project is saved.