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

Hello, I have an issue where I want to simulate an Siemens HMI panel, through NAT connection to a PLC. I have the possibility through extended...
Replies
1
Views
47
HI everyone, i am new to Siemens plc programming and i am in need of some help. yesterday we had an S7-1200 CPU 1214C fail to turn on an output to...
Replies
12
Views
475
Hello, good morning, I have been having two problems with the Tia Portal software. The first is that I have installed it on my computer and...
Replies
5
Views
212
The past week we received a new piece of equipment from Germany which utilizes siemens controls. Typically in our company we use A.B. controls for...
Replies
12
Views
369
i have two plc 1. s7-1212dc/dc/dc ip; 192.168.0.1 2. s7-1500 1513-1pn ip; 192.168.3.2 i need to get data from plc1 to plc2. any idea how to do...
Replies
5
Views
182
Back
Top Bottom