Log in

View Full Version : PSI Value for a Case Structure


winglerw28
18-02-2011, 20:31
I am used to C and C++ "if" statements, and I am wondering how I can plug the value of a digital input (connected to a pressure sensor) into a case statement so that our pneumatics compressor stops at 120psi.

Thank you,
Will

Joe Ross
18-02-2011, 20:44
The WPI Robotics Library includes a compressor class which handles everything automatically.

To answer your question generally, the digital input vi gives you a boolean (true/false) value. You can wire that directly into a case structure.

Greg McKaskle
19-02-2011, 05:37
The case structure will also alloy you to connect an integer and you can type expressions in the case string such as ...
1
2,3
4..10
Default

You can also wire a string and put in string based expressions. You can wire error wires, and of course, enumerations.

Greg McKaskle

winglerw28
19-02-2011, 08:23
Thank you very much!

This is the first time programming pneumatics, and I'm having a hard time with it since I'm pretty much just using LabView without ever really exploring it. Your help is immensely appreciated. :)