.

Average: 0
Rating Count: 0

Development status: New development
Information status: Updated
Repository: http://svn.code.sf.net/p/tango-ds/code/DeviceClasses/Communication/AllenBradleyPLC
Contact:



Class Description


This class provides access to Rockwell Automation`s PLCs.
It gives two ways of reading and setting values of tags. 1) by commands 2) by dynamic attributes (see Tags device property) Note! It depends on Tuxeip library.

Families: Communication

Key words:

Language: Cpp

License:

Contact:

Class interface


Attributes:

Commands:

Name Description
WriteTagInput: DevVarStringArray
Output: DevString
Write tag value specified by string.
ReadTagInput: DevString
Output: DevString
Read tag value and return it as a string.
ReadTagsAsDoubleInput: DevVarStringArray
Output: DevVarDoubleStringArray
Reads the tag`s values from PLC and returns values and type
WriteTagsAsDoubleInput: DevVarDoubleStringArray
Output: DevVarDoubleStringArray
Writes tags, examining first types (by reading) in PLC and then doing proper conversion.
OpenInput: DevVoid
Output: DevBoolean
Open connection to PLC defined by properties
CloseInput: DevVoid
Output: DevVoid
Close connection to PLC
StatusInput: DevVoid
Output: DevString
This command gets the device status (stored in its device_status data member) and returns it to the caller.
StateInput: DevVoid
Output: State
This command gets the device state (stored in its device_state data member) and returns it to the caller.

Pipes:

Properties:

Name Description
TagsString[]Type List of tags in PLC. This list is used during device initiation to create attribs. It contains of lines of comma separated values: tagName,tagType,[attribName] tagName - is the name of tag in PLC, could contain array(structure) element selector in square bracket tagType - type of tag in PLC, should contain square bracket with size to determine array attribName - optionally attrib name to be mapped to tag attribName is required in case of tag pointing to element of structures or arrays in PLC
TagUpdateIntervalDevLong Min interval (in milliseconds) between update of tag`a value.
AutoConnectDevBoolean State if a device should try to reconnect to PLC if there is no connection, for an example in case of previous error...
PathShort[]Type Path to the device. See Tuxeip documentation.
RPIDevLong Request packet interval - used to calculate time-out
ConnectionSNDevShort Connection Serial Number - should be unique in the network
ConnectionIDDevLong ID of the connection - for own use
PlcTypeDevString PLC type
IPDevString PLC IP number


Please log in to comment.

Generated

PDF generated from POGO



README

#============================================================================= # # file : README # # description : Device Server with third party dependencies installation procedure # # # Author: Piotr Goryl, e-mail: piotr.goryl@uj.edu.pl # $LastChangedBy: $ # # $Revision: 57 $ # # # copyleft : MAX-lab, Lund, SE / Jagiellonian University, Krakow, PL # #=============================================================================

CONTENT:
  • How to install
  • Repository contents
  • Makefile description
  • Environment variables and paths
  • Third parties libs

HOW TO INSTALL: Since this Device Server depends on third party libraries, installation may require some additional steps - see 'Environment variables and paths'. Rememeber to point out your operating system. However, Makefile provided could simplify this process.

There are several ways of installation:
  1. Using 'all' and 'install' targets.
  2. Compiling and install libraries first then DS.
  3. Compiling and install only DS (in case of libraries already installed)
  4. Other
  1. Using 'all' and 'install' target:
    >make all linux=2.6 >make install linux=2.6

System Message: WARNING/2 (<string>, line 39)

Enumerated list ends without a blank line; unexpected unindent.

But, both invocation may require superuser privileges because compiling DS may require libs install first.

  1. Compiling and install libraries first then DS:
    >make third-party >make third-party-inst >make ds linux=2.6 >make install linux=2.6

System Message: WARNING/2 (<string>, line 47)

Enumerated list ends without a blank line; unexpected unindent.

2nd and 4rd lines may require privileges

  1. Compiling and install only DS in case of libraries already installed
    >make ds-only linux=2.6 >make ds-inst linux=2.6
  2. eg. successive installation of every library, then DS

The examples before are for Linux machines if you use Solaris change 'linux' to '_solaris'.

REPOSITORY CONTENTS
  • 'doc' folder: documentation of this Tango's Device Server
  • 'src' folder: source files for this DS
  • 'third-party' folder: svn:externals linked to libraries (sources of) or sources that this DS depends on
  • 'Makefile': make input for compiling and installing of this DS
  • this file

MAKEFILE DESCRIPTION Makefile in main repository folder contain several targets. Here are short description of these with somehow outlined dependencies:

System Message: ERROR/3 (<string>, line 67)

Unexpected indentation.
-'all' tries to compile all sources

-'third-party' compile libraries -'ds' compile device server

System Message: ERROR/3 (<string>, line 70)

Unexpected indentation.
-'third-party-inst' install libraries (some DS don't need libs to be installed first,
if it is the case one should remove this dependency from 'ds' target)

System Message: WARNING/2 (<string>, line 72)

Definition list ends without a blank line; unexpected unindent.

-'ds-only' compile DS independent of 'third-party-inst' -'install' install both libs and DS

System Message: ERROR/3 (<string>, line 74)

Unexpected indentation.
-'third-party-inst' install libs -'ds-inst' install Device Server

System Message: WARNING/2 (<string>, line 76)

Block quote ends without a blank line; unexpected unindent.

-'clean' invoke cleaning in lib's and DS's folders

There are also makefiles in 'src' (generated by Pogo) and in 'third-party'. These are to be used with conjunction with "main" Makefile, but could be (or, in some cases, should be) used separately. Makefile in 'third-party' contain targets for making all required libs and may require modification to work. The same is for one in 'src' for DS respectively.

ENVIRONMENT VARIABLES AND PATHS Makefiles use TANGO_HOME and TUXEIP_HOME variables to point Tango and TuxEip libraries respectively. Default are both /usr/local. You may need to change these to conform your environment. You can specify these on command line or in Makefile. If you are changing the Makefile, it should be enough to change the main one. You should also set 'linux' or '_solaris' variable to point out your os. See Makefile in 'src'.

THIRD PARTIES LIBS This device server use external TuxEip library to comunicate with PLC. The version provided and tested with is the one from pvbrowser project. It is located in third-party/tuxeip-1.0. It is licenced according to GPL.

22 Feb 2018, DS Admin
Updated:
The device class has been updated.
You can see previous version here .



20 Apr 2017, Piotr Goryl
Updated:
The device class has been updated.
You can see previous version here .



23 Feb 2017, Piotr Goryl
Created:
The device class has been added to catalogue.
Added by:pgoryl2 on:23 Feb 2017, 10:47 a.m.