another doubt regarding simatic S7

sayahan2003

Member
Join Date
Jun 2006
Location
Calgary
Posts
185
Dear friends
I have another doubt in simatic S7.As you know, when we define A function or function block, sometimes we define some Input or output in Variable table.So, Would you please tell me the difference between these I/O and the I/O that we define in symbol table. Supose we define I0.0 in variable table and I0.0 in symbol table.So, what is the difference?
 
What do you mean by "variable table" ? Is it a VAT ? If so, VATs are used for diagnostic purposes (monitoring and forcing of variables). You do not define variables there.
The symbol table is a place where variables' names are stored. You can also define variable name there.
 
I mean variable decleration table.
With this table we define in,out,inout and temp for a function or function block.
jacekd said:
What do you mean by "variable table" ? Is it a VAT ? If so, VATs are used for diagnostic purposes (monitoring and forcing of variables). You do not define variables there.
The symbol table is a place where variables' names are stored. You can also define variable name there.
 
sayahan2003 said:
Dear friends
I have another doubt in simatic S7.As you know, when we define A function or function block, sometimes we define some Input or output in Variable table.So, Would you please tell me the difference between these I/O and the I/O that we define in symbol table. Supose we define I0.0 in variable table and I0.0 in symbol table.So, what is the difference?
Difference is in a scope of variables. When you define variable in the symbol table this mean you define an alias name for I0.0, for example. And this variable is global - you can use this symbol at any place of your program. This is the main difference. Because you can use variable declared in FC or FB only within this function or when your program calls it. If you create, for example, variable LimSwitch as a boolean input parameter in FC10, you cann't address it from OB1 as FC10.LimSwitch. But you can access it when you call FC10 (LimSwitch :=I2.0) or within FC10.
 
This is so-called FC/FB interface, which means these variables can only be used locally in the FC/FB code it belongs to but you have to assign to them (ie. in/out) actual variables at call.
 
That's only true for FC's of course. The variables of types IN, OUT, INOUT and STAT can be accessed anywhere for FB's via the instance DB.

For FC's and FB's of course the IN, OUT and INOUTs are normally real I/O or memory falgs anyway and these can be used anywhere.

Lets not forget the reason for these parameters. FB's and FC's can be used as sub-routines for repeated code, for conveyors for example. Then the same piece of software is called many times for different hardware control, the IN, OUT and INOUTs personalise the sub-routine to the particular hardware its controlling.

If its not a sub routine and you have no I/O or STAT parameters then a FC's should be used.
 
Thank for reply.but i have ather question.suppse in symbol table we define I0.0(it means byte 0,bit 0).and we define I0.0 in a FB or FC.it also means byte 0,bit 0.so in memory, this 0.0 is for which?

PeterW said:
That's only true for FC's of course. The variables of types IN, OUT, INOUT and STAT can be accessed anywhere for FB's via the instance DB.

For FC's and FB's of course the IN, OUT and INOUTs are normally real I/O or memory falgs anyway and these can be used anywhere.

Lets not forget the reason for these parameters. FB's and FC's can be used as sub-routines for repeated code, for conveyors for example. Then the same piece of software is called many times for different hardware control, the IN, OUT and INOUTs personalise the sub-routine to the particular hardware its controlling.

If its not a sub routine and you have no I/O or STAT parameters then a FC's should be used.
 
Its actually the same thing if both are I 0.0.

Example, in the symbol table you give I 3.0 a name, its a motor overload and it belong to the third motor, so you cal it M3_OL.

You then program a sub routine that will handle motors and you will call it once for every motor. One of the IN parameters you give the Symbol Overload.

When you call the block for Motor 3, you assign I 3.0 to the IN parameter Overload.

At the point where you call the subroutine you would see (if symbol view selected).

-M3_OL -+ Overload

Internally in the sub routine you will see things like

A #Overload

In this case it will equal -M3_OL (I 3.0) for other subroutine calls it will be whatever input you have assigned to the parameter Overload.
 
Dear Peter
Thank you so much again and again.

PeterW said:
Its actually the same thing if both are I 0.0.

Example, in the symbol table you give I 3.0 a name, its a motor overload and it belong to the third motor, so you cal it M3_OL.

You then program a sub routine that will handle motors and you will call it once for every motor. One of the IN parameters you give the Symbol Overload.

When you call the block for Motor 3, you assign I 3.0 to the IN parameter Overload.

At the point where you call the subroutine you would see (if symbol view selected).

-M3_OL -+ Overload

Internally in the sub routine you will see things like

A #Overload

In this case it will equal -M3_OL (I 3.0) for other subroutine calls it will be whatever input you have assigned to the parameter Overload.
 

Similar Topics

Hi, The hardware is: Click Plc model # CO-O1DD1-O HMI model # S3ML-R magnetic-inductive flow meter model # FMM100-1001. I will set the flow meter...
Replies
4
Views
132
So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
427
Hello I need to message read the entire 16 channel raw analog inputs from a 1769-L33ER Compact Logic controller to another 1769-L33ER Compact...
Replies
8
Views
243
I am noticing a problem where i am using MOV instruction and writing literal text into source and String datatype in destination. It works fines...
Replies
6
Views
486
I'm not actually in front of the equipment yet, but this is the information that I have been given by a client: ------------ Data from HART...
Replies
2
Views
336
Back
Top Bottom