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,988
Hi, I'm setting up a modbus master on an S7-300. It seems to work in OB1 but not when I use it in OB35. Does anyone have any ideas why? Could...
Replies
10
Views
90
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
322
Hello I have a s7-1200 and I would like to read the tags present in this controller with my controllogix controller. The two controllers don't use...
Replies
5
Views
168
Hi need help why this “failure 5 emergency stop “ appears at every startup in the morning ? Have to shut off main switch at least 10 times on...
Replies
19
Views
319
Back
Top Bottom