[?]: Create equal to SV timer

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
Scarch
Posts: 103
Joined: Fri Aug 31, 2007 8:17 pm
Location: Europe

[?]: Create equal to SV timer

Post by Scarch »

I need to use about 750 SV timers, how can I simulate them? No way with IEC timers or sfc blocks, some idea? Only SV is valid for my application
Moving
Posts: 1
Joined: Mon Mar 29, 2010 6:10 am

Re: [?]: Create equal to SV timer

Post by Moving »

Code: Select all

      U     #i                          // bool start timer 
      FP    #ib                         // buffer static or in out (bool ) 
      SPBN  weit
      L     #v                          // value for timer 
      T     #c                          // timer 
weit: L     #c
      L     1                           // timer = timer - 1 call in time constant ob 
      -I    
      T     #c

      L     #c                          // if timer not run out then timer output = 1
      L     0
      <=I   
      SPBN  wei2
      L     0
      T     #c
      SET   
      =     #r                          // r = result 
      SPA   sege
      CLR   
      =     #r
sege: NOP   0
Should be working ;)
sventek
Posts: 56
Joined: Sun Jul 13, 2008 10:48 am
Location: Europe

Re: [?]: Create equal to SV timer

Post by sventek »

Hi!

Why can't you use the IEC funktion SFB3 "TP"? It should work.

sventek
Scarch
Posts: 103
Joined: Fri Aug 31, 2007 8:17 pm
Location: Europe

Re: [?]: Create equal to SV timer

Post by Scarch »

Thanks but... Moving, I do not have very clear the type of the temporal fields (in, out, temp, etc) and wei2 jump is not defined. Sventek, I have downloaded the SFB3 it is a timer but dont know how to use it as a SV timer....please help
sventek
Posts: 56
Joined: Sun Jul 13, 2008 10:48 am
Location: Europe

Re: [?]: Create equal to SV timer

Post by sventek »

Hi search!

When the SFB 3 is in the Simatic Manager, mark the block and press F1 for help. Everything you need is in there. I'm sure you can use it for a SV timer.

regards
sventek
Scarch
Posts: 103
Joined: Fri Aug 31, 2007 8:17 pm
Location: Europe

Re: [?]: Create equal to SV timer

Post by Scarch »

Hi,
No, definitely is not possible to use it as SV. The SV restarts everytime the input changes from 0 to 1, but this one keeps running until the time has expired and then goes to zero even if the input is 1.
Thanks anyway
sventek
Posts: 56
Joined: Sun Jul 13, 2008 10:48 am
Location: Europe

Re: [?]: Create equal to SV timer

Post by sventek »

Hi search!

Ok, you'r right. But i made a small programm to simulate a sv timer. Please download, unpack and call the FB1 as shown in OB1. I've tested and it seems to work. :wink:


http://plcforum.uz.ua//Test_sv.zip

regards
sventek
Scarch
Posts: 103
Joined: Fri Aug 31, 2007 8:17 pm
Location: Europe

Re: [?]: Create equal to SV timer

Post by Scarch »

Hi sventek,
Thank you very much it works very well... I didn't know it was possible to include TON timers in the temporal variables :shock:

Thanks again :)