|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Code Check
This is my fourth day in Labview (our Java coder decided to quit the team) so I'm just checking to see if my code looks good.
To explain a little about the bot, it runs 4 CIMs on drive, tank style with Jaguars. The bicep is controlled by two window motors that work in unison on jaguars, and the forearm is controlled by the fisher-price (so its scaled) on a vector. The minibot is deployed by the cylinder, so I'd actually like to make it so the compressor turns off for good once it comes up to pressure and I don't know how to do that. We have red and blue rope-light connected to their respective relays that turn red or blue depending upon our assignment. Do I need to turn the lights on both in autonomous and teleop? Do we need to put our fans on a relay? The safety inspectors jumped down our throats last year when we tried to explain that we didn't need a relay on the fans, and we showed him the rules, but he didn't believe us, so we threw them on a relay. I'm also concerned about the safety VIs, I don't know how to use them, or even if I need to use them. I'm also clueless when in comes to the error-in and error-out functions. |
|
#2
|
|||
|
|||
|
Re: Code Check
I don't have labview at home, so i cant help you specifically, but the compressor part is pretty easy. All you need is to open a compressor in the begin vi, with the pressure switch pwm port and the relay for the spike as its inputs, start the compressor, and then give it a reference name (and finish it in finish.vi).
No code in teleop needed. The compressor will automatically start pumping when autonomous starts, and when it hits about 120 psi, it will stop. You can also preload air into your tanks before matches so the compressor won't have to run during autonomous. |
|
#3
|
||||
|
||||
|
Re: Code Check
Quote:
I understood that you can put air in the tanks beforehand, but I thought it had to come from the same compressor, or at least the same type. |
|
#4
|
||||
|
||||
|
Re: Code Check
Quote:
On the other hand, your battery will last. Last year, our team had a hanger driven by two CIMs and the battery held up (for about one match .) We had a compressor also. There's no real reason to have it not just stay full.Also, the rules say that you can have energy in the form of compressed air on the robot. They say nothing about how that compressed air got there. It would be easiest, though, to just turn on the robot in the pits and have it charge up. Then replace the battery if you really need to. |
|
#5
|
|||||
|
|||||
|
Re: Code Check
Quote:
|
|
#6
|
||||
|
||||
|
Re: Code Check
Quote:
Quote:
), I know that the switch returns a digital value, and there would really be no purpose in having an analog switch. It wouldn't be too pricey, just pointless.Back to the ultimate question though, does my code look good? I also noticed a Sync Group lead on the Set Output VI. Will this allow me to have those motors work in unison? If so, how do I use it? Also, finally, Error In and Error Out. What do these do for me and do I need them? I understand they can help control which code starts first, but I thought the DevRefs would take care of that. |
|
#7
|
||||
|
||||
|
Re: Code Check
bump
|
|
#8
|
||||||
|
||||||
|
Re: Code Check
The Sync Group is only used for CAN control. It's not used for PWM control. With PWM, the motors are all updated at the same time.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|