OpenSCADAWiki: Home Page En/Doc/ User Protocol ...

Home | Index | Changes | Comments | Users | Registration | Login  Password:  
 
This is an old revision of HomePageEn/Doc/UserProtocol from 2010-03-19 16:16:26..

Module <UserProtocol> of subsystem “Protocols”

Russian (1 Kb) Русская версия
Ukrainian (1 Kb) Українська версія?


Module: UserProtocol
Name: User protocol
Type: Protocol
Source: prot_UserProtocol.so
Version: 0.5.0
Author:Roman Savochenko
Translated:Maxim Lysenko
Description: Allows you to create your own user protocols on any OpenSCADA's language.
License: GPL

Contents

Introduction

Module UserProtocol of the transport protocol is made to provide the user with the possibility of creation the implementations of different protocols by himself at one of the internal languages of OpenSCADA, usually JavaLikeCalc, without necessity of low-level programming of OpenSCADA.


The main purpose of the module is to simplify the task of connecting to the OpenSCADA system devices of data sources, that have limited distribution and/or provide access to their own data on a specific protocol that is usually fairly simple to implement in the internal language of OpenSCADA. For implementation of this the mechanism for the formation of the outgoing request protocol is provided.


In addition to the mechanism of the outgoing request protocol the mechanism for incoming request protocol is provided, which allows OpenSCADA to process the requests for data get on specific protocols, which simply can be implemented in the internal language of OpenSCADA.


The module provides the ability to create multiple implementations of different protocols in the object "User protocol" (Fig. 1).


The main tab of the object "User protocol". (71 Kb)
Fig.1. The main tab of the object "User protocol".

The main tab contains the basic settings of the user protocol:

1. Part of the protocol for incoming requests

Protocol of incoming requests is working in cooperation with the incoming transport and the separate object "User Protocol" is set in the configuration field of transport protocol, together with the UserProtocol module's name. In the future, all requests to the transport will be sent to the processing procedure of the protocol's request (Fig. 2).


Tab of the processing procedures of the incoming requests. (71 Kb)
Fig.2. Tab of the processing procedures of the incoming requests.

Tab of the processing procedures of the incoming request contains the field for selecting the internal programming language of OpenSCADA and the text entry field for the typing the processing procedure.


For the processing procedure the following exchange variables with incoming traffic are predetermined:


The overall scenario of processing of the incoming requests:

2. Part of the protocol for outgoing requests

The protocol of outgoing requests is working in cooperation with the outgoing transport and with the separate object of the "User Protocol". The source of the request through the protocol may be a function of the system-wide API of the user programming of the outgoing transport int messIO(XMLNodeObj req, string prt );, in the parameters of which it must be specified:


The request which is sent with the aforesaid way is directed to the processing procedure of the protocol's request (Fig. 3) with the user protocol's ID which is specified in the attribute req.attr( "ProtIt").


Tab of the processing procedures of the outgoing requests. (81 Kb)
Fig.3. Tab of the processing procedures of the outgoing requests.

Вкладка процедуры обработки исходящих запросов содержит поле для выбора внутреннего языка программирования OpenSCADA и поле ввода текста процедуры обработки.


Для процедуры обработки предопределены следующие переменные обмена:


Общий сценарий формирования исходящего запроса:


Суть выделения протокольной части кода в процедуру пользовательского протокола заключается в упрощении интерфейса клиентского обмена при многократном использовании и предпологает формирование структуры XML-узла обмена в виде атрибутов адресов удалённых станций, адресов читаемых и записываемых переменных, а также значений самих переменных. При этом весь груз непосредственного кодирования запроса и декодирования ответа возлагается на процедуру пользовательского протокола.

Ссылки

Referring pages: HomePageEn/Doc
HomePageEn/Function
HomePageEn/Using/APIFunctionLibs/LibUserPrtDevs
HomePageEn/Using/PLC/firmware


 
There are no files on this page.[Display files/form]
There is no comment on this page. [Display comments/form]