Home

HE200CGM 510

image

Contents

1. 4 2 2422 10 DCOM Accessing Remote 53 Client Configuration 51 Server 52 Device Driver ERR 27 Diagnostic 5 10 Diagnostic Access Path ERE 11 Diagnostic 24 Access 44 2 2 2 24 Edit acr u Hen 16 nee aaa 45 File new 15 31 Functional Overview Server 10 30 Global 21 22 Item Name 22 GUEST 51 Help oh e ET dne teo i rie etaed 20 Internal Registers 21 22 Item Name 23 ute laden 10 Link Poke6 iit e etre 41 Log Setup ninia ett 17 Menu System extet tetur ld 15 Message Log Item Name 25 PAGE 57 MANO0280 05 Network
2. 18 Item Name 24 Network Tree san ida 15 OCS na dida 31 OPC Server Status Messages 18 OPC Server Name Application ID 21 OPC Server Name Space Access ea er 21 21 tem Name an as er ert ea ds 21 PCI 331 Config Tool COM cintia mn 33 Programming Examples 39 Reading 39 Writing Global Values Simultaneously 43 Writing 222222 41 Quick Guide Access Paths and Item 10 Registers Global and Internal ACCESS in en bute 21 RSVIGWS32 ie tale ptis eds 47 SCAN 8 20 Scan Rate 3 53 nni c cetera 17 Scan RETOS 17 Scan Setup Heel 17 Segment Addresses 500 30 Software Installation eat 13 Start Server regen 18 Startup Setting sss 17 STOP SERVER 18 Supported Data 25 Eistee ee eins 15 16 Technical Assistance 11 Terminology ei
3. Node are required letters in this access path syntax Example Net1_Node5 means the required data is available on Node 5 of Network 1 PAGE 22 29 DEC 2003 CH 4 0280 05 4 3 2 Global Registers Currently a CSCAN network node can have up to 64 bits of Global Digital Data and 32 words of Global Analog Data An OPC Client can access all of the Global Network Data Points from every node on the network s through the OPC Server The OPC Client can also write Global Network Data Points to the network if the OPC Server has a valid Node ID 1 through 253 Global Digital Data Points are numbered from 1 to 64 inclusive Global Analog data Points are numbered 1 to 32 inclusive In order to access a single data point the Client program must make a request to the Server giving the Network number Node ID Data Type and Offset of the desired data point For example the client might request Network 1 Node ID 4 Global Analog Data Point 6 Note Global Analog Data is 16 bit only 32 bit is not supported Global Register Item Name Syntax Item Name syntax for Global Register Tz where T is the letter A for Analog or D for Digital and z is the point number 1 16 for Analog and 1 64 for Digital Example A12 is the item name to access Analog Point 12 AQG12 of device specified by the access path 4 3 3 Internal Registers The Internal Registers are not transmitted automatically around the network as is Global Da
4. eret einn enne tren nnne nnne 21 4 3 Accessing Global Registers and Internal Registers 21 4 3 1 Access NetX NodeY NetX _ 21 43 2 Global Registers ente iia 22 4 3 3 Internal Reglsters 22 4 4 ACCESSING Diagnostic MOMS 24 4 4 1 Access Path for Diagnostic 24 4 4 2 Network Status Item Name Syntax 24 4 4 3 Message Log Status Item Name 25 4 5 Accessing Items Without Using Access 25 4 6 Supported Data Types ho De dee i eere che e boa a PR dde ve a ORTI eue s 25 CHAPTER 5 STARTING THE DEVICE nnne innen inre nri rien 27 5 1 Registering Necessary DLLs if Using 500 27 5 2 Windows NT E 27 CHAPTER 6 CGM500 CONFIGURATION uzsuunsrrennnnennnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnrnnn rain innen 29 6 1 Start the CsDrvParam 29 6 2 Setthe Segment Addresses for the Boards 30 6 3 Select the Parameters for all CSCAN 30 CHAPTER 7 CGM560
5. 33 7 1 PCI 331 CGM560 Configuration 1 e aE 33 7 2 Configure tlie Card a tiit tbt utet 33 CHAPTER 8 5 enne nnne nnn inne 35 8 1 Initial TroubleShooting 35 82 Troubleshooting Faults Solutions en 35 APPENDIX A PROGRAMMING enne 39 F gt ee 39 PAGE 8 29 DEC 2003 PREFACE 0280 05 121 atando 39 1 2 Writing Valles iia it Rode dee 41 1 3 Writing Global Values nemen 43 45 2 1 Reading Values ret bet eti erm 45 3 GIMPLICIFY AM Lera it tdt datada 45 4 sube 47 APPENDIX CONFIGURATION eene nnne nn nnn nennt nnne nn trinis inten nana nnne nnne nennen 5
6. 4 bits are being written starting with the 3 bit and decimal 15 equals binary 1111 2 Excel Excel can be used as an OPC Client again using the DDE style interface 2 1 Reading Values To retrieve data from the OPC Serve and place it into a cell first select the cell to be loaded and then enter the following OPC Access String into the associated formula CSOPCSRV Net1 1 1 The equal sign is required Otherwise this is the familiar Access String 3 CIMPLICITY HMI GE Fanuc s CIMPLICITY HMI supports OPC beginning with Version 4 0 or higher CIMPLICITY HMI versions earlier than 4 0 need to be upgraded During the CIMPLICITY HMI install or upgrade ensure that the OPC Client is selected in the Communications Options NOTE The complete OPC Client configuration is presented in great detail in CIMPLICITY HMI Owners Manual GFK 1181 Please refer to that manual throughout the following discussion 1 From CIMPLICITY HMI create a New Project Make sure that OPC Client is checked under PROTOCOLS Use the CIMPLICITY Project Wizard to create Ports Devices and Points 2 From the Project Wizard Step 1 select OPCCLIENT and add Port OPC 0 This creates a port named MASTER 0 Under the General tab of the Port Properties enter a description of the port if desired Also the scan rate can default to 5 seconds and therefore only update the global values once every 5 seconds Set this scan rate to a time that wo
7. 0280 05 4 4 3 Message Log Status Name Syntax Item name syntax for message log status MsgLog_Status This is a WORD type 16 bit Read Write data item It provides a means from within an OPC client to get the status of the OPC server s massage log The item is bit coded the item bits are interpreted as follows Table 4 3 Message Log Status Codes Bit Number If upon reading the data item the Action taken if when writing a one to bit is set the bit number 1 LSB One or more messages in the log Clears all messages in the log 2 One or more Low Priority Internal Resets this bit if it is set Register items missed a scan when one was due 3 One or more High Priority Internal Resets this bit if itis set Register items missed a scan when one was due 4 Some points were taken off line Brings the points that were taken off because of successive errors line due to scan errors back on line scanning the item 5 Write error when writing to an Resets this bit if it is set Internal Register data item 4 5 Accessing Items Without Using Access Path For OPC Clients that do not support item access using an Access Path the following alternate form is suggested Access Path ltem Name In this syntax the access path is embedded into the item name so the access path need not be specified separately 4 6 Supported Data Types Some clients such as Cimplicity HMI need to specify the i
8. 20 29 DEC 2003 CH 3 0280 05 Scan Groups A single request for mulitple registers is processed faster than individual requests for the same registers Instead of making a series of individual register requests to a single node the server can request a consecutive block of registers The server attempts to maximize CsCAN communication by analyzing the configured Internal Registers and grouping them together so it can request a block of registers instead of making individual requests The groups can be viewed using the Scan Groups menu item NOTE Consecutive registers need to be used in order to maximize communications 3 4 5 Help The help menu contains a menu item that displays the online help It also contains a menu item that displays the About box CH 4 29 DEC 2003 PAGE 21 0280 05 CHAPTER 4 DATA ACCESS 4 1 General The CsCAN Network OPC server provides a means for OPC clients to access the following data e Global Registers Data Points of CsCAN network nodes e Internal Registers of CsCAN network nodes e Diagnostic items within the OPC server e Global Data Array Write of CSCAN network nodes The means by which an OPC Client accesses the above data items is through an OPC Server s name space 4 2 Components of a Name Space An OPC Client can talk to multiple OPC Servers at the same time However in order to do so the OPC Client must have a way to uniquely identify which OPC Server it wishes to talk t
9. 50 29 DEC 2003 APPENDIX A 0280 05 NOTES APPENDIX B 29 DEC 2003 PAGE 51 0280 05 APPENDIX DCOM CONFIGURATION The CSCAN OPC Server supports DCOM Distributed Component Object Model specifications so that the Server and Client need not be physically located on the same machine It is imperative that both the Server and Client host systems be properly configured Once properly configured DCOM action is almost automatic 1 The GUEST account The GUEST account is automatically set up when Windows NT is installed but it is often disabled Since the GUEST account is very likely to be available DCOM Clients will often use it to obtain network connections to a remote Server The GUEST account is disabled by default To enabled it User Manager iol x User Policies Options Help Full Name Description Built in account for administering Built in account for quest access Description Administrators Members can fully administer the computer domain amp Backup Operators Members can bypass file security to back up files Users granted quest access to the computer domain Figure 1 Guest Selected 1 From the START menu go to Programs Administrative Tools User Manager 2 Double click on the GUEST Username From the user Properties dialog insure that the Account Disabled box is NOT checked thus enabling the GUEST account Click ok to accept the value and then exit the User Manager NOTE
10. Click on the Security tab On the Security tab select Use custom access permissions 11 Click the EDIT box for Custom Access Permissions ADD the following four accounts GUEST INTERACTIVE NETWORK SYSTEM Also set each account to have Allow Access in the Type of Access box Click OK to accept the changes 12 Click the EDIT box for Use custom Launch Permissions ADD the following five accounts ADMINISTRATOR GUEST INTERACTIVE NETWORK SYSTEM Also set each account to have Allow Launch in the Type of Access box Click OK to accept the changes 13 Click the EDIT box for use custom configuration Permissions ADD the following five accounts ADMINISTRATOR GUEST INTERACTIVE NETWORK SYSTEM Also set each account to have Full Control in the Type of Access box Click OK to accept the changes 14 Click on the Identity tab Make sure that The Interactive User button is clicked 15 Click OK to return to the DCOM Configuration dialog 16 Click OK to accept all settings and close the DCOM Configuration utility APPENDIX B 29 DEC 2003 PAGE 53 0280 05 4 Accessing Remote DCOM points Once is properly configured all that remains is to add the Server s computer name to the Address Field when the device is created To add a DCOM device to CIMPLICITY 1 From the Project Wizard Step 1 select the OPCCLIENT protocol add a new port 2 From the Project Wizard Step 2 add a new device to the port just created When
11. and the possible solutions 8 1 Initial TroubleShooting Procedures In case of any problem first make sure of the following 1 The installation was carried out in Administrator mode if using Windows NT or Windows 2000 2 CsCAN OPC server as well as some other OPC servers clients use IC32CKIT DLL There needs to be only a single copy of this DLL file and needs to be located in the System32 folder of Windows NT If you have more than one copy of IC32CKIT DLL file on the computer delete all the old versions and place the newest in the System32 folder Also CSCAN OPC server needs at least version 2 0 72 of this file You can find the version of the file by right clicking on the file and selection Properties If you do not have at least Version 2 0 72 of this file contact technical support for an update 8 2 Troubleshooting Faults Solutions Problem 1 If the CSCANDrv device driver does not appear in the Devices list when attempting to start the device driver most probably the installation program was unable to make the necessary changes in the registry This can happen if the installation of the OPC Server was carried out with a non Administrator log in mode for Windows NT Device Status Startup No entry for Started System CsCANDrv in Changer System cirrus Disabled Start Cpgarray Disabled Disabled Stop dac960nt Disabled dce3 bnt Disabled Startup D ell D Disabled Hw Profiles Delldsa
12. configuring the device in the Default tab set the address to computername CsCAN Net xXx NodeYYY Where is a REQUIRED two back slashes computername is the network name of the computer on which the remote server is to be run is a required back slash YYY is the Node ID of the controller on the remote CsCAN NetworkXX 3 From the Project Wizard Step 3 add points to this device in the normal manner Before using these points make sure that the CsCANDrv Device Driver is running on the remote computer While the CsOPCSrv Server can be started as well this program is started on the remote computer automatically when the first request comes in from the local Client PAGE 54 29 DEC 2003 APPENDIX B 0280 05 NOTES APPENDIX C 29 DEC 2003 PAGE 55 0280 05 APPENDIX CUSTOM INTERFACE The Custom Interface is provided for those who are writing their own client applications Writing of a client program is beyond the scope of this text NOTE Writing a Custom programming and Interface requires an in depth knowledge of object oriented C of the Windows OLE and COM interfaces Also required is knowledge of the intricacies of a threaded operating system such as Windows NT The Custom Interface supports the following Objects and Methods OPCServer Object IOPCServer HRESULT AddG pRev HRESULT GetE HRESULT GetG HRESULT GetS HRI HRESULT Crea OPCGroup Object IOPCGroupStat
13. it suits the needs of the system The installation process also makes all necessary changes to the system registry and provides information for the Uninstall feature from Window s Control Panel PAGE 14 0280 05 29 DEC 2003 NOTES CH 2 CH 3 29 DEC 2003 PAGE 15 0280 05 CHAPTER 3 OPC SERVER OPERATION 3 1 General The server interface consists of three main elements A Menu System for configuring diagnosing and viewing connection information a Network Tree for configuring and viewing nodes and tags for each network and a Tag List for viewing and editing tags for a given node The following sections describe the overall server operation Untitled csn CsCAN OPC Server File Tags Config View re B8 Node 2 N A EE Global Tag Network 2 Network 3 B9 Network 4 Tag List B Netmork 5 Network Tree Network 6 Network 7 Network 8 S Network 9 Network 10 Scan Time 0 00 mS LogCount 3 Nodes Offline NO A Figure 3 1 Main Screen 3 2 Network Tree The Network Tree is used for configuring nodes on a network and also shows a graphical representation of how the CsCAN network is arranged All 10 networks are displayed as well as a Diagnostic branch When the communication method is set to use the serial port only the first network can be used 3 3 Tag List The Tag List displays the configured tag information for a selected node on a network It is al
14. server A warning is displayed if the server attempts to stop with clients connected Do NOT stop the device driver while the server is running If you attempt to stop the device driver before you close the server the device manager does not necessarily allow you to stop the driver 3 4 4 View The view menu is used to view elements of the server s operation a Network Status The Network Status menu item displays the network status of all configured networks This is helpful in diagnosing potential network problems Possible Status Messages OK On Line OCS Node e Network is online and operating normally as the OCS node ID OK On Line Full Control e Network is online and operating normally in Full Control mode OK On Line Monitor Only e Network is online and operating normally in Monitor Only mode node ID 255 Not used Off Line e Network is not currently configured Error CGM500 Segment Addr e Board address in CsDrvParam program does not match the address set by the dip switches on the CGM board Error CGM500 Msg Overrun e Incoming Global data from network nodes is updating too fast for the computer processor to keep up with CH 3 29 DEC 2003 PAGE 19 0280 05 Error CGM500 Firmware ver e firmware is not responding to the device driver not compatible versions of firmware amp device driver Error CGM500 RAM check e The CGM500 RAM check at start up failed Error CGM500 Timeout e 500 ti
15. tab select the Data Type as DINT or UDINT for analog A1 A16 or BOOL for digital D1 D64 as appropriate to the application Check the Read Only box if you are reading from the point ARNING Note that even though the analog data 1 to A16 is WORD 16 bit data it needs to be accessed as DINT or UDINT Specifying any other data type can result in run time error and the point can be taken off line Point Properties NETI_NODEI_A1 General Device Alam Description 201153 Advanced gt gt Data Type DINT Elements 4 Read Only Cancel Apply Help Figure 5 Data Type NOTE Specifying any other Data Types results in run time errors that take the point off line APPENDIX A 29 DEC 2003 PAGE 47 0280 05 On the Point Properties Device tab set the Address to Dn as appropriate signifies a reference to an analog item in the requested controller references a digital Boolean item in the requested controller Point Properties NET1 NODET A1 x General Device Alam Device ID MA gt Advanced gt gt Addressing Address Diagnostic Data Address set Update Criteria on Change y Cancel Appl Help Figure 6 Address Once the device and points have been configured using the points is no different from any other point in CIMPLICITY 4 RSView32 Version 3 10 of the CsCAN OPC Server also wor
16. 0 and above of the OPC Server supports the use of an Array Write for Global values only This method does NOT apply to internal registers Using an Array Write all specified global values are written to the network as an array While writing global values separately works well when only one value at a time needs to be changed it takes a fairly long amount of time to write all of the global values using something such as a For Next loop Assume approximately 100ms for each write which includes the actual write time plus time to recover in order to make the next write Multiplied by 16 Analog points the total is 1 6 seconds to write the global Analogs 6 4 seconds for the global Digitals The Array Write takes approximately 10ms to write all 16 global Analog points AND all 64 global Digital points This time includes only the amount of time it takes to write the values to the network since there is now no need to wait for another write There are two requirements The Node ID assigned to the OPC Server must not be 0 zero 254 or 255 The Node ID assigned to the OPC Server must be unique that is it must not be the same as any other node on the network Modify the Write Values program from above to look like the following im Form i fi 870 Analog In Command1 res Command2 and Command3 Removed 123 Send All 456 Command4 789 Clear All Text5 can be made Not Visible Figure 3 Adding Commands The textbox T
17. 1 T he GUES T accounts oi cetero petrae Bene natant ipii ies 51 2 Gontigure the DGOM ait t ee n abeo co Doi Eee ores 51 3 Contig ure the DCOM Serve eese trt ate a up ht eni a ne Hirn ra ee RAI 52 4 Accessing Remote poinits ertt eran na tie 53 APPENDIX C CUSTOM seres 55 CH 1 29 DEC 2003 PAGE 9 0280 05 CHAPTER 1 INTRODUCTION 1 1 General The CsCAN OPC Server HE200CGM510 is an OPC OLE for process control compliant server for accessing a CsCAN network The server runs under the Microsoft Windows 95 Windows 98 Windows NT and Windows 2000 operating systems with approximately 5 megabytes of free hard disk space A variety of communication device options are available for interfacing with the CsCAN network OPC Server supports from one to CsCAN networks depending on the selected communication option When using the computer serial port as the communication device or the CGM560 only 1 network is supported Note The OPC Server software only supports either the CGM500 502 or the CGM560 It does not support both types at once Only the OPC Custom Interface Data Access Standard 1 0A Appendix C of this manual lists the interfaces methods provided by the server is supported C Programmers can write programs using the Custom Interface Programmers usi
18. 321 266 www horner apg com PAGE 4 29 DEC 2003 PREFACE 0280 05 LIMITED WARRANTY AND LIMITATION OF LIABILITY Horner APG LLC HE APG warrants to the original purchaser that CsCAN Network OPC Server manufactured by HE APG is free from defects in material and workmanship under normal use and service The obligation of HE APG under this warranty shall be limited to the repair or exchange of any part or parts which may prove defective under normal use and service within two 2 years from the date of manufacture or eighteen 18 months from the date of installation by the original purchaser whichever occurs first such defect to be disclosed to the satisfaction of HE APG after examination by HE APG of the allegedly defective part or parts THIS WARRANTY IS EXPRESSLY IN LIEU OF ALL OTHER WARRANTIES EXPRESSED OR IMPLIED INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR USE AND OF ALL OTHER OBLIGATIONS OR LIABILITIES AND HE APG NEITHER ASSUMES NOR AUTHORIZES ANY OTHER PERSON TO ASSUME FOR HE APG ANY OTHER LIABILITY IN CONNECTION WITH THE SALE OF THIS CsCAN Network OPC Server THIS WARRANTY SHALL NOT APPLY TO THIS CsCAN Network OPC Server OR ANY PART THEREOF WHICH HAS BEEN SUBJECT TO ACCIDENT NEGLIGENCE ALTERATION ABUSE OR MISUSE HE APG MAKES NO WARRANTY WHATSOEVER IN RESPECT TO ACCESSORIES OR PARTS NOT SUPPLIED BY HE APG THE TERM ORIGINAL PURCHASER AS USED IN THIS WARRANTY SHALL BE DEEMED TO MEAN THAT PERSON FOR WHOM THE CsCAN
19. Add Tag Select the type of register access the data point will use Global or Internal Select the type of register Select the offset Select the Bit Length If Internal register is select Select the Bit Offset If Internal register is select Enter the Tag name Enter a optional comment Select OK Edit Edit changes operation depending if a network node or tag is selected If a network is selected in the Network Tree and Edit is clicked then the network name can be modified If a node is selected in the Network Tree and Edit is clicked then the node number and node name can be modified See Add Node If a tag is selected in the Tag List and Edit is clicked then the tag information can be modified See Add Tag CH 3 29 DEC 2003 PAGE 17 0280 05 3 4 3 Config The Config menu is used to configure elements of the server s operation a Scan Setup The scan setup is used to configure the communication method for accessing the CsCAN network the rate at which the global and internal registers are scanned and the number of successive node errors before a node is taken off line Communication Method There are various options for communicating with the CsCAN network The two general methods are to use the serial port and communicate through an OCS or RCS or use a network card in the PC and communicate through a driver Depending on the communication method further device configuration can be necessary The Device Setup b
20. Disabled Disk Started Boot Help Figure 8 1 No Entry CsCANry the devices list E Solution A Make sure to log in as Administrator in Windows NT Uninstall any previous installation of the OPC Server for CsCAN using Add Remove Programs applet in control panel Reinstall the OPC Server using installation instructions in the manual Solution B If the installation was done according to the installation instructions it might be necessary to restart the computer in order for the driver to appear in the Device list PAGE 36 29 DEC 2003 CH 8 0280 05 Problem 2 When attempting to start the OPC Server the following message is displayed The dynamic link library IC32CKIT dll could not be found This simply means that the IC32CKIT DLL is not located when starting the OPC Server Solution CsOPCSrv EXE OPC Server program uses IC32CKIT DLL internally So the program can not be started if the DLL can not be located To solve the this problem find the IC32CKIT DLL file It is located in the installation directory chosen when installing the OPC Server Put it in the same directory where the OPC Server program is located or put it in the directory included in the system path Problem 3 Upon start up the OPC Server displays Error CGM500 Segment Addr as the network status for some CGM500 network gateway The most probable cause for this error is a mismatch in the Segment Address for the CGM500
21. HORNER APG User Manual for the HE200CGM510 HE200CGM560 CsCAN Network OPC Server Fifth Edition 29 December 2003 0280 05 PREFACE 29 DEC 2003 PAGE 3 0280 05 This manual explains how to use the Horner CsCAN Network OPC Server Copyright C 2003 Horner APG LLC 640 North Sherman Drive Indianapolis Indiana 46201 All rights reserved No part of this publication may be reproduced transmitted transcribed stored in a retrieval system or translated into any language or computer language in any form by any means electronic mechanical magnetic optical chemical manual or otherwise without the prior agreement and written permission of Horner APG LLC All software described in this document or media is also copyrighted material subject to the terms and conditions of the Horner Software License Agreement Information in this document is subject to change without notice and does not represent a commitment on the part of Horner APG LLC CIMPLICITY is a trademark of GE Fanuc Automation North America Inc Cscape and CsCAN are trademarks of Horner APG LLC RSView32 is a trademark of Rockwell International Microsoft Windows 95 Windows 98 Windows NT and Windows 2000 are trademarks of Microsoft Corporation For user manual updates contact Technical Support or visit our websites at the following locations North America 317 916 4274 www heapg com Europe 353 21 4
22. M560 CONFIGURATION In the OPC Server software the communication method must be set to ESD Card You can select the ESD card by clicking on the config menu in OPC Server software and then click scan setup From the Communications Method drop down menu select ESD Card 7 1 PCI 331 CGM560 Configuration Tool If the communication method is set to ESD Card then the Device Setup button on the Scan Setup window will not display the configuration program There are two options for starting the configuration program One option is to use the Windows Start Programs Can PCI 331 Configuration Tool The second option is to go to Windows Start Settings Control Panel and double click on CAN Control The program starts with the following dialog screen CAN Cortrol Panel HEI 158 33 FCI 331 About Base Nel i Haj Interface 61 1 4 Wh Stet oun n Info Driver Version 2 2 0 0 Driver Start Manual Autorralic Cancel pply Figure 7 1 CAN Control Panel 7 2 Configure the Card Set the configuration as shown in Figure 7 1 Since the OPC Server software does not support multiple networks it ignores settings in the interface box and the Base Net window PAGE 34 0280 05 29 DEC 2003 NOTES CH 7 CH 8 29 DEC 2003 PAGE 35 0280 05 CHAPTER 8 TROUBLESHOOTING This section discusses various problems one can encounter when using the OPC Server
23. Network OPC Server 1 ORIGINALLY INSTALLED THIS WARRANTY SHALL APPLY ONLY WITHIN THE BOUNDARIES OF THE CONTINENTAL UNITED STATES In no event whether as a result of breach of contract warranty tort including negligence or otherwise shall HE APG or its suppliers be liable of any special consequential incidental or penal damages including but not limited to loss of profit or revenues loss of use of the products or any associated equipment damage to associated equipment cost of capital cost of substitute products facilities services or replacement power down time costs or claims of original purchaser s customers for such damages To obtain warranty service return the product to your distributor with a description of the problem proof of purchase post paid insured and in a suitable package ABOUT PROGRAMMING EXAMPLES Any example programs and program segments in this manual or provided on accompanying diskettes are included solely for illustrative purposes Due to the many variables and requirements associated with any particular installation Horner APG cannot assume responsibility or liability for actual use based on the examples and diagrams It is the sole responsibility of the system designer utilizing CsCAN Network OPC Server to appropriately design the end system to appropriately integrate the CsCAN Network OPC Server and to make safety provisions for the end equipment as is usual and customary in industrial applications as
24. This must be done on both the Server and Client computers 2 Configure the DCOM Client The DCOM interface needs to be enabled on the Client computer Click the START button and select the RUN option From the RUN option type in the name DCOMCNFG EXE Click OK to run the program From the resulting dialog select the Default Properties tab Make sure that the Enable Distributed COM on this computer box is checked to enable DCOM RON 5 the Default Authentication Level to None 6 Set the Default Impersonation Level to Anonymous 7 Click OK The Client DCOM is configured PAGE 52 29 DEC 2003 APPENDIX B 0280 05 3 Configure the DCOM Server Configuring the DCOM Server computer is slightly more involved Click the START button and select the RUN option From the RUN option type in the name DCOMCNFG EXE Click OK to run the program From the resulting dialog select the Default Properties tab Make sure that the Enable Distributed COM on this computer box is checked to enable DCOM Set the Default Authentication Level to None Set the Default Impersonation Level to Anonymous Select the Applications tab Locate the entry for the CSCAN OPC Server CsCAN and double click on it PONS NOTE If the CsCAN entry is not found then the CsCAN OPC Server has not been properly installed 9 Click on the Location tab Make sure that the Run application on this computer box is the only box checked 10
25. and passes it to a Client program The Server must adhere to OPC specifications such that any OPC compliant Client can request data from any OPC compliant Server The CLIENT is the user side program that requires data from the CsCAN network This program can be written in C or in a scripting language i e Visual Basic or Excel The INTERFACE is the user written code that transfers information back and forth between the Server and the Client This can be as simple as an external cell reference in Excel or as complex as a custom written C program PAGE 10 29 DEC 2003 CH 1 0280 05 1 3 CsCAN Network OPC Server Functionality Overview CsCAN is the name given to Horner APG s proprietary network protocol This protocol is used primarily with Operator Control Station OCS or Remote Control Station products RCS CsCAN is based on Controller Area network CAN Bus technology from Robert Bosch The CsCAN protocol supports Global Registers and Internal Registers such as R SR etc Global Registers are transmitted around the network without a need for a Master Controller or Scanner Internal Registers are not transmitted around the network automatically and need to be explicitly scanned The OPC Server is normally used as a monitor to listen to the Global Registers of other nodes on the network It can however be configured as a node on the network and can write it s own Global Network Data Points which can then be read by other
26. ard Number E Gat Select the CGM500 s ms gateway Figure 6 4 Gateway CH 6 29 DEC 2003 PAGE 31 0280 05 Select the Access OCS Node or Full Control and Node ID 1 through 253 A CGM500 Gateway can be configured as either a Regular OCS node or as a Full Control OCS node In either mode CGM500 Gateway reads all Global Data on the network The difference in the two modes is in the amount of data CGM500 is able to write to the network Presently a CSCAN network node can have up to 16 words and 64 bits of Global Data As a Regular OCS Node which usually is the case the CGM500 Gateway is assigned a network node ID 1 through 253 So it is capable of broadcasting one node equivalent of Global Data on the network Note As a Regular OCS Node CGM500 Gateway can also be assigned a node ID of 255 to configure the Gateway only to read the global data on the network In this case the Gateway is not able to broadcast any global data to the network If the Gateway is configured as a Full Control OCS Node it is still assigned a node ID when setting the driver parameters When scanning internal registers the Gateway needs to assume a node ID and it is the node ID specified here that is assumed in those cases This node ID must be one that is not used by any other device on the network However the OPC Server can dynamically assign the Gateway a different node ID when broadcasting global data on the ne
27. ard using DIP switch settings Refer to the Hardware Installation section to see how the DIP switch on a CGM500 is set Do not use same segment address for multiple boards The SET button must be pressed each time the address is changed and before another board is configured CsCAN Network Driver Properties CGM500 CGM502 Board Parameters Click here to set the Segment Board Number Segment Address 0 9000 potus Figure 6 2 Segment Address 6 3 Select the Parameters for all CSCAN Networks After setting the segment addresses for the boards used select the parameters for the networks with which the OPC Server needs to communicate By default only Network 1 is Active This means that the device driver gathers the global data from this network and makes it available to the OPC Server It is able to write the data requested by the OPC Server to the network By default the Networks 2 through 10 are not active and are not able to communicate with the OPC Server If more than one network must be used make the corresponding network active by checking the Active box for that network Network Number 1 Check here to make the network active Apply Figure 6 3 Active Network Active Networks Select the CGM500 Board Number 1 through 5 and the Gateway A or B on that board to use No two active networks can use the same Gateway of the same board Select the CGM500 board number to use Bo
28. aximum and as a moving Bar Chart Although very simple the example demonstrates how to use OPC Server from Visual Basic and demonstrates some of the power available using Visual Basic Note that the example was accomplished using only 11 lines of code The example was created using Microsoft Visual Basic 4 0 32 bit version The completed form looks like this Form ES Text1 f 870 Label Label Shape1 Figure 1 Form 1 Use Visual Basic tools to create this form and add the named objects on the screen Use Visual Basic tools to view and edit the Form Load function Private Sub Form Load Textl LinkMode vbNone Textl LinkTopic CSOPCSRV netl 1 Textl LinkItem 1 Text1 LinkMode vbLinkAutomatic End Sub This routine is executed when the form is loaded The first line makes sure that the link is closed Setting LinkMode to vbNone closes any existing link This needs to be done before changing the LinkItem or LinkTopic properties PAGE 40 29 DEC 2003 APPENDIX A 0280 05 second and third lines set the topic and item respectively These form the string that passes to the DDE Interface of the OPC Server The fourth line sets the Link Mode to AUTOMATIC The value the Text1 object is updated automatically each time the requested value changes Also by setting this value to something other than vbNone 0 the link is initiated Use the Visual Basic tools
29. board set by DIP switch on the board and by the CsDrvParam Driver Parameters program b The CGM500 board is not installed or c The firmware revision in the CGM500 does not match the CsCANDrv driver revision CsCAN OPC Server Segment Address mismatch Network 1 Error 500 Segment Addr Network 3 Not used Off Line I Blab and MEEI ina h Figure 8 2 Segment Address Mismatch Solution Ensure that the CGM500 board is installed as instructed in the Hardware Installation section Start the CsDrvParam program used to set the driver parameters Make sure that the Segment Address for the board with network problem is the correctly set in the CsDrvParam program Problem 4 Upon start up the OPC Server displays Net Err Duplicate ID as the network status for some CGM500 network gateway This means that a network node with the same node ID as that set for the CGM500 Gateway has been encountered CsCAN OPC Server Duplicate Node ID found Network on the network etwork 1 Net Duplicate ID n Figure 8 3 Duplicate Node ID Found Solution Either change the node ID of the network node with the duplicate ID or change the node ID for the CGM500 Gateway Refer to Chapter Six for details on how to change the CGM500 Gateway s node ID CH 8 29 DEC 2003 PAGE 37 0280 05 Problem 5 If for some reason the CGM500 board stops communication with the devi
30. ce driver the following appears Error CGM500 Timeout status for the corresponding network This is usually caused when a warm start is performed Windows NT is restarted without stopping the CGM500 device driver CsCAN OPC Server Ed CGM500 Network Status 4 board not Network 1 OK On Line OCS Node Network 2 Error CGM500 Timeout responding ca fF et 4 TC Figure 8 4 CGM500 Not Responding Solution A Upon experiencing this error you will need to close the OPC Server application and restart the device driver using the Devices applet in the control panel If this does not help try a cold start turn off the PC and then power up To avoid this problem in the first place when restarting the PC first stop the CsCANDrv CGM500 device driver and then restart the PC CAUTION Never turn off power to the computer without first using the Shut Down option Failure to do so can result in damage to the file structures on any disk drives and can result in permanent loss of critical data Solution B A beta version of the OPC software may be installed In the case that dual network CGM boards CGM502 are being used the second port on each board may come up with the Timeout error but only after the Driver has been stopped and restarted in the Control Panel The only way to remedy this is to either completely power down the computer restart it and restart the driver or obtain a rel
31. defined in any codes or standards which apply Note The programming examples shown in this manual are for illustrative purposes only Proper machine operation is the sole responsibility of the system integrator PREFACE 29 DEC 2003 PAGE 5 0280 05 Revisions to This Manual This version of the CSCAN Network OPC Server User Manual contains the following revisions additions and deletions Removed HE200CGM262 from the manual Revised Section 1 1 General Revised Section 1 3 CsCAN Network OPC Server Functionality Overview Added Section 1 5 Quick Guide to Access Paths and Item Names Added Section 1 6 Technical Support Revised Section 3 4 3 Item a Scan Setup Communication Method to indicate configuration locations in manual Revised and re named Section 4 3 1 also added alternate access path Revised 4 3 4 Internal Registers Internal Register Item Name Syntax Revised Table 4 3 Message Log Status Codes Revised all sections of Chapter 5 Revised all sections of Chapter 7 renamed Section 7 1 to PCI 331 CGM560 Configuration Tool Revised Appendix A in various locations 1 1 1 2 1 3 2 1 by changing portions of code from CsCAN to CSOPCSRV PAGE 6 29 DEC 2003 PREFACE 0280 05 PREFACE 29 DEC 2003 PAGE 7 MAN0280 05 Table of Contents CHAPTER T INTRODUCTION E A A A 9 1 1 AA 9 1 2 tat t IR einige 9 1 3 CsCAN Network OPC S
32. e Syntax Item Name syntax for Internal Registers RegNameA B L_L REAL where terms in are optional and may be needed depending upon the type of access desired is an optional prefix and is provided for compatibility with Cscape is replaced with the desired register name in Table 4 1 is the register address Valid addresses depend on the controller used refer to the controller manual for supported controller addresses is the bit offset 1 16 within the register The default bit offset is 1 preceding the bit offset is a required character when specifying bit offset L is the desired length 1 8 16 or 32 of the register in bits The default length is as specified in Table for the specified Register Type Note that the desired length can be different than the default length specified in the table _ preceding the length is a required character when specifying register length length other than 1 is used the bit offset needs to be either 1 the default or 8 PAGE 24 29 DEC 2003 CH 4 0280 05 4 4 REAL specifies the register as Real or Floating Point value and is to be used in conjunction with the L switch as it requires a 32 bit register preceding this switch is a required character when specifying a Real value Examples R10 Register R10 with bit offset of 1 and length of 16 bits is scanned with low pri
33. eEnumerator riid ppUnk dwConnection dwSource dwNumItems phServer pTransactionID ppErrors HRESULT Write dwConnection dwNumItems phServer pItemValues pTransactionID ppErrors ULT Cancel dwTransactionID ULT Refresh dwConnection dwSource pTransactionID PAGE 56 29 DEC 2003 APPENDIX C 0280 05 IDataObject HRESULT Dadvise pFmt adv pSnk pConnection HRESULT Dunadvise Connection H EnumOPCItemAttributes Object IEnumOPCItemAttributes HRESULT Next celt ppltemArray pceltFetched RESULT Skip celt HRESULT Reset void RESULT Clone ppEnumItemAttributes Custom Interface Client Side IAdviseSink void OnDataChange pFE pSTM INDEX 29 DEC 2003 INDEX Access 21 Accessing without Access Path 25 Active Network 30 Active Networks CGM500 30 Activity Log eea a 19 Add Node enaner 16 Add Tag norane a e end 16 Application IDin ninien trt ere ta tta 21 CIMPLICITY 45 Communication Method 17 Config Meninas dis id 17 Connect 17 CsDrvParam Program CGM500 29 CUSTOM 55 Data Acces dosis 10 Data Access Path netA
34. eMg roup szName bActive dwRequestedUpdateRate hClientGroup pTimeBias pPercentDeadband dwLCID phServerGroup isedUpdateRate riid ppUnk rrorString dwError dwLocale ppString roupByName szName riid ppUnk tatus ppServerStatus ESULT RemoveGroup hServerGroup bForce teGroupEnumerator dwScope riid ppUnk tate pUpdateRate pActive ppName pTimeBias pPercentDeadband pLCID phClientGroup phServerGroup HRESULT GetS HRESULT Sets HRES HRES IOPCSynclO HRESULT Read HRES IOPCItemMgt R H R H R H R HRESULT H RE ppErrors HR HRESULT Read HRES HRES tate pRequestedUpdateRate pRevisedUpdateRate pActive pTimeBias pPercentDeadband pLCID phClientGroup ULT SetName szName ULT CloneGroup szName riid ppUnk dwSource dwNumItems phServer ppltemValues ppErrors ULT Write dwNumItems phServer pltemValues ppErrors ESULT AddItems dwNumItems pltemArray ppAddResults ppErrors ESULT Validateltems dwNumItems pltemArray bBlobUpdate ppValidationResults ppErrors ESULT Removeltems dwNumItems phServer ppErrors ESULT SetActiveState dwNumItems phServer bActive ppErrors SetClientHandles dwNumItems phServer phClient ppErrors ESULT SetDatatypes dwNumItens phServer pRequestedDatatypes ESULT Creat
35. eased version of the OPC server Problem 6 When stopping the CsCANDrv Device Driver through the Control Panel an error occurs Could not stop the CsCANDrv Service The service is not responding to the control function Solution The OPC Server software is still running It must be closed before the driver is stopped Problem 7 When starting CsOPCSrv exe the network status box shows the networks incorrectly both in which networks were set up and what mode OCS Node or Full Control they were set for Solution Check the version of IC32CKIT DLL file located in the System32 folder within the Windows NT folder CSCAN OPC server needs at least Version 2 0 72 of this DLL file PAGE 38 29 DEC 2003 CH 8 0280 05 NOTES APPENDIX A 29 DEC 2003 PAGE 39 0280 05 APPENDIX PROGRAMMING EXAMPLES 1 Visual Basic Visual Basic is a common language used to access OPC Servers The interface is easy to understand Because the CsCAN OPC Server also supports DDE protocol Visual Basic clients can access the items using DDE syntax The DDE interface is discussed in many different texts on Visual Basic programming This manual is not a tutorial on Visual Basic programming It is assumed that the user is familiar with Windows NT and Visual Basic 1 1 Reading Values The following example creates a simple Percent Meter which reads a raw input values from the OPC Server and then displays the value as a raw number as a percent of m
36. ecit 9 Troubleshooting 2 2 2 35 Faults and Solutions 35 Initial 35 M 18 Visual BASIC tite ire ete eee tha 39 WiridOws 2000 28 Windows INT iie lien iii 27 PAGE 58 29 DEC 2003 INDEX 0280 05
37. erver Functionality Overview 10 1 4 A ts cese teca 10 1 5 Quick guide to Access Paths and Item Names DDE Excel Access Visual Basic 10 1 5 1 Data ACCESS tier abe tendra bd 10 1 5 2 Diagnostic ACCESS i nennt kien A 10 1 5 3 OPC Cimplicity Wonderware RSView 10 1 5 4 Data Access Path _ 10 1 5 5 Diagnostic Access Path 11 1 6 Technical ASSISTANCE e ete kre edie A 11 CHAPTER 2 SOFTWARE INSTALLATION 13 2 1 Installation Besta tela eva teenie EE ee np tein 13 CHAPTER 3 OPC SERVER OPERATION eerte ntn hnnc e tnum ann nn nn nennen 15 227 General der e Em e dd 15 3 2 Network Tre6 3 tot de ei tii cidad dol 15 S e to ira irren 15 3 42 Men System tote teda ara 15 3 4 1 dE 15 3 422 n cite 16 343 CONG Soccer shia vies ie teeter iste nate ida 17 MERI CEPR 18 945r eei tein ehe 20 CHAPTER 4 DATA ACCESS ocios Dann nn Ha ann an nn En anna anna 21 A Ea 21 4 2 Components of a Name Space
38. ext5 can be made invisible as it is only a holder for the array to be assembled PAGE 44 0280 05 29 DEC 2003 Edit the Form Load routine and ADD the following code to what is already there Text5 LinkMode vbNone Text5 LinkTopic CSOPCSRV net1_node20 Text5 LinkItem da write Text5 LinkMode vbLinkManual Edit the Command4_Click routine to read Private Sub Command4_Click Text2 Text 0 ext3 Text 0 Text4 Text 0 xt5 Text 0 Chr 9 0 Chr 9 Chr 9 Text2 Text Chr 9 Text3 Text Text5 LinkPoke End Sub Edit the Command1_Click routine to read Private Sub Commandl_Click 5 0 Chr 9 0 Chr 9 Chr 9 Text2 Text Chr 9 Text3 Text Text5 LinkPoke End Sub APPENDIX A 3 GhrS 9 ChrS 9 3 ChrsS 9 ChrS 9 Text4 Text nou Text4 Text What the code for Command4 Command1 does is build the array in the Text5 text box that will be written to the network The different parts of the array are separated by an ASCII Tab character Chr 9 and tacked together using the symbols The format for the array is as follows Array Dig Tab gt gt Dig Tab Dig2 Tab Dig3 1915 Tab 1916 Tab Alg Tab Dig4 Tab 141 Where Array is the A
39. he CsDrvParam EXE program is used to set the CGM500 card s driver CSCANDrv parameters The installation program puts CsDrvParam EXE in the installation directory This section explains how to use the CsDrvParam EXE program 6 1 Start the CsDrvParam Program One way to start CsCrvParam is to use the Config Scan Setup menu option If the the communication method is set to CGM500 then click the Device Setup button Another option is to double click the CsDrvParam EXE program file The CsDrvParam program starts with the following dialog screen CsCAN Network Driver Properties CGM500 CGM502 Board Parameters Board Number Segment Address 02000 CsCAN Network Parameters Board Number Network Number 1 F A Gateway CB Active Access OCS Node Full Control Node ID 253 Cancel Figure 6 1 Driver Properties PAGE 30 29 DEC 2003 CH 6 0280 05 6 2 Set the Segment Addresses for the Boards Used By default the segment address of Board 1 is Oxd000 It is recommended to use the default setting unless the user experiences address conflict with the existing hardware in the computer Also by default the segment addresses for the rest of the boards Board 2 through 5 are not assigned N A If more than one CGM500 board is used set the segment address for those boards also These need to match the segment addresses selected on the CGM500 bo
40. he driver starts and eventually indicates that it is running e CGM500 CGM502 uses CsCANDrv When the driver first starts it scans the network in order to make sure that the CGM500 Node ID does not conflict with any other node on the network The driver responds within 15 45 seconds e CGM560 uses c331 Select Startup to change the startup mode of the driver If it is known that the OPC Server is always operational the driver can be set to automatic Device Status Started System CGM402 Disabled Changer System cirrus Disabled Disabled Disabled Disabled HW Profiles Disabled Disabled Help Figure 5 1 Devices Screen Startup Click here to start the driver Click here to change the Startup Mode PAGE 28 29 DEC 2003 5 0280 05 5 2 Windows 2000 1 After the DLLs are registered restart the PC 2 After the restart go to the Command Prompt and type one of the following commands Note The CAN Drivers may already be started from the installation process of the CGM500 560 card however subsequent starts are not harmful For the CGM500 ISA type net start cscandrv enter For the CGM560 PCI type net start c331 enter CH 6 29 DEC 2003 PAGE 29 0280 05 CHAPTER 6 CGM500 CONFIGURATION Note The following configuration example uses a 500 for the communication method The configuration instructions below do not apply to the CGM560 T
41. ks with Rockwell Software s RSView32 HMI The procedure for using this software is as follows 1 Under the File Menu select New Give the project a name and wait for the project to be created 2 Under the Edit Mode tab double click System then double click Node CGM310DEMO RSY Project ME E Channel e Node Scan Class Tag Database Tag Monitor User Accounts ej Security Codes Activity Log Setup 5 Activity Log Viewer w Startup BJ Command Line amp Graphics E Alarms amp Logic and Control Figure 7 Edit Mode PAGE 48 29 DEC 2003 APPENDIX A 0280 05 3 In the Node dialog box select OPC Server as the data source Give the node a name such as Network1_Node1 4 In the Server box enter the name ofthe CsCAN OPC Server This is done by either clicking the button to the right of the Name box and selecting the Server from the list or by typing CsCAN in the box The Type is Local 5 In the Access Path box type in the Access Path such Net1_Node1 Select an update rate suitable for the application Node Al E3 Data Source Direct Driver OPC Server DDE Server a Name NETI_NODE1 Enabled Prey Server Name escan In Process Local Remote Server Bomputer Name or al gt El Access Path net1_node1 Update Rate 0 001 seconds NET1_NODE1 OPC Server CsOPCSrv netl nodel Figure 8 Node Screen 6 Click the Accept button to finalize this node C
42. lick Next and add more nodes in the same way Click Close when done adding nodes T Under the Edit Mode tab double click Tag Database 8 In the Tag Database dialog box type a name for the tag such as Net1 Node1 AQG1 9 Select the type as it fits the register you are going to access For Real values select Analog 10 Give the tag a description if so desired 11 Under Data Source select Device 12 In the Node Name box either click the button to the right of the box and select the node that this tag is coming from or type in the name of the node in the box 13 In the Address box type in the address for the tag such as A1 or D5 or R13 14 Click the Accept button to finalize this tag Click Next to add more tags in the same way Click Close when done adding tags APPENDIX A 29 DEC 2003 PAGE 49 MANO0280 05 Tag Database x Tag Name fieti_nodel_sqal Type Analog 71 Security Description Minimum 0 Scale Units Maximum 100 Offset fo Data Type Data Source Device C Memory Node Name NET1_NODE1 Address fal pe LES po 1 nodel aggl Analog qj p 2 Figure 9 Tag DataBase 15 Under the Edit Mode tab double click Tag Monitor 16 In the Tag Name box type the name of the tag you wish to view such as Net1 Node1 AQG1 and press Enter The value is displayed PAGE
43. med out when communicating with the network Error CGM500 Write Timeout e 500 timed out when attempting to Write data to the network the network be too busy and with the present node priority of CGM500 it is not getting the time slot to send its messages to the network Error CGM500 General e Error experienced by device driver when trying to talk to the CGM500 Net Err Duplicate ID e Network node ID is in conflict with another network node cannot have two nodes with same ID b Activity Log The Activity Log provides a means to see the activity taking place inside the server The activities are time stamped resolution in seconds When a maximum number of messages are logged as specified in the Log Setup the older entries are overwritten Listed below are the types of activities which are logged Connection requests for a network node Connection requests for data items Data item taken off line Data item that was off line is back on line Write requests for Internal Register data items Write complete messages for Internal Register data items Scan missed and scan error messages for Internal Register data items The Activity Log dialog also lists the data items that are taken off line by the server upon successive scan errors These points can be brought back on line either by using the button provided on the dialog or by using the Diagnostic data item MsgLog Status as described in Chapter 4 Data Access PAGE
44. nd three Text Boxes to the Percent Meter project im Form iof x fi 870 Analog In Command1 pm Clear All Figure 2 Adding Commands PAGE 42 29 DEC 2003 APPENDIX A 0280 05 Edit the Form Load routine ADD the following code Private Sub Form Load Textl LinkMode vbNone Textl LinkTopic CSOPCSRV netl nodel Textl LinkItem Al Textl LinkMode vbLinkAutomatic REM added code Text2 LinkMode vbNone Text2 LinkTopic CSOPCSRV netl node253 Text2 LinkItem 1 Text2 LinkMode vbLinkManual Text3 LinkMode vbNone Text3 LinkTopic CSOPCSRV netl node253 Text3 LinkItem 2 Text3 LinkMode vbLinkManual Mode vbNone Topic CSOPCSRV netl node253 W Mode vbLinkManual Text4 Lin Text4 Lin Text4 Lin Text4 Lin ar 3 ll End Sub Edit the Command1_Click routine to read Private Sub Commandl Click Text2 LinkPoke End Sub Edit the Command2 Click routine to read Private Sub Command2 Click Text3 LinkPoke End Sub Edit the Command3_Click routine to read Private Sub Command3 Click Text4 LinkPoke End Sub And finally edit the Command4 Click routine Private Sub Command4 Click Text2 Text 0 Text2 LinkPoke Text3 Text 0 Text3 LinkPoke Text4 Text 0 Text4 LinkPoke End Sub APPENDIX A 29 DEC 2003 PAGE 43 0280 05 1 3 Writing Global Values Simultaneously Version 2 0
45. ng scripting languages e g Visual Basic or Excel can access the Server using DDE Dynamic Data Exchange syntax or OPC compliant ActiveX controls OPC is based on the Microsoft COM Common Object Model specifications COM introduces a great deal of hardware and software independence OPC runs on any hardware platform using any language that supports COM Any hardware dependent code is limited to hardware specific Device Driver modules supplied by the manufacturer of the hardware The ISA CsCAN Interface Board HE200CGM500 or HE200CGM502 provides the necessary interface with the CsCAN network The CGM500 is a single channel gateway and the CGM502 is a dual channel gateway CGM500 is used hence forth in this manual to refer to either CGM500 or CGM502 The PCI CsCAN Interface Board HE200CGM560 provides the necessary interface with the CsCAN network The CGM560 is a single channel gateway The CGM500 502 and CGM560 are not used together 1 2 Terminology A DATA SOURCE is a piece of hardware or software that provides or accepts data to or from an application program Typically this is a hardware device i e CGM500 CGM560 but it could also be a software package such as a database or spreadsheet The DEVICE DRIVER is the code provided by the hardware manufacturer and is responsible for handling the hardware peculiarities of hardware such as the CGM500 CGM560 card The SERVER is the program which takes the data from the Device Driver
46. nodes on the network 1 4 Limitations The CsCAN OPC Server operates under Windows 95 or Windows 98 when using the serial port as the means of communication However DCOM for Windows 95 or Windows 98 does not support the CsCAN OPC Server The remote CsCAN OPC Server must be run under Windows NT or Windows 2000 when using DCOM The client can run under Windows 95 or Windows 98 1 5 Quick guide to Access Paths and Item Names DDE Excel Access Visual Basic 1 5 1 Data Access CSOPCSRV NetA_NodeB HH ex CSOPCSRV Net7_Node23 R45 Where A is the network number always network 1 for the lite version B is the target CSCAN node number 1 to 253 is the register reference and number R4 16 AQ23 IG14 5 1 5 2 Diagnostic Access CSOPCSRV diag NetXx_Status ex CSOPCSRV diagl Net1 Status See DIAGNOSTIC DATA CSOPCSRV diag MsgLog_ Status See DIAGNOSTIC DATA 1 5 3 OPC Cimplicity Wonderware RSView Iconics To connect to the CsCAN OPC server from an OPC client If selecting the server choose CsCAN OPC Server 1 5 4 Data Access Path netA_nodeB Where A is the network number always network 1 for the lite version is the target CsCAN node number 1 to 253 Item Names RegNameA B _L REAL Where is the optional percent sign RegName is the register type I AQ T A A is the register number B is the optional bit number REAL is the optional flag to treat as a floating p
47. o as well as which device and data item it is interested in This combination of information is called the name space of a particular OPC Server The name space of an OPC Server consists of the following three components 1 OPC Server Application ID This is basically a means for an OPC client to identify a particular OPC server The Application ID for CSCAN OPC Server Version 3 10 and above is CSCAN Note Users upgrading from earlier versions of the OPC Server need to change to the application ID to CSCAN 2 Access Path This is the device address where the related data item can be found 3 Item Name This describes the item point the OPC client is interested in Note The way an item name and its access path are specified can vary from one OPC Client to another but this information needs to be provided to the OPC Server to uniquely identify a data point Some OPC Clients do not have a provision to specify Access Path 4 3 Accessing Global Registers and Internal Registers Global and Internal registers share the same type of nomenclature used to access the OPC Server data Both use an access path and an item name The access path is the same The item names are different 4 3 1 Access path NetX_NodeY or NetX_NodeY Note Some clients need to use the alternate access path which contains brackets NetX_NodeY X is the network number 1 10 and Yis the node number 1 253 where the required data is present Net
48. oint REAL value The above software programs are trademarked by their respective company CH 1 29 DEC 2003 1 5 5 Diagnostic Access Path diag Item Names Netxx_Status or MsgLog_Status See DIAGNOSTIC DATA The following are valid examples of access paths CSOPCSRVIdiag msglog_status CSOPCSRVIdiag net1_status zCSOPCSRV net1 node1 r2 32 real CSOPCSRVI net1 node1 r5 1 1 6 Technical Assistance For assistance contact Technical Support at the following locations North America 317 916 4274 www heapg com Europe 353 21 4321 266 www horner apg com PAGE 11 0280 05 PAGE 12 29 DEC 2003 CH 1 0280 05 NOTES CH 2 29 DEC 2003 PAGE 13 0280 05 CHAPTER 2 SOFTWARE INSTALLATION 2 1 Installation The Windows operating system must be installed and operating on the host computer Do not attempt to install Device Drivers or OPC Severs until the Windows operating system is completely functional 1 Boot the computer into the ADMINISTRATOR mode to ensure proper installation of the Device Driver 2 Insert Distribution Diskette 1 into the floppy disk drive or Insert the Distribution CD into the CD ROM drive 3 Open a directory window to the floppy disk drive or CD ROM drive then double click the SETUP EXE program Follow the instructions presented by the Setup Wizard to complete the installation The critical step is specifying the home directory for the file The default directory can be used if
49. ority and with the default scan rate for the node specified with Access Path 25 2 Bit 2 of R25 is scanned with the default scan rate Note that the preceding 25 2 is optional and can be omitted AQ25 32 REAL Internal Registers AQ25 and AQ26 can be accessed as a single 32 bit register containing a Real number Accessing Diagnostic Items There are two supported diagnostic items that clients can access network status and message log status Like the register access they require an access path and item name 4 4 1 Access Path for Diagnostic Items The following is the access path to access the diagnostic items supported by the server Access Path DIAG 44 2 Network Status Item Name Syntax Item name syntax for network status NetX Status Where X is the network number 1 10 These items are WORD type 16 bit Read Only and serve to access the status of every network from within an OPC client The status of networks can also be viewed from the OPC server using the view menu Following are the status code values provided by this item Table 4 2 Network Status Codes Value Status 0 Not Active Off Line Network is not currently configured Status OK OPC Server program is operating normally and no 1 problems encountered communicating with the CGM500 gateway for this network UN Error Check the OPC server status from its view menu CH 4 29 DEC 2003 PAGE 25
50. rks well for the needed purpose as a higher scan rate consumes more computer resources Click OK to add the port There are no further critical items at this stage NOTE If more than 10 OCS nodes are to be configured additional OPC ports must be configured At the time of this writing each OPC port can be configured for 10 devices or nodes Up to 10 OPC ports are available to configure All use the same singular OPC server PAGE 46 29 DEC 2003 APPENDIX A 0280 05 3 From the Project Wizard Step 2 select MASTER_OPC_0 and then add device or node Name the Device such as NET1 NODE20 or some such thing that is unique and click OK In the Device dialog select the DEFAULT tab In the Address box enter the following string CsCAN netxx nodeyyy Where xx is the Network number 1 to 10 and is the Node ID of the controller which contains the point or points to be used 1 to 253 Device NET1_NODE1 x General Default Address Escan netl_nodel CPU Id 0 Enable 5 m Cancel poly Figure 4 Server Application ID 4 Add as many devices as necessary to this port using the same string in the Address box except changing the Node ID appropriately for each device 5 From the Project Wizard Step 3 select a device and begin to add a new point Give the point a unique name such as NET1_NODE20_A1 Also select the appropriate class Analog or Boolean Click OK 6 Onthe Point Properties General
51. rray Text Box that is linked to the da_write Linkltem Dig Tab is the number of Digital bits to write from 0 to 64 is the ASCII Tab Character Chr 9 1 Dig is the number of the first Digital bit to write from 0 to 64 Alg is the number of Analog Words to write from 0 to 16 1 Alg is the number of the first Analog Word to write from 0 to 16 Digl Algl Alg2 Dig2 Dig3 Dig4 are the Digital Words to write Alg15 1916 are the Analog Words to write Tab 1 Al lg Tab Tab Al Digl APPENDIX A 29 DEC 2003 PAGE 45 0280 05 The strings 2191 2194 and Alg1 A1g15 are not ALL necessary if less than the maximum amount of global data is to be written For instance in the VB example only 3 Analog values are being written starting at the 1 Analog value Note that Dig and 1 Dig are both set to 0 since there are no Digital values to be sent to the network Also note that Alg and 1 Alg are set to 3 and 1 respectively since there are only 3 Analog values to be sent to the network starting with the first one Since no Digital values are being sent the Dig1 4 strings are left out and only the first three Analog strings A1g1 3 are used The 64 Digital values are grouped together into a total of 4 Words When using the Array Write technique Array 4 Chr 9 3 Chr 9 Chr 9 Chr 9 15
52. rtup If the client application is expecting specific tags to be available in the server then the default file needs to be set d Connect Via Modem The server has the ability to connect via a modem The modem connection only works if the Communication Method is set for a serial connection Connect Via Modem is used to configure the modem connection information Once the modem settings are configured the CONNECT button is clicked in order to make the actual connection The HANG UP button is used to disconnect PAGE 18 29 DEC 2003 CH 3 0280 05 Start Server After the server is launched the server attempts to start automatically When using a network card to communicate with the network the device driver MUST be started before the server is launched See Chapter 5 Starting the Device Driver An error occurs if the device driver is not available when the server attempts to start and the server stops There are two primary ways to launch the server Double click the CSOPCSRV EXE or a shortcut to CSOPCSRV EXE Configure a client to attach to the server when the client starts The Start Server menu item is used to start the server after it has stopped The icon with the green light can also be used f Stop Server Closing the server clicking on the Stop Server menu item and clicking on the icon with the red light all causes the server to stop Links to the server items in OPC clients may need to be closed before stopping the
53. so used to modify a selected tag 3 4 Menu System The main Menu System consists of File Tags Config View and Help 3 4 1 File The file menu is used to control the configuration file It contains the standard items that are found in many windows programs New Open Save Save As PAGE 16 29 DEC 2003 CH 3 0280 05 3 42 Tags OPC clients can connect to the server and gather data two different ways One way is for the client to browse pre configured tags in the server and use the tags to access the data The other way is for the client to directly access the data which is described in the Data Access section The Tags Menu is used in conjunction with the network tree to modify nodes and tags for a given network so an OPC client can browse and connect to the tags Right clicking on the Network Tree also display the Tags Menu a Add Node A node must first be added to a given network in order to add tags A node represents a single OCS RCS unit e Click on the desired network in the network tree e Click Add Node e Enter the node number and node name e Select OK b Add Tag Tags can be added to nodes on any network A tag represents a data point from a given node There are 2 types of data points Global Register and Internal Register They are described in more detail in the Data Access section Both types of data points can be used when configuring the tag information Click on the desired node in the network tree Click
54. ta So these need to be explicitly scanned The server sends a request to the corresponding CsCAN node over the network for the Internal Register and then the node sends the requested data Every Scan Period the OPC server checks if a scan is due for an internal register It is important to note that only one Internal Register scan per network can be initiated every Scan Period provided that the earlier scan is complete As a result an internal register might not be scanned at the exact internal register rate It depends upon Scan Period network traffic and the register scan rate Note that Global Output Registers AQG QG can be accessed as Internal Registers These are also in fact transmitted as Global Data Points and thus ought not be accessed by the OPC clients as Internal Registers as far as possible because that might unnecessarily affect the scan times of other Internal Registers CH 4 29 DEC 2003 PAGE 23 0280 05 Accessing of following Internal Registers is supported at this time Table 4 1 Internal Registers Register Name RegName to use in Default Length Access Type in bits item name Al 16 Read Write AQ 16 Read Write 16 Read Write AQG 16 Read Write R 16 Read Write 1 Read Write IG 1 Read Write Q 1 Read Write QG 1 Read Write M 1 Read Write T 1 Read Write SR 16 Read Only K 1 Read Only 1 Internal Register Item Nam
55. tem type explicitly DINT BOOL etc when specifying the item item name access path etc The bit type items supported in the OPC Server name space can be accessed as BOOL items boolean i e True or False NOTE It is important to note that the word type items supported in the CSCAN Network OPC Server name space must be accessed as either DINT 32 bit signed integer or UDINT 32 bit unsigned integer Thus the analog and diagnostic data items must be accessed as either DINT or UDINT even though these are 16 bit values PAGE 26 0280 05 29 DEC 2003 NOTES CH 4 5 29 DEC 2003 PAGE 27 0280 05 CHAPTER 5 STARTING THE DEVICE DRIVER Before attempting OPC Server communications using a network card the associated Device Driver must for the network card must be started 5 1 Registering Necessary DLLs if Using CGM500 Two DLLs Dynamically Linked Libraries must be registered with the system to perform properly Note The DLLs may already be present in the system however subsequent registrations are not harmful 1 From the Start button select the RUN option In RUN option type regsvr32 opccomn_ps lt enter gt 2 When this is complete type regsvr32 opcproxy lt enter gt 5 2 Windows NT To start one of the Device Drivers first open the Device Manager which appears in the Windows Control Panel It is reached through the START Button Select the Device Driver and then click the START button T
56. to view and edit the Text1_Change function Private Sub Textl Change O Static value percent As Integer Static percent display As String 0 value Textl Text O percent value 2400 100 0 percent display Str percent Label2 Caption percent display Shapel Width value 2400 1815 End Sub This routine is called any time the value in Text 1 changes Since the OPC link is set to vbLinkAutomatic the value in Text1 is automatically updated each time the requested value changes This causes the Text1 Change routine to be called at the same time The first two lines O O declare some internal variables Value defaults are integer values but it is important that percent be declared as an integer as well The third line O gets the value from the object Remember this was placed here by the OPC Server link in voLinkAutomatic mode The Text1 text value is automatically converted to integer format by Visual Basic The fourth line O converts the reading into a percentage of full scale value The result is placed into an integer value percent in order to remove any fractional percentage readings Full Scale is arbitrarily chosen to be 2400 This value is defined by the application and sensors used The fifth line converts the integer percentage value into a string and tacks on the percent sign The text is then placed into the Labe12 object s Caption property Gwhere it is automatically displa
57. twork This way the Gateway can be assigned multiple unused 10 on the network thereby increasing the amount of global data that can be broadcast to the network several times Note If the node ID is already assigned to a network node and is also assigned to the Gateway and is used to broadcast global data on the network the other network node with the same ID stops network communications So the Full Control mode needs to be used with caution when broadcasting data on the network Select the CGM500 gateway s Access Type UCSNode network access mode Full Control 253 Node ID Select the CGM500 gateway s network ID Figure 6 5 OCS Node and Full Control After changing any of the above parameters for a network click Apply button for the change to take effect If the Apply button is not clicked the changes are discarded i Active After selecting the network s parameters click here for the network parameters to take effect Cancel Figure 6 6 Parameters Take Effect After selecting parameters for all networks click OK button to accept the changes and click Cancel button to discard the changes When OK is clicked the changes are copied to the registry and the driver must be restarted for the changes to take effect PAGE 32 0280 05 29 DEC 2003 NOTES CH 6 CH 7 29 DEC 2003 PAGE 33 0280 05 CHAPTER 7 CG
58. utton displays a different configuration window depending on the communication method selected See Chapter 6 for CGM500 CGM502 and Chapter 7 for CGM560 configuration Scan Rate There are two options for selecting the type of scan rate as fast as possible or fixed If the Fixed Scan Rate box is not selected then the server scans the nodes as fast as possible If the box is selected then a Global Data Scan Rate and Internal Register Scan Rate must be entered The Global Data Scan Rate is the rate at which the server requests global data from the network and checks for internal register updates The Internal Register Scan Rate defines the rate the server requests internal register data Scan Retries The Scan Retries value defines the number of successive scan errors before a node is taken off line This prevents the network from experiencing continual update delays due to a node or nodes not communicating with the server b Log Setup The server contains an event log The Log Setup allows for configuring how the event log operates The event log can be saved to a file by clicking the Log to File check box When selected the option for clearing the log on startup and selecting a log file is enabled The Max Entries value defines the number of entries in the log file before the log file wraps around and overwrites the existing entries Startup Setting The Startup Setting is used to define a configuration file that the server loads at sta
59. yed The seventh line O changes the size of the Bar Graph Shapel The 1815 value is taken from the Shapel properties when the object is created This is the maximum length or 100 of the object This value multiplied by percentage of full scale is used to set the length of the Bar Graph 0 to 100 APPENDIX A 29 DEC 2003 PAGE 41 0280 05 1 2 Writing Values If it is necessary to write values through the network the values must be written to the CGM500 s global memory locations The CGM500 writes these values to the network where they can be read by other nodes It is possible to either write each value separately or to write any or all values simultaneously array write NOTE The OPC Server can not write values directly to any other node s non global registers on the network Refer to Chapter Six for details The OPC Server must be properly configured for the Client to be able to write values to the CGM500 card during OCS Node mode and Full Control mode There are two requirements The Node ID assigned to the OPC Server must not be 0 zero 254 or 255 The Node ID assigned to the OPC Server must be unique that is it must not be the same as any other node on the network Visual Basic uses the LinkPoke method to write values to the OPC Server First configure the OPC Server to have a Node ID that fits within the previous restrictions For this example set the OPC Server Node ID to 253 Add four Commands a

Download Pdf Manuals

image

Related Search

Related Contents

Moxa Nport 6650 8 ports  市民パソコンなんでも相談室/デジカメ初級・年賀状作成講座  ST200 Smart Table Manual  EA159CP-1(ペンシルグラインダー)取扱説明書 - 作業中  cyberJack® Bedienungsanleitung    ・扉を閉し子状態て・`]後 をスライドさせます。 一  2. - Vivitek  Étiquette - Engage Agro  

Copyright © All rights reserved.
Failed to retrieve file