[?]: 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 ...
Post Reply
rsappia
Posts: 4
Joined: Sat Aug 20, 2011 6:51 pm

[?]: Initializing Variables Step7 TIA V11 SP1

Post by rsappia » Sat Aug 20, 2011 7:11 pm

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 » Sun Aug 21, 2011 11:37 am

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 » Sun Aug 21, 2011 1:55 pm

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 » Sun Aug 21, 2011 6:09 pm

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 » Mon Aug 22, 2011 11:12 am

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 » Tue Aug 23, 2011 2:25 pm

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 » Tue Aug 23, 2011 2:30 pm

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

Post Reply