S7 300, Set flag for 1 program cycle

Hi Ro66an

This questions seems a bit too general purpose which might not attract the best answers. Here are three ideas -

For example you could set the flag true as the very first instruction in OB1 and then reset it as the very last instruction in OB1. That would have the desired effect. You decide what the logic conditions for these two events are to be.

Alternatively there is the built-in one-shot instruction which could be triggered anywhere.

If you want a first-scan signal (rather than an any scan signal) the usual convention in S7 is to use one of the start-up OBs (say OB100), set the flag true there, and then reset it as the last instruction in OB1 once the first scan has completed.

Regards

Ken
 
If you are looking for a bit that is on for one scan and off the next, on the next, etc. Use this.

an F 0.0
= F 0.0
 
Thanks alot for your replies!

I am looking for a flag that works as a trigger signal (not a pulse). I will look into how OB100 work. Thanks for the tip!
 
Try OB1

The following table describes the temporary variables for OB1. The variable names are the default names of OB1.

OB1_SCAN_1 BYTE

B#16#01: completion of a warm restart
B#16#02: completion of a hot restart
B#16#03: completion of the main cycle
B#16#04: completion of a cold restart
B#16#05: first OB1 cycle of the new master CPU after master-reserve switchover and STOP of the previous master

Hope this helps.
Regards Brian
 

Similar Topics

Hi I am running a CCW application to control a K300 servo drive. Most of it works with the exception of being able to change the motor direction...
Replies
1
Views
1,628
hello Friend There is one old system with S7 300 CPU which is password protected and I dont know the password. Now I want to remove the password...
Replies
6
Views
5,938
Dear All, i want to know how we Date and Time set and Change from HMI MP277 use Wincc Flexible.PLC is S7 300 CPU 315 2-DP.i use SFC0,SFC1 but...
Replies
4
Views
5,727
Hi all, Right now I am on Commisioning in Vietnam and I need urgent help with resetting PLC password. I have got safety PLC S7 300, CPU 315F-2...
Replies
12
Views
41,311
hi,i want to set timer from simatic hmi of siemens for s7-300 in hr min sec format for my project.how can i achieve this?pls help me
Replies
2
Views
2,165
Back
Top Bottom