01-17-2014 07:30 AM
I'm working on project with data acquisition. I have used standard state machine and now I want to add while loop with read from USB/COM port. Where add it? Outside? then two while loops will work parallel or one inside another (in what sequence?)
01-17-2014 08:13 AM
It may depend on exactly what your program will be doing while reading, but in general this kind of situation is exactly what the Producer/Consumer Design Pattern is for. Newer versions of LabVIEW have a template set up to get you started.
01-21-2014 09:29 AM
Welcome to NI Forums! As the previous poster had said, There are a few questions you have to ask yourself to make the correct decision. How fast in my State Machine running? How often do I need serial communication? Is this port used by other applications? Am I interested in all data changes, or just the latest value?
If you can tell us more about the application, we may give you more specific advice.