![]() |
CAN for dummies
Wow, my first thread on CD!
My team wanted to investigate the CAN interface, and I had a few questions. I already read some of the other “getting started” threads, and the associated files. If I make any technical mistakes, don’t hesitate to correct me, as I am new to some of the terms. 1. Could someone tell me how I should set the PID if I use Position mode? 2. If I wanted to control a robot in autonomous mode, should I use position or speed? 3. If I wanted to control a robot in teleop mode, should I use position, speed, or PercentVbus? 4. Is there any difference between 2CAN and connecting the black jag to the cRIO serial port? 5. We “misplaced the encoder from the KOP”. What was the original part number, or what would be a good replacement? 6. Is there any maximum limit to the quantity of Jaguars as far as FIRST hardware goes? 7. Let’s say I don’t mind spending $25, are the cables from here worth that much versus making my own cables? 8. Is there anything else I should know? If it makes any difference, our team programs in Java. Thanks in advance! -Daniel |
Re: CAN for dummies
Quote:
Quote:
http://usfirst.org/uploadedFiles/Rob...%20Rev%20E.pdf http://usdigital.com/products/encode...rotary/kit/e4p http://usdigital.com/first http://www.andymark.com/product-p/am-0791.htm http://www.austriamicrosystems.com/e...ncoders/AS5030 Quote:
http://www.vishay.com/docs/57103/model981.pdf http://www.cherrycorp.com/english/se...an8_series.pdf http://www.usdigital.com/products/en...ary/shaft/ma3/ |
Re: CAN for dummies
The first list Ether gave are optical encoders, giving a tick count for how many times the shaft has spun around. This is an incremental measure of rotation. However, the second list are all magnetic encoders that sense the absolute orientation of a permanent magnet mounted to the shaft. This is an absolute measure of rotation. Both have their uses.
I'm not entirely sure how these encoders (or any others) hook up to the Jag, or how the Jag uses the data for whatever speed or position control you off board to it, but it all works somehow. If you're going to run any PID on a two (or more) motor gearbox, however, you probably have to do it on the cRio, because there is yet no way to sync the speed controls off of one feedback sensor. I believe this is on the TI's agenda for a new Jag firmware. The 2CAN is significantly faster than the serial bus (about 5x, I believe). This may not be an issue, but when we tried CAN this year on a serial bus, our 7 Jags plus some calls to the limit switches on one of them bogged down our CAN bus quite a bit because the serial bus just can't get that many packets through. I'm quite sure the 2CAN would eliminate this problem (for another $200...). Jaguars on a competition robot are only limited by the number of motors. Every year past (I can't imagine this would change) you can only have one motor per speed controller, one speed controller per motor, and motors have been pretty strictly specified, with up to 13 this year. Very few FRC robots ever have more than 10. |
Re: CAN for dummies
Quote:
|
Re: CAN for dummies
Quote:
It is an absolute magnetic device. |
Re: CAN for dummies
Quote:
|
Re: CAN for dummies
1 Attachment(s)
Quote:
|
Re: CAN for dummies
Quote:
|
Re: CAN for dummies
Quote:
In teleop, we will have our robot controled by one joystick, and the encoders will be used to make sure that the ratio of the input values (left, right) is the same as the output (left, right). Also, thanks for the information about encoders. I can figure out where each wire goes, but is there some sort of connector I have to wire the encoder to to connect it to the jaguar? |
Re: CAN for dummies
Quote:
In case you decide to do the PID in cRIO instead of Jag, be aware that there's a bug in the cRIO's FPGA code that counts encoder pulses. |
Re: CAN for dummies
Quote:
|
Re: CAN for dummies
Quote:
The setpoint is the value you want for whatever it is you are trying to control (your computed command). The processVariable is the present measured actual value of what you are trying to control (the feedback from the sensor). You have to scale the setpoint or the processVariable so that they are in the same units. So if your command is in "feet", you have to scale your processVariable to be in feet. You do that by either calculating how many encoder pulses correspond to 1 foot of motion, or you can measure it experimentally. |
Re: CAN for dummies
1 Attachment(s)
Quote:
|
Re: CAN for dummies
Fantastic. Thanks everyone for all your help!
|
Re: CAN for dummies
Quote:
|
| All times are GMT -5. The time now is 02:52. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi