Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » understanding when to use converter function blocks
understanding when to use converter function blocks [message #1732465] Tue, 17 May 2016 13:47 Go to next message
meon eclipse is currently offline meon eclipseFriend
Messages: 3
Registered: February 2016
Junior Member
I am trying to understand when there is an absolute need of using converter function blocks. I have seen use of the converter function blocks before any publish and after any subscribe (XPlus3) ; on just publish end or subscribe end (MechPress); or none at all (MechPress). Can someone please tell me when the converter function blocks need to used?

Subscribe with converter and no converter in
MechPress ManualTest Device and Simulation Resource

Publish with no converter in Mechpress Control Device
and EMB_RES Resource

Publish with converter in XPlus3 PC_1 Device VIS Resource

Subscribe with converter in XPlus3 MICROCONTROLLER Device; CALC Resource
Re: understanding when to use converter function blocks [message #1732473 is a reply to message #1732465] Tue, 17 May 2016 14:28 Go to previous message
Martin Melik-Merkumians is currently offline Martin Melik-MerkumiansFriend
Messages: 48
Registered: March 2016
The rule if a converter FB is needed is as follows:
If both sides of a data connection to be connected are of an ANY type (e.g., ANY, ANY_NUM, ANY_MAGNITUDE,...) then a converter FB is needed. If one of the connection's ends has a concrete type (INT, DINT, WORD, STRING), then this type is used to typify the other side of the connection.

This is due the fact that ANY types are abstract, non-instantiable types. In order to create a valid data connection at least one end of a connection has to be a concrete type, which is then used to typify both the data connection, as well as the ANY port of an FB at runtime.

So in case of connecting an RD of a subscriber (type ANY) with an SD of a publisher (also type ANY) a converter FB has to be introduced to typify both sides of the desired connection. In case of the RD connected to the PRESS FB, the data inputs are already of a concrete type, which is used to typify the RD of the subscriber

Kind regards,
Previous Topic:Problems running FORTE in raspberry pi
Next Topic:How to test a function block in 4DIAC?
Goto Forum:

Current Time: Tue Oct 23 15:39:46 GMT 2018

Powered by FUDForum. Page generated in 0.01912 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top