cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

case structure language help

I am trying to write a single case structure that will have three cases but am unsure of how the case language works. I know that ..1 is everything less than 1 including 1 and 1.. is everything 1 and greater. What I am tgrying to do is get:

 

<0

0; and

>0

 

I don't want to do any greater than/equal to

 

How is that done?

 

 

 

0 kudos
Mensaje 1 de 13
4.320 Vistas

I use comparisons, then convert boolean to integers and add creating three cases, 0, 1, 2

 

I'm still learning, so there may be a better solution.

 

I tried

 

..0.0

0.0

0.0..

 

and crashed LabVIEW 8.5 both times I tried it.

0 kudos
Mensaje 2 de 13
4.312 Vistas
Mensaje 3 de 13
4.309 Vistas
Since the case structure can only use integers, <0 or >0 is essentially the
same as ..-1, 1..

Regards,

Wiebe.


Mensaje 4 de 13
4.308 Vistas

 

 

Message Edited by smercurio_fc on 08-27-2008 09:57 AM
Descargar todos
Mensaje 5 de 13
4.297 Vistas

Hi,

The way you have described is perfect when dealing with integers. All that needs to be done is make three cases "..-1" (less than 0), "0"(for equal to zero), "1.."(Greater than 0) and then wire the numeric into the case structures selector terminal.

I've attached a simple example VI.

Hope this helps

regards

Steve

Mensaje 6 de 13
4.279 Vistas

Thanks so much everyone for your help. I was able to get it to work. I now have a second question that I have been wrestling with on my program for some time. I am hoping to be able to count the number of times each event happens, be it >0, <0 or 0. So far, I haven't been having a lot of luck on figuring this out.

 

The way my program works is that the case structures control the opening of solenoid valves. I am running a while loop to keep the program running, but would like to be able to at least count the number of times each of the cases are true in an effort to figure out the amount of time each of the solenoids is open during a run.

 

What I really need to do is be able to run each case for a maximum of 10 minutes each, and then stop the case from running. I know this is an in depth problem, but simply counting the number of times each of the cases run would be a huge start for me.

 

Thanks again for the help on the other problem.

 

Tim

0 kudos
Mensaje 7 de 13
4.273 Vistas

Also, I am running Labview 8.0 so anything above that I won't be able to open. Thanks for the vi Steve. Unfortunately, I can't open it.

 

Tim

0 kudos
Mensaje 8 de 13
4.272 Vistas
Thanks for the post.  I never used this function before (learned something new today)!
Mensaje 9 de 13
4.253 Vistas

Hi Tim,

Here's the VI in 8.0

Regards

Steve

0 kudos
Mensaje 10 de 13
4.248 Vistas