04-20-2014 08:01 AM
Hi, i wanna to do a case structure with binary as case instead of true and false. I did it in following way.
The problem that i have now is that
10 - available
01 - not available
11 - booked
when i reach the not available stage, i wan it jump to the avalaible case instead of booked stage after my sensor is detecting nothing. Can someone help me with better idea? thank you very much.
04-20-2014 08:47 AM
I have no idea what you mean.
How can it jump except by changing the values of the buttons? What sensor are you talking about? I see nothing which looks like a sensor?
Is this a subVI to a largre main VI? How do you use this VI?
Do you really want the 00 case to have the same effect as 01 - not available? That is what the default seeting does.
Lynn
04-20-2014 08:49 AM - edited 04-20-2014 08:56 AM
I think this is simply a case of "I am not familiar enough with LabVIEW to know where everything is."
This is really how you should be doing it...
Agreed that the exercise doesn't really make sense, but...
Hey how do you save a snippet in an earlier version of LV?
04-20-2014 09:00 AM
Sorry! the following attach is my car detection project. i have the difficutly when the the car is leaving the parking lot and the indicator exercute back "booking" case. is their any possible way that when the car is leaving the parking lot and i want it exercute the "empty" structure. sorry for the initial post.
04-20-2014 09:10 AM - edited 04-20-2014 09:10 AM
oops
04-20-2014 11:05 AM - edited 04-20-2014 11:29 AM
You can assign multiple values to a single case structure. You have already one ("empty") as default. Isn't that enough?
You can do the same code wit less computing effort and less diagram clutter by forming a binary array, converting to number, and set the radix of the selector to binary (see picture)
Also, why do you need to read and convert the pictures with every iteration fo the loop? Do the files change on disk? It would be more reasonable to read and convert the pictures once outside the loop and use the case structure to select one of the three different blue wires. You could event autoindex over an arrray of file names and create an array of pictures to simplify (see picture).
Also notice that "LCD print" occurs in all cases, thus it beongs after the case. Only it's inputs belong inside the case structure. Why are you re-bundling the visa resource on the bottom right? That's not needed. Why are you even constantly closing the VISA resouce?
04-20-2014 11:26 AM - edited 04-20-2014 11:27 AM
Thx you for your help sir! i will try it my best! i am just a very beginneer to labview. Thank you for helping me.