09-18-2013 04:36 PM
Lynn,
Yes, I absolutely did mean Case Structure. Thank you for catching that.
My apologies.
Nick
09-19-2013 02:33 AM
Check the VI, it's both an example of the typecast to enum and a queued producer/consumer. In a real application the Enum is ofcourse type def'd.
An enum is not as much a number that looks like a string, as a named number. There are some notable differences, e.g. a enum is circular, whereas an int isn't. Enum+1 will loop around from the last element, case structures automatically uses the names and so on. It is easy to convert from number to enum, as the number is the index'd name, but they're not quite the same. 🙂
/Y
09-20-2013 02:46 PM
Great news everyone,
I got my code working with the C-P design! it is event driven and has a fast time out (10 ms time out and normal code takes ~30 ms) and when an event happens, the queue is flushed and the state is uploaded to the queue. Is there a limit to how large the queue can be? Like, if I have too many timeout, it will crash LV? I'm thinking of finding the fastest my code responds and put that as the time out.
Thank you to everyone who has helped me upgrade my code and held my hand for the majority of it.
Matt
09-20-2013 02:51 PM
The queue has theoretical limits based on system memory. 😄