For the pneumatic compressor; what are the Begin.VI, Teleop.VI and Finish.VI code?
For Begin; I did WPI_CompressorOpen.vi to a WPI_CompressorRefNum Registry Set.VI
And for Finish; I did WPI_CompressorRefNum Registry Get.vi to a WPI_CompressorClose.vi.
Assuming the above are correct, what goes in the teleop.vi?
Solved! Go to Solution.
Hi I would open the "Solenoid With Compressor.vi" example found under the Help -> Find Examples.. Menu
I would recomend placing the compressor vis in the following locations.
Begin: Open and Start
Finish: Stop and Close
Timed Tasks: CompressorControlLoop (By itself not inside a loop)(Context help states that the control loop vi is not to be placed in the Teleop vi
Teleop: Enable(Only for monitoring if the compressor is on or off not for control)
Also the Start and Stop vis can be used in Teleop if you want to enable or disable the compressor durring the match.
The response really helped. Thank You so much.
I am from team 3515. I just have one more question. Below is the code i have from team 358 for a double solenoid control.
In the teleop.vi the, "Joystick 1/Button 1" is a boolean value that determines forward or reverse. Is there any way
for me to be able to use my axis or control the solenoid so that it just isn't a simple boolean. Basically, I need a way to control the output from the solenoid,
to be able to control the speed.
Are you trying to control speed of the solenoid opening and closing or open and close the solenoid based on axis value?
1) if based on axis value:
I think what you need is a comparison function block like a greater than or equal to function block.
With say y valve from the axis signal and x set for 0.4 the output could be a digital valve on or off.
2) speed of solenoid would be a variable orifice speed valve on the air line to or from the solenoid ports.
This is Efrain from Southwest, my students are currently working on the programming for this FRC season. The only question I have regarding your code is, what data type or variable in labview are you using to create that button boolean variable you have? And how did you create it? Basically just where does it lie in the drop downs with the existing functions and VIs currently available. Hopefully this isn't too old and you get some sort of notification, thanks!
It seems this forum is indeed somewhat old, and I wouldn't like you to be waiting for an answer that perhaps is not updated anymore. the FRC WPI library is changed from year to year, so the previous code you see in older documents might not look similar to the way the VIs are used now.
In any case, to answer your question: it seems to me it is an Enum type saved as a Type Definition.
That being said, I suggest you and your students check the next resources to program your compressor and solenoids:
All the best for this season! Feel free to create a new forum post with the questions you have regarding these solutions.