Siemens PLC 1st scan Coil and Time..

stevenPLC

Member
Join Date
Sep 2004
Posts
27
Hi,

Can any of Siemens PLC expert please tell me;

1) Can we ever detect the first scan of the Siemen PLC whenever it RUN (either due to power shutdown and recover back, or PLC is started for the first time)? It's because I would like to initialize some value into certain registers whenever the PLC is started.

2) Where (any special FB or Register) and how can we monitor and read the PLC Time and Date?


Thanks for the info..
 
1) Yes. Set a bit in the startup block, evaluate it in OB1, and reset it in OB1. You could also evaluate the OB1_SCAN_1 variable in the temp data of OB1, but I find it easier to just set a bit.

2) Do a search on this site. There are plenty of examples and sample code describing how to access the system clock.
 
Hello StevenPLC;

Just to make S7Guy's statement, what he calls the startup block is OB100/OB101. Siemens calls them Cold restart/Warm restart 9look up the Step7 help files to find the different situations that request each one).
Whatever is programmed in the OB100/101 will be executed once, at startup, before OB1 is called cyclically. It is a great place to initialize variables at the beginning of a program, for example.
Hope this helps,
Daniel Chartier
 
Just to expand on Daniel's comment about the Help files, since if you're that new to Siemens you may not know it. In Simatic Manager (or the editors too), if you highlight a Block (or a command in the editors) and press the F1 key, you'll call up the Help file for that Block or command. While the Siemens documentation can be a bit difficult to work through, the Help files on specific items are pretty good.
 

Similar Topics

Hi everyone, I want to upload the program from my CPU317TF-2 DP to my PC via connecting to CP 343-1 Advanced since it has LAN ports and the CPU...
Replies
1
Views
117
Buona sera, Ho dei problemi nell' interfacciare PLC S5 con HMI 2a Gen. Siemens (ad esempio KTP400) tramite IBH Link S5++. il mio obbiettivo è solo...
Replies
0
Views
56
Hey when I turn on my Siemens PLC CPU 216-2 after runing 10 minute it's stop and showing SF indication after I turn off and some time later turn...
Replies
0
Views
90
Hi Guys, I am trying to establish communication over profinet between Siemens S7-1200 PLC as IO device and codesys plc as IO controller. But I am...
Replies
39
Views
2,049
Hi there! This is something so old and having machine with it....... Last time unit was powered around 3yr ago and it did not work since than...
Replies
5
Views
186
Back
Top Bottom