Communication variables between Applications in same controller (AC800M)
I would like to use communication variables between Applications (Application_1 and Application_2) within the same project and same controller.
Should the communication variable (e.g. "MyVar") be defined both as an "in" parameter in Application_1 and an "out" parameter in Application_2?
Or should the parameter be declared in one of the Applications (e.g. Application_1) and then addressed to as for example "Application_1.Diagram1.MyVar" when used in Application_2?
Is there something else that is needed for communicating the variable between Applications?
Thanks in advance
Voted best answer
If you are sending from Application_1 to application 2:
We are declaring the same variable in both application under communication variables in a single control module/Diagram:
Same name is important!!
The variable must be declared in the source POU Communication Variables list with "Out" direction, and in any other POUs, wherever it is read, with "In" direction. For example, if you create a variable as an output from a function block in a program (program A) and want to use it in another program (program B) that resides in another application, you should declare that variable both in program A Communication Variables as "Out", and in program B Communication Variables as "In".
Please see 3BSE041880-511 (AC 800M Getting Started) manual. You will find a sample project in Section 3 that also utilizes communciation variables.
if it is from Application_1 to Application_2 then
1. Var direction in Application_1 should be "OUT"
2. Var direction in Application_2 should be "IN"
if it is from Application_2 to Application_1 then
1. Var direction in Application_2 should be "OUT"
2. Var direction in Application_1 should be "IN"