Get/set values from/to local variables

Hello,
I have got two programs, ProgA and ProgB. ProgA contains two local variables iValueA1 and iValueA2. ProgB contains two local variables iValueB1 and iValueB2. I want to exchange values between the two programs. For example iValueA1 should read the value from variable iValueB1 and iValueB2 should read value from iValueA2. Is there a way how to get/set values via function blocks? I don’t want to use global variables. Thank you

ITL_FTP_FileCopy.jpg

Hello Vaclav,
if you do not want to use global variables then you can create ports in both programs and connect them.

Hello Stefan,
yes, that is exactly what I needed. Using IN and OUT ports and mapping them in the GDS Port list because I use the structured text.
Thank you
Vaclav