|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: CAN mode question
We've had a number of issues with CAN on the Jaguars in the past. The support folks at Vex were very helpful, but in the it seemed to be issues with different versions of the Jaguars so we dropped it. FWIW, part of the issue was conformal coating on the modular connectors, but changing that did not completely resolve the issue.
This year we have to use CAN to get battery voltage from the PDB as well as communicate with the pneumatics module, and want to use it for motor control, but it seems the Talon SR's in the KOP do not have CAN, but rather the Talon SRX's do. See here... http://content.vexrobotics.com/vexpr...t-20140819.pdf |
|
#2
|
||||
|
||||
|
Re: CAN mode question
CAN is definitely more complicated than PWM, which is extremely simple. With PWM you just give it a -1.0 - 1.0 value. With CAN you can configure it to take speed commands (RPM), distance commands (Rotations), Percentages (-1.0 - 1.0), and others. If you use PWM though, I think you CAN (pun intended) get those functionalities, but with a little more work.
|
|
#3
|
|||||
|
|||||
|
Re: CAN mode question
Quote:
I'll readily admit the using CAN before this year was rather more complicated, since you needed to make up the correct RJ11 cables, terminate the bus correctly, make up a (correct) serial-RJ11 adapter, and (shudder) deal with BDC Comm for assigning IDs and testing. Definitely more complicated last year. |
|
#4
|
||||
|
||||
|
Re: CAN mode question
Well put Kevin. With the Talon SRX specifically, we took the lessons learnt from seasons past to make the CAN use-case a lot more robust and painless.
-With weidmuller connectors, there is no risk of bad crimps or bad connectors. -With the terminating resistor built into the roboRIO and PDP there is no risk of manually soldering resistors or hand-crimping them and not being sure they are actually in-circuit. -With the new lightening tab in the DS you can grab the CAN bus utilization (%) and error counts. -The roboRIO web-based configuration will tell you when you have multiple CAN nodes with the same devID and will let you fix it without isolating one CAN node. -boot-loaders for all new CAN nodes gracefully handle bad firmware files, losing power/CAN in middle of flash, flashing wrong product firmware, etc... This season's CAN implementation really is a new type of animal. If you really want the details checkout the Talon user's guide and Talon software ref manual at.... http://www.crosstheroadelectronics.c...ol_system.html Also the FRC screensteps page has lots of good info... http://wpilib.screenstepslive.com/s/...ribution-panel Quote:
|
|
#5
|
||||
|
||||
|
Re: CAN mode question
Quote:
|
|
#6
|
||||
|
||||
|
Re: CAN mode question
Quote:
By the way, Omar is the man. It's a fact. |
|
#7
|
|||||
|
|||||
|
Re: CAN mode question
Quote:
However, I do have a few suggestions/feature requests for future firmware releases. Some are admittedly based on my assumptions about how you're doing things, since the firmware source code isn't available and we don't have our Talons or a system to test them on yet. So far it's three things that aren't mentioned in your firmware feature list in the SRM:
|
|
#8
|
||||
|
||||
|
Re: CAN mode question
Quote:
Another feature I would like to see would be a way to set the distance per count. With no setting for that this year, gain numbers are going to have to be incredibly small to work with something like a 256 or 360 cpr encoder. |
|
#9
|
|||||
|
|||||
|
Re: CAN mode question
Quote:
In 2012, we used a bang-bang controller for our basketball-shooting flywheel. It worked pretty well. In 2013, we started out using a bang-bang controller for our full-court shooter -- it was pretty good, but not good enough for FCS. With experimentation during the 2013 season, we found that a PF controller (PIDF where I=D=0) worked more smoothly and more accurately. As mentioned above, PIDF with Kp=infinity and Ki = Kd = Kf = 0 degrades to bang-bang, so it's easy to test both alternatives by just varying the parameters while the robot is operating. For us in 2013, the improvements made the difference between FCS that nearly worked and actually did work. Retrofitting the improvements to our 2012 robot increased our accuracy shooting basketballs, too. We're planning to use the Talon SRX this year with the built-in PIDF for most of our control loops. Haven't gotten them working yet, but that's been due to cabling issues, rather than problems with CAN or the Talon SRX. |
|
#10
|
||||
|
||||
|
Re: CAN mode question
[Rising Counter.]
If you use the Rising Counter/Encoder (EncRising) feedback device then the feedback device will only count in the positive direction which means the measured velocity will also be positive (or zero) and.... [Section 18 Closed loop code] ...additionally the oneDirOnly param will be true since EncRising is the "positive only sensor" mentioned in the function header comment. This is the only way to set oneDirOnly param. This will ensure that negative error (target speed < actual speed) doesn't output negative throttle (which is bad for a velocity control, we don't want to spin backwards!). I found that out the hard way when I tested velocity servo without it during development. If you do want to do this be sure to note the part in Section 7.4 where you must set ReverseFeedBackSensor to false. Otherwise the PIDF will output negative throttle and oneDirOnly will clamp it to zero. If your motor and sensor is out-of-phase this is a good place to use "Reverse Closed-Loop output" instead. FYI same signal can be used to invert the output of a slaved Talon SRX. Also EncRising isn't available in LabVIEW (Section 21.7). [min and max output] Not supported, didn't have time for it. That's also what Section 21.4 is about. [bang bang] I suppose it's possible to do Bang Bang with a large P. Then once the speed meets or exceeds the target speed, the motor output would coast. I can't say I tried using it in that fashion, if that works out then please share with the rest of the community. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|