RealIO and ControlConnection Via IAC Communication
Voted best answer
Hello,
RealIO & Control connection uses structured data types, Since for IAC to work both source & destination application/program/diagram communciation variables should be case sensitive .
Always ensure communication variable can be either an elementary type or a structured data type. It cannot be a generic or built-in type.
If the direction of a communication variable is in in a POU, the POU can read the variable, but cannot write to the variable. If the direction of a communication variable is out in a POU, the POU can write to the variable and read the variable.
Example for REALIO:
1.Declare a local Variable ex:"A" RealIO then Declare one more communication variable as "a" of data type REAL as OUT direction
then use simple code as a:=A.value
& declare "A" as local variable in other application/program/diagram as REALIO & declare as one more communication variable as"a" as IN direction so now you can map as A.value:=a; here you can map you range, units etc by using dot parameters.
IF you go by this method cylic load on the controller will be minimum but still don't use more real variables in the IAC
2.You can declare the communication variable as REALIO ex:"a" as OUT direction in source application/program/diagrams & declare the communication variable as "a" of type REALIO & as IN Direction (case senstive) in other application/program/diagram (destination) also
But Note that this will put a load on the controller don't use built in/generic datatypes in communication variables for IAC.
Example for Controlconnection:
1. Declare a local Variable ex:"A" with datatype as CONTROLCONNECTION then Declare one more communication variable as "a" as OUT direction of type "REAL"
then use a simple code as a:=A.forward.value
& declare "A" in other application/program/diagram as CONTROLCONNECTION & declare one more communication variable as"a" as IN direction (Communication variables are case senstive) of data type "REAL", so now you can map as A.forward.value:=a; here you can map you range, units etc by using dot parameters.
IF you go by this method cylic load on the controller will be minimum but still don't use more real variables in the IAC
2.You can declare the communication variable as CONTROLCONNECTION ex:"a" as OUT Direction in source application/program/diagrams & declare the communication variable as "a" as Controlconnection as IN direction (case senstive) in other application/program/diagram (destination) also
But Note that this will put a load on the controller don't use generic/builtin datatypes in communication variables for IAC.
Please refer more in page no 86 onwards for more rules
Answers
RealIO is a structure datatype and can be transferred fairly easily. You only need to read the complete Real IO datatype from the source into the destination.
With a ControlConnection datatype there are two parts ... Forward and Backward. You need two communications, one in each direction for these two parts. The forward part sends information forward between each control module, and the Backaward part is used for backtracking between control modules.
While it is quite possible to transfer ControlConnection datatypes across an MMS or IAC link between applications and controllers, you should be very carefull that "strange" things with code sorting and backtracking do not break your application Or cause unexpected problems with execution order. ControlConnections are strongly integrated with code sorting - and you obviously cannot code sort when the control modules are in different apllications or controllers. For this reason I would recommend you avoid transferring control connections. Instead you can use a CCtoReal or RealtoCC block to convert the value into a simple datatype and transfer that.
Add new comment