Kkula
Browse Questions » STEP 7 / STEP 7 Lite: Symbols Originating From Symbol Table

About User

Questions Asked: 37.9K

Answers Given: 32

0
  • Open

STEP 7 / STEP 7 Lite: Symbols Originating From Symbol Table

I think I am going crazy....I have added all of my PLC physical i/o to my Symbol Table, I have created a FB to handle my analog scaling control and need to access the symbols in the symbol table - but they are not showing up in the editor. I am getting information from all of the Data Blocks.
Can someone tell me what I am missing?
-J

0 Likes 0 Favourites 0 Followers 0 Comments
Answers(1)

Accessing Symbol Table Variables in FB Editor

You're not going crazy! Accessing symbols from the Symbol Table within a Function Block (FB) requires a specific step. By default, the FB editor doesn't automatically inherit symbols from the Symbol Table.

You need to explicitly declare the symbols from the Symbol Table as inputs or static variables within your FB.

Here's how:

  1. In your FB's interface (the VAR_INPUT, VAR_OUTPUT, or VAR_STATIC section), declare variables with the same name and data type as those defined in your Symbol Table.
  2. Assign the Symbol Table address to these variables using the %I (for inputs), %Q (for outputs), or %M (for memory) addressing.

Example: If you have an analog input defined in the Symbol Table as "AnalogInput1" with address "%I0.0", you would declare it in your FB like this:

VAR_INPUT
  AnalogInput1 : REAL;  // Address assigned in the FB's properties or via configuration
END_VAR

Important Note: Data Blocks are always directly accessible, hence why you can see their symbols. The Symbol Table requires explicit declaration within the FB's scope.

For further details, please refer to the Siemens documentation on Symbolic Addressing and Symbol Table and Function Blocks (FB) in STEP 7.

0