12.07.2015 Views

PLCHandler Programming Guide - Esco Drives & Automation

PLCHandler Programming Guide - Esco Drives & Automation

PLCHandler Programming Guide - Esco Drives & Automation

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PLCHandler</strong> <strong>Programming</strong> <strong>Guide</strong>1 IntroductionThe <strong>PLCHandler</strong> is a C++-class which provides at a comfortable level services for the communicationbetween a client (e.g. visualization) and a 3S <strong>Automation</strong>-Alliance compliant PLC (controller).The following features and services are available:Establishing and terminating the communication with the PLCReading all variables on the PLCCyclic reading of variables' values from the PLCSynchronous reading of variables' values from the PLCSynchronous writing of variables' values to the PLCPossibility of instancing for the purpose of a simultaneous communication with several PLCsAutomatic reconnecting with the PLC after an break of the connectionAutomatic restart after a program download from CoDeSys to the PLCData transfer to and from PLCThus the <strong>PLCHandler</strong> can be used as a basic component for OPC Servers or visualizations.The communication to the PLC can be done via the following communication channels (named"interfaces" in the following):1. Simulation: The symbolic information of the PLC is read directly from SDB file 1 . Provided thisway all variables can be written to and read from the PLC like it is possible in a connection.2. ARTI: The ARTI-Interface already has been ported to various platforms (Windows NT,Windows CE, VxWorks, Linux) and serves as a communication layer concerning the PLC.The ARTI only supports communication via TCPIP and serial interface.3. Gateway: The Gateway is restricted to Windows 95/98/NT/2000/XP, but provides variouscommunication media and protocols (TCPIP, RS232, Shared-Memory, CANOpen, ...).The Handler is delivered as SDK 2 , i.e. all C++ header files, the static link library (<strong>PLCHandler</strong>.lib resp.<strong>PLCHandler</strong>Complete.lib) and a sample program (main.cpp) are part of the package.The link library is provided in two different versions:1. <strong>PLCHandler</strong>.lib: Contains only <strong>PLCHandler</strong> (without ARTI resp. gateway dlls)2. <strong>PLCHandler</strong>Complete.lib: Contains complete ARTI interface (no additional dlls needed)A Visual Studio C++ V6.0 workspace for compiling the sample program also is contained(<strong>PLCHandler</strong>Demo.dsp).For the Windows Platform the <strong>PLCHandler</strong> additional is available as a dll (<strong>PLCHandler</strong>.dll with ANSIinterface)and as ActiveX-Control (<strong>PLCHandler</strong>X.ocx).In the following the <strong>PLCHandler</strong> class and its methods will be described in detail.1 SDB = Symbolic Data Base; will be created by CoDeSys during project compilation if in Project /Options / Symbol configuration the export of variables is activated2 SDK: Source Development Kit 3S - Smart Software Solutions GmbH<strong>PLCHandler</strong> Programmming <strong>Guide</strong>.doc Page 3 of 17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!