LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple poll case structures to event help

Lynn,

 

Yes, I absolutely did mean Case Structure. Thank you for catching that.

 

My apologies.

 

Nick

Applications Engineer
National Instruments
0 Kudos
Message 31 of 34
(510 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 32 of 34
(496 Views)

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

0 Kudos
Message 33 of 34
(470 Views)

The queue has theoretical limits based on system memory.  😄

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 34 of 34
(467 Views)