I have a string variable that contains the name of an external variable. How can I use the value of that string to get the proper value from the external?
The pseudocode of what I'd like to do is here
so basically I'd like to find a way to assign the proper value to
PROGRAM someProgram VAR someString : STRING; someWord : WORD; END_VAR VAR EXTERNAL someExternalA : WORD; someExternalB : WORD; END_VAR someString := 'someExternalA'; someWord := SOMEGET(IN := someString); //GET THE VALUE OF someExternalA someString := 'someExternalB'; someWord := SOMEGET(IN := someString); //GET THE VALUE OF someExternalB END_PROGRAM
based on the content of
using a method
(or something similar).
SOMEGET(IN := someString);