Siemens 317T PLC power off/on

As far as I know, the 300 PLCs treat a power cycle and Stop->Run transition the same in the program. I'm not sure how it would look in the diagnostic buffer.

However, you could potentially look at the behavior of the devices external to the PLC. Something like a managed Ethernet switch will usually have a longer boot up time than the PLC will. If they are controlled by the same circuit and the PLC is plugged directly into the switch, you could do a test in OB100 to see if the port on the PLC is active or not.

In a run->stop->Run transition, the ethernet connection will never be lost.

In a power cycle, the port might still be waiting for the partner to come online.

You'd have to test the power on behavior of your system to see which components to monitor for your test.
 
The cyclic overrun of encoders on the system is lost when the power to the CPU is lost. Therefore I want run a routine only when the power is lost and regained
 
Look in the tempstack of OB100

I think the variable #OB100_STRTUP is what you looking for

Code:
// Check if startup from power failure
      L     #OB100_STRTUP
      L     B#16#82
      ==I   
      =     StartupFromPowerFailure
Other possible values·
B#16#81:Manual warm restart·Switch/Pg
B#16#82:Automatic warm restart. Power failure
B#16#83:Request for manual hot restart
B#16#84:Request for automatic hot restart
B#16#85:Request for manual cold restart
B#16#86:Request for automatic cold restart
 
Sounds very promising.

You don't know by any chance if the bit is set even if the plc is: put into stop, powered down, powered up, put into start?

I don't have a plc to hand for testing right now

Thanks
 
Its in ob100 and its a byte not a bit. OB100 is only executed once just before the PLC goes into run after power on.

I have used this in the passed to check if the run/stop switch was used to trigger the stop and that worked out fine.
 

Similar Topics

G
I just ordered a 317T processor using 611U servo's. Has anyone out there used this??
Replies
11
Views
2,979
Good morning fellow sea captains and wizards, I am being asked to do the above and obtain 4 values from each slave, I know about the MRX and MWX...
Replies
20
Views
199
Hi everyone, I am an omron plc tec , lately I came across a siemens s7 200 cn plc . Can someone help me regarding the software required and...
Replies
26
Views
460
This is the first time I am working with Simatic Manager Step7 as I started my siemens journey with TIA which is pretty easy and do a lot of stuff...
Replies
3
Views
115
Hi, I have PLC S7-1200 and switch XC-208 and Iam trying to implement this SNMP library: SIOS I am not sure, what I am doing wrong, but there is...
Replies
3
Views
121
Back
Top Bottom