Simatic Run-Time Meter

DDV

Member
Join Date
Jul 2006
Location
Stellenbosch
Posts
187
Good day. I’m having trouble with the simatic sfc2 call (run time meter). I call SFC2, SFC3 and SFC4 in an FC. The run meter output shows that it is running when I activate the set bit in SFC3. My problem is the PV value in SFC2, what is its function? And how do I read the end result in a time base that I can pull to a PC based Operator panel running on Protool?



As always your assistance in this regard will be greatly appreciated.
 
The PV parameter for SFC2 allows you to preset the run time meter to a value of your choice.

SFC4 returns an integer containing the number of run time meter hours elapsed.
 
Thank you Simon

Thanks. So I can remove SFC 2 if I don’t want to load a preset value?



Does the meter only update in hours?
 
Hi Simon.

As it utilizes the processor RTC I was hoping for a bit more from the meter. I will now rather just use timers and counters. I want to display the running and standing times of the machine on the panel in hours, min and seconds. I can do it the long way round, I was just hoping for a quicker more streamline application.

But thanks to both of you for your assistance, I appreciate it.
 
SimonGoldsworthy said:
The run time meters count hours. What do you want to do when the count reaches 32767 hours ?
To answer your question:

The meter will probably never reach that, as we do maintenance every 250 hours or so, the meter will be reset then.



If not:

I would use a comparator to read the word, and then probably at 32000 I would reset the meter. I will then add 32000 to the new meter value into a double integer and just read the value into the HMI over 4 bytes.



Well something like that……lol



And yes I will then probably use SFC2 to reset the meter to 0.
 
Just for reference, when the run time goes from 32766 to 32767, then when the next hour elapses the run time stays at 32767 but the return value from SFC4 becomes w#16#8081. You could use this to detect overflow and reset the run time to zero with SFC2.

Which CPU are you using. Will you be using OB35 ?
 
Last edited:
315-2dp. No I did not use OB35, I am yet to see how much time I am losing/gaining because of it…if any.



When I do the actual implementation on the machine program, I will call my Blocks in OB35. For now I want to see what effect it has on my code.
 
DDV - Please find attached the source code for a project that implements 8 run time meters using SFB4, the system block for producting an ON delay. The run times are returned in milliseconds.
 

Similar Topics

Hi Experts, We have a problem here with the Simatic S5 CPU 928B which doesnt go into RUN mode. Machine was not in use for over a year and my...
Replies
21
Views
7,433
Dear All members, I'm now working with Siemens PLC S5-95U. Seriously, this is my first time I'm working with siemens plc product. I'm face...
Replies
10
Views
15,074
HI i would like to know how to get a variable that will store the amount of times a program has been executed. The issue is I have 3 DBs for 1 FB...
Replies
2
Views
71
Dear sir, I am using SIMATIC 300, CPU 315-2DP , (6ES7 315-2AF03-0AB0) VIPA 603-1CC21 A1.0 RAM 32KB, Firmware=V4.0.8 The problem Im using MPI...
Replies
2
Views
162
Hi, I received this SIMATIC S7-300 training kit for maintenance. When I power it up, the PLC doesn't go to RUN mode and the STOP mode led is...
Replies
7
Views
299
Back
Top Bottom