Heatbeat State-Logic Method

advertisement
Brent suggested I try diagramming the Logic States of my Transpower Real World Problem so this is my attempt.
Description of States followed by Diagram. I have only listed inputs from real world not logic. Timings as I have
programmed rather than the specs. NB – this is only looking at the Output states and what affects them.
Description of States
(SO) – State 0 – Initialisation
System Starts up. A delay of 5secs is set to allow time for bootup and IEDs to come online. System now ready.
Transition to S1.
Inputs = I0.0 – Start
Outputs = M0 – System Ready
(S1) State 1 – Send SOE Heartbeat
A heartbeat output is sent out to the master device (an SMS) ad infinitum ending only with a powercycle. State
should change between 0 and 1 every second. Transition to S2.
Inputs =
Outputs = Q0.0 – SOE Heartbeat
(S2) State 2 – Convert Incomer Heatbeat from a DO to a DI
Listen for DO Heartbeat returning from Master. When received convert to a DI. Transition to S3
Inputs = I0.3 – SMS DO
Outputs = M10 – SMS DI
(S3) State 3 – Monitor and action DI Heartbeats (converted previous stage)
Each heartbeat Sets and Reset either SMS Beat 1 and SMS Beat 2 so they are always alternating with the count.
Count the heartbeats – reset at 2.
Inputs =
Outputs = M1 - SMS Beat 1
= M2 – SMS Beat 2
(S4) State 4 – If Incoming Heartbeats time out – send COS alarm
If the next heartbeat isn’t received within 5secs then send out a COS alarm to Master.
Inputs =
Outputs = M4 – Send COS
= M5 – COS send
= Q0.1 – SOE Fail Point Alarm
See Diagram on following page
Diagram – Outputs only in Circles
S0 – Initialisation = System Ready –M0
Startup + 5secs
S0
System
Ready
State 0
System
Ready
State 1
Powercycle
S1 – Send SOE Heartbeat –Q0.0
SOE
Heatbeat
State 0
MO + NOT Q0.0 + delay on 1s
SOE
Heatbeat
State 1
MO + Q0.0 + delay on 1s
S2 - Convert Incomer Heatbeat from a DO to a DI –M10
SMS DO
SMS
DI
State 0
SMS
DI
State 1
Not SMS DO
S3 – Monitor and action DI Heartbeats –M1 & M2
M10 + count = 1
SMS
Beat 1
State 0
SMS
Beat 1
State 1
M10 + count NOT = 1
SMS
Beat 1
State 0
M10 + Count Not = 1
SMS
Beat 1
State 1
M10 + count = 1
M3
Reset
Count
State 0
Count = 2
Reset
Count
State 1
Count = 1
S4 – If Incoming Heartbeats time out – send COS alarm
M4
M1 + NOT M2 + delay on 5s
Send
COS
State 0
Send
COS
State 1
Not M1 + M2
M5
Not M1 + M2 + delay on 5s
COS
Send
State 0
Send
COS
State 1
M1 + Not M2
Q0.1
M4 OR M5
SOE Fail
Alarm
State 0
SOE Fail
Alarm
State 1
NOT M4 and NOT M5
Download