bradjb911 Posted March 30, 2010 Report Share Posted March 30, 2010 Hello y'all, I have a there must be a better way question. Here's what I'm trying to do. Build a system which takes inputs serial strings encoded with address from different things. Which will say the states of those things. Then it will take the data it learns and respond with serial commands. Basically, one light turns on, phones home and so Labview responds by turning on another. What I'm wondering is if anyone has any advice on how to architect the program. I'm planning on a loop of: Serial Data In -> Analyze Data -> Update States -> Calculate Necessary State Changes -> Send Appropriate New Serial Commands -> Rinse and Repeat My biggest holdup is book keeping my state updates according to the right addresses. Any suggestions. I'm currently thinking a 2-D Array or maybe several 1-D Arrays and doing a string match. Thanks in advance! Brad Quote Link to comment
Francois Normandin Posted March 31, 2010 Report Share Posted March 31, 2010 Hi Brad, take a look at some example of Enum State Machine. Here on or NI examples. Quote Link to comment
bradjb911 Posted March 31, 2010 Author Report Share Posted March 31, 2010 Hi Brad, take a look at some example of Enum State Machine. Here on or NI examples. Clever Trick Thanks...I may incorporate that into my program. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.