How to get the first scan bit in step 7?

magm

Member
Join Date
Feb 2005
Posts
13
Hello,
I have some codes executed at the first scan. But I dont't know how to get the first scan bit in step 7. Is there a ready bit like this in step 7?
 
Firts of all, if the bit is somewhere at all, it's never in the software, but in the PLC.

Now, if you're talking S7-300/400 then there's no such bit. Instead you have a block called at startup. Depending on the type of CPU you're using and the type of startup you're trying to detect, you can use OB100/101/102.

If you're talking about S7-200, then you can use SM0.1.

Kind regards,
 
Hello magm;
S7-200: SM0.1 is a first scan bit.
S7-300/400: Place all the logic you want to execute on first scan in OB100, and download to the PLC. OB100 will execute once at startup (more precisely Warm Start, look up OB100/101/102 in the online help), then OB1 will be called cyclically.
Hope this helps,
Daniel Chartier

Edit: Hello Jean-Pierre, you're quick on the trigger this morning!
 
Last edited:
In S7-300/400 you can also use local variables of OB1 to detect first scan. Local data byte 1 "OB1_SCAN_1" has value different from B#16#3 in the first scan after any type of PLC restart, and equal to B#16#3 in normal PLC operation (cyclic scan).
 
dchartier said:
Hello Jean-Pierre, you're quick on the trigger this morning!
Daniel, I think it has someting to do with the time difference at one hand, and the fact that I have no trainees at the moment on the other hand.

It did strike me that there's only one hour difference between our local times. I'ld think it has to be somewhat more.

BTW, there's no hyphen in my name. It's a mistake a lot of people make. The hyphen was intended at my birth, but a civil servant didn't enter it in the register, so now I'm not entitled to one :ROFLMAO:.

Kind regards,
 

Similar Topics

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
444
I want to know how to make a flip flop rung that will change states every scan. This is for a fast sequencer. Is there a special bit similar to a...
Replies
8
Views
2,177
Dear Sir, Can you please tell me how to use the first scan bit, S2:1/15 in RsLogix 500 to Prevents the latch output to be ON when the power...
Replies
22
Views
10,195
hello all, I am trying to set up a latch bit like this S:FS----- true condition------OTL. I tried in rs emulator and it the bit latches but in...
Replies
13
Views
1,827
Do we have to enable the first scan bit somewhere in compact logix? For some reason my S:FS is not working? Also, if you want to have the CPU...
Replies
13
Views
6,763
Back
Top Bottom