simatic s7

apetkov5

Member
Join Date
Aug 2007
Location
x
Posts
101
Hello!

I have 2 questions.

Please can you give me example how to count working hours of connected device (when output is in high level), and when is counted 10 hours plc must turn off that device (that Qx.x is reseted) and turn on second device (other Ix.x is seted).

Second questions is how do i set up time-of-day interrupt.
The goal is to get one Mx.x (bite) high every 24 hours, and after 10 minutes get it low (turn off).

Please be detailed because of my low knowledge.

Thanx

btw. i am using siemens 314
 
For the 1st question:
There are several ways. I am assuming you need to count the time when the device is running and keep the time value when it is standby.
One way is to use the FC80 TONR from the TI-S7 library.
It is a retentive timer that counts milliseconds with a TIME or DINT (dont remember which one actually). This is more than enough for 10 hours.
If you dont have to worry about running/standby, then a normal IEC timer will do.

For the 2nd question:
It is fairly simply.
In the CPU properties Time-of-day interrupts tab, you set when the timed interrupt shall execute.
You then add OB10 with the code to set the bit.
In OB1 (or a called block) you add a timer to reset the bit.
 
JesperMP said:
For the 1st question:
For the 2nd question:
It is fairly simply.
In the CPU properties Time-of-day interrupts tab, you set when the timed interrupt shall execute.
You then add OB10 with the code to set the bit.
In OB1 (or a called block) you add a timer to reset the bit.

I set tod in properties...
In OB10 i put simple AND logic door... the imputs in & are high mostly, except during error, and the bite that i am setting are just behind that door....
in ordinary way that memory bit too is in high.

Will that bit gone in low when scan of OB10 is complete or it will stay high?

I nead situation where that bit plc set high just once during a day... next that bit (rising edge) setting timer in FB15 and FB18, and timers (S_PEXT) giving output high at Qx.x during specified time. After that time Qx.x going to low and memory bit too staying in low for next 24 hours.

Can i do that on that way?

btw. Jesper many thanxes, you are the best!
 

Similar Topics

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
77
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
163
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
I'm trying to build my Classic Step 7 programming skills this weekend. I get stuck on little things that are not covered in YouTube tutorials. I'm...
Replies
7
Views
316
I am utilizing both HMI and SCADA for my project. Both HMI and SCADA have identical tags. When I modify the tag value on HMI, it is reflected in...
Replies
2
Views
148
Back
Top Bottom