[?]: Initializing Variables Step7 TIA V11 SP1

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
rsappia
Posts: 4
Joined: Sat Aug 20, 2011 6:51 pm

[?]: Initializing Variables Step7 TIA V11 SP1

Post by rsappia »

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...

Image

Image

Uploaded with spamm.us

I am also trying to initialize local variables doing this way:
Image

Uploaded with spamm.us

But it is not working... i find some strange behaviors in the local variables... for sure Im doing wrong here! (thnx)

Please, any suggestion or tip that you could give me will be really appreciated!

Thanks in advance!
dehell
Posts: 104
Joined: Sat Jun 13, 2009 12:25 pm
Location: Europe

Re: [?]: Initializing Variables Step7 TIA V11 SP1

Post by dehell »

Hi,
I think you must use static variable : not Temp variable....
Image
rsappia
Posts: 4
Joined: Sat Aug 20, 2011 6:51 pm

Re: [?]: Initializing Variables Step7 TIA V11 SP1

Post by rsappia »

Hi dehell,
That would be a good idea... but I not getting static variables displayed, in the following picture are the options available...

Image
I think that it must be a mistake in general configurations or something like that... :(
dehell
Posts: 104
Joined: Sat Jun 13, 2009 12:25 pm
Location: Europe

Re: [?]: Initializing Variables Step7 TIA V11 SP1

Post by dehell »

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
sanruku
Posts: 66
Joined: Tue May 12, 2009 9:50 am

Re: [?]: Initializing Variables Step7 TIA V11 SP1

Post by sanruku »

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
van8x10
Posts: 92
Joined: Thu Sep 06, 2007 10:58 am
Location: Vietnam

Re: [?]: Initializing Variables Step7 TIA V11 SP1

Post by van8x10 »

It seems to be the same bug I've met ( http://www.plcforum.uz.ua/viewtopic.php ... 487#p47432 )
rsappia
Posts: 4
Joined: Sat Aug 20, 2011 6:51 pm

Re: [?]: Initializing Variables Step7 TIA V11 SP1

Post by rsappia »

Thanks everybody for your help!
I finally could move ahead thank to you guys...
van8x10 wrote:It seems to be the same bug I've met ( http://www.plcforum.uz.ua/viewtopic.php ... 487#p47432 )
Yeap... I have to use global variables just because local variables were such a pin in the ass...