Tech Note 765 - Implementing Block Reads Using The OPCClient Object
Tech Note 765 - Implementing Block Reads Using The OPCClient Object
All Tech Notes, Tech Alerts and KBCD documents and software are provided "as is" without warranty of any kind. See the Terms of Use for more information.
Topic#: 002544
Created: March 2011
Introduction
The OPCClient object is a DeviceIntegration (DI) object that allows access to a running OPC Data Access (DA) Server. An OPCClient object supports the following
operations on I/O points for the OPC DA Server:
Note: This Tech Note assumes you have a basic understanding of Wonderware Application Server and DAServers. You should also be familiar with OPC
communications. For information about OPC communications, see Tech Note 761 OPC Connections at a Glance.
Application Versions
Wonderware Application Server 3.1 and later
For this Tech Note, we create a basic configuration that performs a block read from a local MBTCP DAServer via the OPCClient object.
Configuring DASMBTCP
Note: This Tech Note assumes you have a basic understanding of a DAServer and can configure the DAServer to communicate to a PLC.
To configure DASMBTCP
3. For this example, the Server name is ArchestrA.DASMBTCP.2. Leave all other default attribute settings.
This is where we enter the block of PLC addresses that we want to read in a single transaction.
For this example, we will read addresses 400001, 400002, 400003, 400006, 400008, and 400200. We will also assign an attribute to each register.
Note: Although a Scan Group is not required for Block Reads, go to the "Scan Group" tab and enter a scan group. This will allow the saving of the OPC object
without any warnings.
3. Provide each attribute with an input source that points to the six block read attributes as shown in the following table.
Tags.Tag1
Tags.Tag2
Tags.Tag3
Tags.Tag6
Tags.Tag8
Tags.Tag200
OPC.ConnectionStatus (Displays the connection status between the OPC object and the OPC Server)
OPC.ReadPLC.TransactionStart (Displays the time and date when the block read starts)
OPC.ReadPLC.TransactionEnd (Displays the time and date when the block read ends)
If everything is configured correctly, the values are read from the PLC every time the OPC.ReadPLC.TransactionTrigger is set to True.
OPC.ReadPLC.TransactionStart and OPC.ReadPLC.TransactionEnd will display the transaction start and end date and times (Figure 8 below).
G. Alldredge
Tech Notes are published occasionally by Wonderware Technical Support. Publisher: Invensys Systems, Inc., 26561 Rancho Parkway South, Lake Forest, CA 92630. There is also technical information on our
Back to top
©2011 Invensys Systems, Inc. All rights reserved. No part of the material protected by this copyright may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying,
recording, broadcasting, or by anyinformation storage and retrieval system, without permission in writing from Invensys Systems, Inc. Terms of Use.