modbu wonderware

Upload: prateek-lath

Post on 08-Apr-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 modbu wonderware

    1/7

    Tech Note 586Configuring the Compact Panel MODBU Serial Driver to Communicate to a Modicon PLC

    All Tech Notes and KBCD documents and software are provided "as is" without warranty of any kind. See the Terms of Use for more information.

    Topic#: 002342Created: March 2009

    Introduction

    The MODBU Driver is one of Wonderware's new generation of Compact Panel based products that provide connectivityto devices that are fully compatible with the Modbus Protocol.

    This Tech Note provides a basic step-by-step procedure on setting up the Compact Panel MODBU Driver to communicate toa Modicon Quantum PLC through a serial connection. For more configuration options refer to the InTouch CompactEdition MODBU Configuration Guide.

    Note: This Technote assumes you have created a Compact Panel InTouch application. You should also be familiar withthe basic setup, configuration and publishing of a Compact Panel InTouch application. See Tech Notes 516 and 517

    for information regarding InTouch Compact Panel Edition.

    Create an Access Name

    1. Select Special/Access Names from the WindowMaker menu.

    2. Select Add.

    3. Type the following in the appropriate fields:

    Access Name: This name will be used later in the MODBU driver configuration

    Application Name: For purposes of IO Driver configuration, this name is arbitrary and does not point toan actual application.

    Topic Name: For purposes of IO Driver configuration, this name is arbitrary and does not point to anactual topic definition.

    http://c%7C/Inetpub/wwwroot/t002342/T000792.htmhttp://c%7C/Inetpub/wwwroot/t002342/t002250.htmhttp://c%7C/Inetpub/wwwroot/t002342/t002251.htmhttp://c%7C/Inetpub/wwwroot/t002342/t002251.htmhttp://c%7C/Inetpub/wwwroot/t002342/t002250.htmhttp://c%7C/Inetpub/wwwroot/t002342/T000792.htm
  • 8/7/2019 modbu wonderware

    2/7

    Figure 1: Access Name definition

    4. Click OK then Close.

    MODBU Configuration

    1. Select Special/I nTouch Compact Edition application/I O Driver Configuration from theWindowMaker menu.

    2. Select MODBU from the list of available drivers, then configure the following:

    Place a checkmark next the the Access Name defined above in the Access Name Mapping section. Inthe example below, modbusPLC would be selected.

    Select MODBU from the Mapping I/ O Driver drop down box.

    Enter the PLC Model and Slave ID in the Station Address dialog box. If you omit the PLC Model thedriver assumes a Modbus PLC with a six digit register size. The example below uses a Quantum PLC Model.

    3. Enter the connection information for serial communications to the PLC on the Direct tab. This exampleuses COM1 on the Compact Panel communicating to the PLC with the following details:

    Direct Connection Type

    Baud rate of9600

    1 Stop Bit

    Even Parity

    8 Data Bits.

  • 8/7/2019 modbu wonderware

    3/7

    Figure 2: Driver Configuration

    Below is a list of valid PLC Models that can be entered:

    PLC Model Descr ipt ion

    TSX Quantum TSX Quantum PLC

    TSX Momentum TSX Momentum PLC

    TSX Premium TSX Premium PLC

    Generic 4 Modbus PLC with a four digit register size

    Generic 5 Modbus PLC with a five digit register size

    Generic 6 Modbus PLC with a six digit register size

    G4 Modbus PLC with a four digit register size

    G5 Modbus PLC with a five digit register size

    G6 Modbus PLC with a six digit register size

    Create an IO Tag

  • 8/7/2019 modbu wonderware

    4/7

    1. Select Special/Tagname Dictionary from the Windowmaker menu.

    2. Select New

    3. Select Type then select I/ O Integer

    4. Enter a Tagname

    5. Select Access Name then select the Access Name that has been assigned to the IO Driver above. Inthis example the Access name is modbusPLC.

    6. Enter a valid 6 digit Modbus address in the Item box. In this example, the first holding register is

    used (400001).

    Figure 3: Tagname Configuration

    7. Select Save then Close.

    Create an InTouch Window

    1. Create a new window in WindowMaker.

    2. Place a pound sign on the window the double click the # sign.

    3. Select an Analog Value Display.

    4. Enter the Tagname defined above in the Expression field.

  • 8/7/2019 modbu wonderware

    5/7

    Figure 4: Value Display

    5. Select OK then save the window.

    6. Close WindowMaker.

    Publish the Application

    1. Right-click on the Compact Panel InTouch application then select Validate / Pu blish Compact

  • 8/7/2019 modbu wonderware

    6/7

    Edition Application. The application should validate without errors.

    2. Select Publish. When Publish is complete select Download.

    3. Connect then send the InTouch application to the Compact Panel. When this is complete, run the application.

    Troubleshooting

    Use the following MODBU built-in items to help troubleshoot issues between the MODBU IO Driver and the PLC:

    1. $Sys$ReadStatus - This tag contains an error code for a failed read operation from the PLC.

    2. $Sys$WriteStatus - This tag contains an error code for a failed write operation from the PLC.

    You can configure the above as IO Integer tags in your InTouch application. The tags can then be displayed in a windowand will contain an error code.

    The following table lists available error codes, code descriptions, and possible causes:

    Code Description Possible Cause

    0 OK Communication without problems

    1 Inva lid Se ria l Port The ser ial port spe ci fi ed is inva lid

    2 Invalid or unsupported item name Item name specified is either invalid or unsupported

    3 Invalid data value Specified item name does not exist on the device so protocol received invalid data

    4 Equipment failed Equipment failed or out of order5 Ack Ack action error during communication

    6 Equ ipment in u se Command inv alid when equ ipmen t is in u se

    7 Negative Ack Ack action error during communication

    8 Memory pa rit y err or Invali d communi ca tion pa rame ter

    9 Ou t of memory There is not enough memory for the I/O Server

    10 Invalid or unsupported item name Item name specified is either either invalid or unsupported

    11 Invalid or unsupported item name Item name specified is either either invalid or unsupported

    12 Inval id block s ize Internal error when generating the protoco l block s izes

    13 I nvalid CRC Invalid CRC in response message

    14 Time out waiting CTS CTS s ignal was not received, could not send request

    15 Time out waiting to start a message Response was not received from the device

    16 Time out waiting for a message to finish Started receiving a response but the communication was suspended

    17 Time out between rx char Response was not received from the device

    18 Inva lid BCD val ue Tri ed reading an invali d BCD value19 Inva lid BCD val ue Tri ed wr iti ng a negat ive BCD val ue

    20 Inva lid word swap Tri ed swap word with inva lid t ype

    32 Time out waiting for a tx message to finish Started receiving a response but the communication was suspended

    33 Inval id driver configuration f ile Internal error

    34 Invalid or unsupported item name Item name specified is either invalid or unsupported

    35 Driv er AP I not in iti alized In ternal err or

    36 Invalid or unsupported item name Item name specified is either invalid or unsupported

    37 Invalid or unsupported item name Item name specified is either invalid or unsupported

    38 Inva lid sta tion Sta tion specified for t his dri ver is in vali d

    39 Inval id block s ize Internal error when generating the protoco l block s izes

    -15 Time out start message Disconnected cables. PLC is turned off, in stop mode, or in error mode. Wrong station number, wrong RTS/CTS control settings.

    -17 Time out between rx char PLC in stop mode or in error mode. Wrong station number, wrong parity, wrong RTS/CTS control settings.

    For more troubleshooting information refer to the InTouch Compact Edition MODBU Configuration Guide.

    G. Alldredge

    Tech Notes are published occasionally by Wonderware Technical Support. Publisher: Invensys Systems, Inc., 26561 Rancho Parkway South, Lake Forest,

  • 8/7/2019 modbu wonderware

    7/7

    CA 92630. There is also technical information on our software products at www .wonderware.com/support/mmi

    back to top

    2009 Invensys Systems, Inc. All rights reserved. No part of the material protected by this copyright may be reproduced or utilized in any form or byany means, electronic or mechanical, including photocopying, recording, broadcasting, or by anyinformation storage and retrieval system, withoutpermission in writing from Invensys Systems, Inc. Terms of Use.

    http://www.wonderware.com/support/mmihttp://c%7C/Inetpub/wwwroot/t002342/T000792.htmhttp://c%7C/Inetpub/wwwroot/t002342/T000792.htmhttp://www.wonderware.com/support/mmi