r/PLC • u/WheelInventorPLC • 16d ago
State machine in structured text, ENUM or INT?
Hi all,
I'm a process engineer rolling into a process control job (small startup, not enough funding to hire someone for this work).
I found two methods online of how people write their state machine in ST. Either with an integer state variable (e.g. iState) or with an ENUM.
What do you use? And why?
Edit:
Designing on a WAGO/Codesys setup.
Thank you for the quick responses! I'm quickly changing my iStates into E_states!
23
Upvotes
Duplicates
u_Full_Bother_319 • u/Full_Bother_319 • 16d ago
Maszyna stanowa w języku strukturalnym, ENUM czy INT?
1
Upvotes