From OpenSCADAWiki
Jump to: navigation, search

As you can see from Figure 1, interaction with devices carried out through some transport on which their physically based. Requests to the transport you can send:

  1. Directly by OpenSCADA system API function of the transport object string messIO( string mess, real timeOut = 0 );, if the protocol specific part is very simple and you need only the data extract.
  2. Wrapped data request req by function int messIO( XMLNodeObj req, string prt ); and for protocol prt, if the protocol part is complex enough and already presented in OpenSCADA.
  3. Wrapped data request specific for user by function int messIO( XMLNodeObj req, "UserProtocol" ); and the user protocol implementation, if the protocol part is complex enough and not yet present in OpenSCADA. The user implements here itself of the protocol specific part in the module UserProtocol and the data specific part in the template for the Logical Level module or directly in controller's procedure on the internal language of the module JavaLikeCalc.
At.png This latter method is currently developed to the possibility of forming a protocol code part directly in the same code of the template as a separate built-in function with call the requesting function of the first method, if there is no need for reuse, or even if such a need exists and it makes sense to create a complex template that can combine the role of the output protocol, through its connection to the user protocol module. And it will be completely stored in a single template library.