10-23-2009 10:38 AM
10-23-2009 10:55 AM
10-23-2009 11:03 AM
[Set Sarcasm Mode = True]
An empty template should handle just about anything but do we really want to be THAT fleixble? ![]()
[Set Sarcasm_mode = False]
I tried to open that in LV 7.1 and LV 2009 and it looks empty.
Sorry,
Ben
10-23-2009 11:09 AM
10-23-2009 11:25 AM - edited 10-23-2009 11:26 AM
A couple of quick comments
1) drop the name of the queue so you can run multiples of these in parallel without them stepping on each other.
2) Just a matter of taste but I prefer to le the consumer kill the queue since only it knows when it is done eating.
3) the type def was saved as LV 8.5 so watch out.
Ben
10-23-2009 11:42 AM - edited 10-23-2009 11:43 AM
Ben wrote:A couple of quick comments
1) drop the name of the queue so you can run multiples of these in parallel without them stepping on each other.
2) Just a matter of taste but I prefer to le the consumer kill the queue since only it knows when it is done eating.
3) the type def was saved as LV 8.5 so watch out.
Ben
Message Edited by Ben on 10-23-2009 11:26 AM
1. No problem
2. I originally had it that way, for the same reason you described. Then I looked at the LabVIEW producer consumer architecture and it had it after the producer loop. Thats what I get for being a "robot". I also like it after the consumer loop better because no error is thrown due to the queue being destroyed prior to the consumer loop finishing processing/reading from the queue.
3. Thats what I get for having two versions of LabVIEW open at once...fail.
Thanks!
10-23-2009 05:54 PM
10-24-2009
08:33 AM
- last edited on
07-08-2024
10:36 AM
by
Content Cleaner
Have you looked at the JKI State Machine or this library that NI offers? I'm partial to JKI, but the other looked good to me, too. As I started learning to use the template I found myself appreciating some features that I wouldn't have come up with on my own in 1e6 years. One thing I like is that they both use strings instead of enums, contrary to what we'd learned from NI training.
<personal plug> I wrote a plugin that assists in state machine development. It works on any Case Structure, but it has special features that only apply to the JKI State Machine. <\personal plug>
10-24-2009
12:07 PM
- last edited on
07-08-2024
10:36 AM
by
Content Cleaner
jcarmody wrote:
Have you looked at the JKI State Machine or this library that NI offers? I'm partial to JKI, but the other looked good to me, too. As I started learning to use the template I found myself appreciating some features that I wouldn't have come up with on my own in 1e6 years. One thing I like is that they both use strings instead of enums, contrary to what we'd learned from NI training.
<personal plug> I wrote a plugin that assists in state machine development. It works on any Case Structure, but it has special features that only apply to the JKI State Machine. <\personal plug>
I know there is always the onging debate regarding using strings or ENUMS. Both have their advantages and disadvantages. I tend to like ENUMs though because they help to prevent coding errors by inserting incorrect states. I know JKI's state machine includes the state to catch unknown states but I like to enforce this check at coding time rather than at runtime. Plus, the old embedded programmer in me likes the fact that ENUMs use less space than strings. I know this doesn't matter much on today's PCs but old habits are sometimes hard to break.
10-24-2009 01:47 PM
Mark Yedinak wrote:
jcarmody wrote:Have you looked at the JKI State Machine or this library that NI offers? I'm partial to JKI, but the other looked good to me, too. As I started learning to use the template I found myself appreciating some features that I wouldn't have come up with on my own in 1e6 years. One thing I like is that they both use strings instead of enums, contrary to what we'd learned from NI training.
<personal plug> I wrote a plugin that assists in state machine development. It works on any Case Structure, but it has special features that only apply to the JKI State Machine. <\personal plug>
I know there is always the onging debate regarding using strings or ENUMS. Both have their advantages and disadvantages. I tend to like ENUMs though because they help to prevent coding errors by inserting incorrect states. I know JKI's state machine includes the state to catch unknown states but I like to enforce this check at coding time rather than at runtime. Plus, the old embedded programmer in me likes the fact that ENUMs use less space than strings. I know this doesn't matter much on today's PCs but old habits are sometimes hard to break.
You have been a ton of help, Mark. Thanks. I also like enum because it's so easy to take that strict type def control and just right click the case structure, and add a case for every value when the control has been modified.