State Machine in Siemens Safety (TIA)

boneless

Lifetime Supporting Member + Moderator
Join Date
Feb 2008
Location
OKC
Posts
1,628
Hi all!


Just got some comments from a client regarding a safety block we made. They want us to replace JMP statements with other logic. They mention we should use a state machine logic.



We use JMP statements, since it is not allowed to use the EN and ENO in the safety FB.


I wonder how I should implement a state machine, if I cannot use the EN input of a move block?


Anyone got any good ideas?


Thanks and have a great weekend!
 
Hi!


I can try :)


So we have a block with 2 analog inputs, 2 error signals and some alarm limits. When both signals are without error, we will output the average of these two and use that to determine alarm levels. If 1 signal has an error, we only use the other as output and for alarms. If both have failed, we will force a replacement value.


So in my previous version, I have programmed it to JMP over some code if the condition is not satisfied:


NOT both signals okay, jump over part X to Y

X both signals okay, execute program, jump to end
NOT signal A okay and signal B fail, jump over part Y to Z
Y signal A okay and signal B fail, execute program, jump to end


etc.


Customer (or 3rd party really), wants us to use state machine. So both okay is state 1, a okay b not okay state 2 etc. Very simple and effective way of programming. But I can for the life of me not figure out how to do that if I can not use EN input on a move, add or shift block?


Hope that makes sense. Thanks!
 
If X and Y are good, then output = X+Y/2
ElseIf X is good and Y is bad, then output = X
ElseIf Y is good and X is bad, then output = Y
ElseIF X is bad, and Y is bad, the output= preset value
Endif;
 
Hi Ken,


I wish I could use SCL in safety :)


But thank you!
 
You can do the same thing in ladder.

Not in safety in Siemens, or he couldn't figure out any way except how he had done it with jumps. Off the top of my head, I can't think of a better way.

I'd be very curious to see your suggestion that compiles.

It's trivial in standard code.
 
Cheap'n'nasty method......


Use M flags dedicated to the FB (no multi-instance possible) and use logic with sets to copy average, X, Y or preset values across bit by bit. Example for just the average shown...


A state machine is not applicable to this problem, there is no sequence or memory storage required between calls, only combinational logic. It may as well be coded in an FC

legs.jpg
 
Hi,



Thanks, but I don't think that would work either. Since the globals are non-safety?
 

Similar Topics

Hello, I am at the initial stage of designing a control concept and state transition of machine operations. I come across a with the problem and...
Replies
11
Views
3,344
So I just wrote this 2 state, state machine. For sending a request to be added to a queue on a remote PLC. Pretty simple, Sit idle until...
Replies
26
Views
7,662
Hi all, I was wondering if there’s a automatic tool that can convert a PLC written in ST, FBD, IL to state machine diagram? Thc
Replies
2
Views
1,465
Hello all, been reading in the forum for a few years I guess, but a first time poster. :-) I'm in the midst of converting parts of my own system...
Replies
17
Views
6,770
Hello! This is my first post on this forum. So I'm working on a Ladder Diagram on LogixPro for the Traffic Light simulator. I am supposed to use...
Replies
7
Views
3,042
Back
Top Bottom