LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for suggestions on program structure

Read it again - use a CASE structure
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 11 of 14
(606 Views)
That's what I read, but I don't know how to simply use the text you typed - or were you implying to use it as I would expect - graphically? I thought that there was a was to use the text-based case statement.

Jason
0 Kudos
Message 12 of 14
(606 Views)
As I said:
Wire the string to the selector and set the cases to what you wish to detect.



1... Extract the two characters you want to use as a selector.
2... Wire that 2-char string to the selector of the CASE structure.
3... Set the selector value (the text in the top center of the CASE structure) to "A0" (include the quotes)
4... Inside that case, put a constant: One of your enums set to TEST
5... Add another case.
6... Repeat 3 and 4 until all cases are covered.

I strongly suggest that you use a TYPEDEF to define your enum, unless your enum is well defined and will not change. With a TYPEDEF, if you change the TYPEDEF itself, all instances change with it.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 13 of 14
(600 Views)
OK, thanks! Sorry for the confusion - by the programmatic appearance of your text, I thought you meant to imply that I could do this with a text-based approach as you showed, but I see now, you meant using a case statement and constant outputs. That would work - I guess I was just looking for a way to see all the values at the same time... perhaps a residual of my C programming.

Again, thanks for the help and sorry for the confusion!

Jason
0 Kudos
Message 14 of 14
(598 Views)