Sign in to follow this  
Followers 0
Stuart_Wales

Siemens Timer Help..

6 posts in this topic

We're newbies to Siemens due to being a 90% Mitsubishi plant...

T130 below, we believe, is set to 0ms. Then set via 'TV' under the DB105.DBW260 address.

1. What is the 'S5TH#' infront of the 0ms

2. When we go to change the value to 300 seconds, as suggested by machine builder, it allows us a max input of 9 seconds? Anyone know why?

3. Has anyone got a quick reference/link to timers in simatic/S7 for us?

Thanks in advance.

20170327_134743.thumb.jpg.51d53a92426d3d

Share this post


Link to post
Share on other sites

Hello Stuart,

The S5T# means the usage of time old format of Step5, as the time indicated in ms, this will limit your max, you can write the time format in S5T#0S format means in second instead of ms this will increase your max. otherwise you can use other new functions of timers.

anyhow the good thing about Step7 that you can select any block like the T130 and click "F1" on your keyboard, this shall open the help and inside you can see information about all input and outputs of that block with all possible formats, plus brief description of its function and one or two example to understand how it works.

Have fun

Omar

1 person likes this

Share this post


Link to post
Share on other sites

You have other time bases available as well.  Instead of 300s, you can use "5m" for 5 minutes.  If you hit "F1" on the timer instruction, there will be a link to "Location of a Timer in Memory and Components of a Timer".  That article will explain the structure and syntax of the time base.  That article then has alink to S5TIME datatype that unpacks the bytes and bits in case you have to build it from scratch at run time.

You can also open up the standard library and look under System Function Blocks for SFB4 and SFB5 which are on and off delay timer blocks.  They operate as any other FB, so you need an instance DB for each call.  Those instances can be inside another DB if you want.

1 person likes this

Share this post


Link to post
Share on other sites

Thank you both!

Next question (haha!!). I've had a bash at de-coding the instruction below. Am I close or way off:

A             T              140                         ;AND Timer 140

FP           M            6.4                          ;Load 6.4minutes into the timer (I think)

JC            M001                                     ;Jump condition to M001 (I think)

JU           M002                                     ;Jump up to M002 (I think)

M001:    L              DB100.DBW        40           ;Load DB100.DBW (which is our real time temperature)

                L              10                                           ;Load a constant of 10

                +I                                                            ;Add the two above integers (this is the real time temp + 10 degrees)

                T              MW       120                         ;Transfer into MW 120

M002:   NOP       0                                              ;Jump to here if M002 is ON

 

In a nutshell, we're looping the M001 function, and I'm assuming to get out of it, M001 needs to go OFF and M002 ON (I haven't monitored this far into it yet...)

20170328_075242.thumb.jpg.135a2af260ba7c

Share this post


Link to post
Share on other sites

I don't know off hand what the "FP" instruction is and I closed down that virtual machine to work on something else, but that doesn't look right.

If you make a simple ladder logic network with the timer instruction configured the way you want, you can convert the network to STL to translate that portion.  I think it's on the "view" menu, or you can hit CTL-1, CTL-2, and CTL-3 to change languages between LAD, FBD, and STL. 

Looping, you're going to have to play with because I try not to do that if I can avoid it because I really don't enjoy troubleshooting/debugging in STL, or getting phone calls at 2AM because a maintenance guy gets lost in the code.

Edited by Joe E.

Share this post


Link to post
Share on other sites

Worked it out now lads. The JC is a condition jump of the M6.4 (so only jump if HIGH or '1') then the JU is an unconditional jump which will jump the scan regardless of polarity of bit.
 

The F1 function is brilliant, so thanks for that tip both!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0