Sign in to follow this  
Followers 0
ct8356

How to access program symbol table from function block?

8 posts in this topic

Let me set the scene. I am inside my function block. I would like move an internal integer into an integer that belongs to my program symbol table. I would like to do it inside the function block, so that the function block is self contained. i.e. it does not need any extra inputs/outputs in the function block call. Is this possible? If I was writing this in Object Oriented code, I would just write this within my method: myGlobalVariable = myLocalInteger; and that would be that...

Share this post


Link to post
Share on other sites
Did you try to move an internal variable into external variable? Edited by Sergei Troizky

Share this post


Link to post
Share on other sites
I did. I created a variable in the global symbol table, and in the program symbol table, but I could not see either of them from inside the function block (I tried inserting an external variable, and the classic ones like P_On showed up, but not the variable I created). Is there a step that I am missing? Edited by ct8356

Share this post


Link to post
Share on other sites
Attached I wrote a small guide. I guess you can figure out the rest yourself. Note that by using indirect adressing, you can quite easily access the complete memory area by specifying just 1 AT address base 0. AT adressing inside an FB.pdf
1 person likes this

Share this post


Link to post
Share on other sites
Good to see you back Pim - changed your job? I am still so NOT into FBs! LOL Edited by BobB

Share this post


Link to post
Share on other sites
Hi Bob, yes I am back at my old employer.. now teamleader for the software engineers. With the number of engineers (now 9), rate of projects and ever evolving systems we cannot live without... we are even looking into generating the I/O symbols for the FB from the electrical diagrams. But I guess we all have our pros and cons. Still busy as ever Bob?

Share this post


Link to post
Share on other sites
You bet Pim - stupidly so.

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
Sign in to follow this  
Followers 0