Lorne,
I am glad that you enjoyed my post. My PLC programming is “recreational”.
I try to share ideas on how to get the most out of the TRI PLCs. Three of the most powerful features of these PLCs, in my opion, is the specialized counters (Sequencers), the TBASIC programming language and the raw horse power of the 32-bit CPU core that is buried in the PLC.
I had started to write a tutorial on using the Sequencers as the basis of finite element state machines over 10 years ago, but never got very far.
The Tic Tac Toe gave was, initially, written using only a single state machine. I wrote all of the game strategy (checking for win, block, special moves...) using custom functions. The use of CFs is much simpler to write and debug. Once I got the game strategy working I replaced the CFs with ladder logic.
I thought that Tic Tac Toe was a better vehicle to give people a hint of the power of using state machines in PLC code. All of my PLC code is based on this sort of state machine approach. My code has logged hundreds of thousands of hours for my clients without problems. And, better yet, years later I can add fetatures to old PLC programs with ease.
As, always, if you have questions about how to get the PLC to do your bidding, please feel free to ask.
Best regards,
Gary D*ckinson