Appendix
129/142
netPLC C100 | Startup Guide
DOC090701UM02EN | Revision 2 | English | 2009-10 | Released | Public
© Hilscher, 2009
18.2.3
netPLC Open Process Control (OPC)
Project name
Open Process Control.project
Folder
Examples\netPLC Open Process Control (OPC)
Short description
The project consists of a slot PLC NPLC-C100-DP to demonstrate the use OPC
functionality.
PLC program
The PLC program shows how to create variables to be accessible via the symbol
configurator to the OPC server.
From a remote OPC client it is possible to access the variables opc_qb0 value (0 .. 255)
and to write a value. The PLC program copies this value of opc_qb0 variable to the
Variable opc_ib0 and the OPC Client can read back this value from opc_ib0.
The PLC program uses the same mechanism for the variables opc_qb1 and opc_ib1.
Table 31: Example – netPLC Open Process Control
To use the project do the following:
¾
Use the CoDeSys menu item
File > Open Project
to open the project.
¾
Set the active path to the slot PLC in the communication settings dialog
¾
Use the CoDeSys menu item
Online > Login to [Device: PLC Logic]
,
die load the program to the slot PLC (or the key combination Alt + F8).
¾
Use the CoDeSys menu item
Online > Create boot application for
App [Device: PLC Logic]
.
¾
Start the PLC program using
Online > Start App [Device: PLC logic]
(or using the key F5).
¾
Use the CoDeSys menu item
File > Open Project
to open the project.
¾
Create a OPC configuration with the OPC configurator. See section
OPC Configurator
from page 92 for more details.
¾
Connect your OPC client to the OPC server.
¾
Browse the OPC variable items in your OPC client.
¾
Select the items opc_qb0, opc_qb1, opc_ib0 and opc_ib1.
¾
Write value between 0 to 255 to the item opc_qb0 and opc_qb1 and
check if the values read back from opc_ib0 and opc_ib1 are getting
equal.