LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case structure help needed~

As mike already said, it is a single case structure with three cases as follows.
 



Message Edited by altenbach on 08-03-2008 10:52 PM
Message 11 of 27
(1,926 Views)
If i correctly understand your question,
its not different case structures, its just a one case structure with different cases.
 
To add more cases, just right click on the structure and select "Add case after" or "Add case before" and it depends.
 
Hope it helps!
Mathan
0 Kudos
Message 12 of 27
(1,923 Views)
thanks guys, now i will have to add like 60 cases to the case structure 😄 thanks.
0 Kudos
Message 13 of 27
(1,919 Views)


Simmy wrote:
thanks guys, now i will have to add like 60 cases to the case structure 😄 thanks.


Hi Simmy,
can you explain it please? If you only need two numbers as output, then i´m sure you can calculate the result you need.
Mike
Message 14 of 27
(1,915 Views)
what is happening here is... i am receiving hexadecimal from RS-232, and according to the hexa code, i will have to output certain things... for e example

007A -> simon
0075 -> raymond
0045 -> johnson
001A -> monica

so on and so forth, i have successfully used the method you thought and can get my output, but i need to do tons of cases
0 Kudos
Message 15 of 27
(1,897 Views)

Hi Simmy,

you can use a lookup table. Create two 1D arrays. One with the values you receive and one with the values you want to output. Search for the received string in the first array and use the index to index the element in the second array.

Mike



Message Edited by MikeS81 on 08-04-2008 10:15 AM
Message 16 of 27
(1,905 Views)
sorry, what you just said sounds like alien language to me, i have to admit, i'm not very good in programming to begin with, plus with labview, everything seems so hard to understand, i'm trying my best to learn~

would you mind to show me how it is done? thanks~
0 Kudos
Message 17 of 27
(1,900 Views)

Hi Simmy,

see the attached example please.

Hope it helps. Mike

Message 18 of 27
(1,896 Views)
thanks for your help! that is pretty neat, but that would means i have to retype everything all over again haha. but i think this is far more efficient 😄 thanks~
0 Kudos
Message 19 of 27
(1,884 Views)

Hi Simmy,

an advantage of this is, that your are more flexible with it. You can read the values from a configuration file, so you need no change in your source code, if you only define some new commands.

Mike

Message 20 of 27
(1,880 Views)