Scan Time of S5

lambles

Member
Join Date
Aug 2003
Location
South Australia
Posts
20
Hi all,
How can I monitor the cycle scan time in a S5 135/928 Siemens PLC. It has something to do with OB152 but I am unsure how to program it to read the statistical values. :unsure:
Anyone have any experience with this ?
(this is so easy in AB ! (y) )

Thanks
 
Last edited:
this is so easy in AB
I know! But if you know how it's also easy in S5, believe me. Now, let's get to business. Right now I'm not at the office for the rest of the week, but if no one comes up with an answer for you, I'll try to give it by monday. It might even be somewhat sooner, if I can find it at home tonight.

So please have some patience.

Kind regards,
 
OK, I'm back in the office, the necessary paperwork has been done and I'm free again to tackle the everyday technical stuff, which I like much better than paperwork ;) .

The problem with OB152 exists only because Siemens wants to do all cycletime statistics with only one function. The first thing to do is tell OB152 which function you want to perform. To do this, just load the function number in accumulator 1 prior to calling OB152. The functions available are:
  • Function 0: switch off statistics
  • Function 1: read actual and last cycletime (actual cycletime gives an incorrect reading)
  • Function 2: reads minimum and maximum cycletime
  • Function 3: read average cycletime and cyclecounter
  • Function 8: initialise the cycletime statistics
  • Function 15: switch on statistics
You can start the statistics for instance in the initialisation OB's like this:
L   KF +15
JU OB 152


Reading the statistical information has to be performed from an FB, because the instruction to exchange accumulators 1 and 2 (TAK) can only be performed in an FB. To extract the actual and the last cycle time use the next sequence:
L   KF +1
JU OB 152
T FW 100
TAK
T FW 102

 
It seems something went wrong, because I was interrupted by a colleague and in this way it took me too long to respond, so I became a guest with an incomplete post. I'm retaking it from the top:


OK, I'm back in the office, the necessary paperwork has been done and I'm free again to tackle the everyday technical stuff, which I like much better than paperwork ;) .

The problem with OB152 exists only because Siemens wants to do all cycletime statistics with only one function. The first thing to do is tell OB152 which function you want to perform. To do this, just load the function number in accumulator 1 prior to calling OB152. The functions available are:
  • Function 0: switch off statistics
  • Function 1: read actual and last cycletime (actual cycletime gives an incorrect reading)
  • Function 2: reads minimum and maximum cycletime
  • Function 3: read average cycletime and cyclecounter
  • Function 8: initialise the cycletime statistics
  • Function 15: switch on statistics
You can start the statistics for instance in the initialisation OB's like this:
L   KF +15       Start statistics
JU OB 152


Reading the statistical information has to be performed from an FB, because the instruction to exchange accumulators 1 and 2 (TAK) can only be performed in an FB. To extract the actual cycle time (from accu 1) and the last cycle time (from accu 2) use the next sequence:
L   KF +1        Read actual + last cycle time
JU OB 152
T FW 100 Save actual cycletime in FW 100
TAK Exchange accu's 1 and 2
T FW 102 Save last cycletime in FW 102



I hope this info helps.

Kind regards,
 
Jean Pierre

This is the sort of info I like to keep (y)

I have had no call to do this yet, but you never know!!!!

Thanks for posting this.

Paul
 

Similar Topics

Hi everyone, I'm trying to simulate any program in control expert and see a register in Modscan32 or any software to do that (Like ModbusPoll). I...
Replies
0
Views
92
I am not sure if this is possible but if there is a way, you guys would be the ones to know. I am currently working on a project where we are...
Replies
7
Views
215
I have a Type C to RS485 adapter connect to my Siemens RWF55. I use modscan to scan it to get a value from the Siemens controller. In the...
Replies
4
Views
96
Hi, I'm new to PLCs and learning about PLC Scan times for Schneider PLCs I've derived the PLC scan time using the free running blocks. The PLC...
Replies
7
Views
647
Hello. Does anyone know the equivalent of the first scan bit in a L32ER compactlogix? Do o need to obtain it via GSV? I’m looking to regain...
Replies
3
Views
445
Back
Top Bottom