Hi!
Im working with Step7 TIA V11 SP1 using a 1214c...
Could someone please tell how should I proceed in order to initialize a local variable??
I have spent lot of time trying to do so but seems like Im not realizing how to do so...
The closest I get to solve this problem is shown in the pictures below. When I try to set up the initial condition the field is not active...
Uploaded with spamm.us
I am also trying to initialize local variables doing this way:
Uploaded with spamm.us
But it is not working... i find some strange behaviors in the local variables... for sure Im doing wrong here!
Please, any suggestion or tip that you could give me will be really appreciated!
Thanks in advance!
[?]: Initializing Variables Step7 TIA V11 SP1
-
- Posts: 104
- Joined: Sat Jun 13, 2009 12:25 pm
- Location: Europe
-
- Posts: 4
- Joined: Sat Aug 20, 2011 6:51 pm
-
- Posts: 104
- Joined: Sat Jun 13, 2009 12:25 pm
- Location: Europe
Re: [?]: Initializing Variables Step7 TIA V11 SP1
Hi,
FB block have static variable.
FC block don't have static variable.
All temp variable in FC stay alive only during FC is called..
Best regard
FB block have static variable.
FC block don't have static variable.
All temp variable in FC stay alive only during FC is called..
Best regard
-
- Posts: 66
- Joined: Tue May 12, 2009 9:50 am
Re: [?]: Initializing Variables Step7 TIA V11 SP1
That is correct.
FB has memory. Therefore FB has static & temp variables.
FC doesn't have memory. Therefore FC has only temp variables.
You can initialize anything when FB/FC is called (no point doing that for Static).
Local memory is shared among blocks with the same priority.
e.g. OB1 shares local memory stack with any block OB1 is calling.
OB35 runs in different priority. Therefore different temp memory stack. Therefore any block called by OB 35 is using OB35 local memory stack.
HTH
FB has memory. Therefore FB has static & temp variables.
FC doesn't have memory. Therefore FC has only temp variables.
You can initialize anything when FB/FC is called (no point doing that for Static).
Local memory is shared among blocks with the same priority.
e.g. OB1 shares local memory stack with any block OB1 is calling.
OB35 runs in different priority. Therefore different temp memory stack. Therefore any block called by OB 35 is using OB35 local memory stack.
HTH
-
- Posts: 92
- Joined: Thu Sep 06, 2007 10:58 am
- Location: Vietnam
Re: [?]: Initializing Variables Step7 TIA V11 SP1
It seems to be the same bug I've met ( http://www.plcforum.uz.ua/viewtopic.php ... 487#p47432 )
-
- Posts: 4
- Joined: Sat Aug 20, 2011 6:51 pm
Re: [?]: Initializing Variables Step7 TIA V11 SP1
Thanks everybody for your help!
I finally could move ahead thank to you guys...
I finally could move ahead thank to you guys...
Yeap... I have to use global variables just because local variables were such a pin in the ass...van8x10 wrote:It seems to be the same bug I've met ( http://www.plcforum.uz.ua/viewtopic.php ... 487#p47432 )