markrit@hotmail.com

Indirect addressing of tags?

4 posts in this topic

Is anyone aware of a method (ST, FB, LD, etc) of using a string from an external file, DB, etc. to retrieve the value of an internal or global variable tag. For example if I have a tag called Pointer of type = String and the value of ‘Cyc_Count’ is there a method to retrieve the value of the tag called Cyc_Count’ of type Integer using the value in tag Pointer?

Share this post


Link to post
Share on other sites
I wish it existed. Lack of such is one of the biggest downsides of the tag addressing. Edited by Sergei Troizky

Share this post


Link to post
Share on other sites
No indirect addressing, but for that type of thing you should look at using arrays. The array pointer can be any integer variable.

Share this post


Link to post
Share on other sites

Pointers are powerful, but potentially deadly.  Just look at the quantity of Windows Security Updates protecting heap trampling of rouge pointers!  That's why IEC language doesn't include pointers to help create stable code.  Like Crossbow, in my experience you can usually create an array (or array of structures) and 'step' through them with an index. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now