markrit@hotmail.com Posted October 25, 2015 Report Posted October 25, 2015 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?
Sergei Troizky Posted November 5, 2015 Report Posted November 5, 2015 (edited) I wish it existed. Lack of such is one of the biggest downsides of the tag addressing. Edited November 28, 2015 by Sergei Troizky
Crossbow Posted November 6, 2015 Report Posted November 6, 2015 No indirect addressing, but for that type of thing you should look at using arrays. The array pointer can be any integer variable.
Berti Baker Posted March 12, 2016 Report Posted March 12, 2016 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now