Is it possible to be able to use the MRS 087-B-04 (piston sensor) for more than being able to tell if the piston is retracted or not? Such as being able to tell the cRio to stop when the piston is out a certain distance?
Yes. But…
You’ll want to have the sensor slightly before your stopping point. Why? See below.
The only way to stop a piston mid-stroke is to equalize the pressure on both sides. When you fire a piston, the full 60 PSI working pressure is applied to one side, and the other side is opened to the atmosphere, using a solenoid valve. To stop the piston mid-stroke, you have to not open that side to the atmosphere anymore. Using your normal single or double solenoid alone, that’s very difficult to do.
So, the typical FRC arrangement is a double solenoid controls the piston, while a single solenoid is attached to the vent port of the double solenoid. The idea is that when you want the cylinder to move, the single solenoid is open, and the double solenoid does its thing. When you want to stop, the single solenoid is closed, and the outgoing air can’t go anywhere. This raises the pressure as the piston keeps moving, until the pressure on both sides equalizes. But it can take a little bit to stop, so you want the single solenoid to close slightly before the piston arrives at its desired stopping point.
Therefore, you use the above setup, programmed so that when sensor detects the piston (and the command is to stop at that point), the single solenoid closes. The sensor is a little before the stop point, so it stops right where you want it. Exactly how much before depends on your exact setup; you will need to play with it to find out.
Our team used a linear potentiometer to tell us exactly how far the piston was extended. If it is a possiblity for you to get one i would suggest it, I am not sure about the piston sensor.
Yes it is possible with certain sensors, but I advise against it.
As stated before, to stop the cylinder’s piston the pressure on bot sides of it must be equal. Air under pressure takes a finite time to move. That time is much longer than the processing cycle of the cRio.
Also, if the load on your piston changes, it will move. Air is a gas, and gasses are compressible. So asking the piston to stay on one place (even if you ask nicely) might not work.
There are other issues as well, but all are solvable. The question is, is it more effort to solve these issues or develop a design that doesn’t have them in the first place? Only you can decide.