I know how to use __VARINFO to obtain the symbol name of a variable or object, but I have a problem with it.
I would like a function block to obtain the symbol name of the variable that was used as input to it.
Obviously, if I use __VARINFO I will only get the local pin name, not the symbol name of the variable that is actually connected to the pin outside of the block.
The same problem occurs when I loop through my EtherCAT nodes using pointers and dereferencing.
Obviously I'm not able to obtain the symbolic name of the node, only the symbolic name of the pointer.
Suggestions anyone? Or is this a dead end?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey, there is no way to know the symbol name from VARINFO. The only way that I know that the system has any access to symbolic naming is through the symbol configurator. But the symbol configurator works more for taking a symbolic name and deriving the VARINFO information from it, not the other way around.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I know how to use __VARINFO to obtain the symbol name of a variable or object, but I have a problem with it.
I would like a function block to obtain the symbol name of the variable that was used as input to it.
Obviously, if I use __VARINFO I will only get the local pin name, not the symbol name of the variable that is actually connected to the pin outside of the block.
The same problem occurs when I loop through my EtherCAT nodes using pointers and dereferencing.
Obviously I'm not able to obtain the symbolic name of the node, only the symbolic name of the pointer.
Suggestions anyone? Or is this a dead end?
Hi Kim, did you ever manage to find a solution to this?
Hey, there is no way to know the symbol name from VARINFO. The only way that I know that the system has any access to symbolic naming is through the symbol configurator. But the symbol configurator works more for taking a symbolic name and deriving the VARINFO information from it, not the other way around.