|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: I woke up...and discovered CAN
Absolutely horrible is a pretty strong sentiment to place on something. This is a good opportunity to practice troubleshooting the elements you are using and tracking down the issue.
If you were reading them as digital inputs and doing your own logic for advancing or reversing the position, that should work if done properly, but it will only work for a slow progression. I suspect you are reading the pulses every few ms at best, and probably more like every 20ms +/- 5. If you have a 1024 pulse encoder, the 20ms sampling rate would start to fail at something like 1/80 rpm I think -- not very fast. By comparison, the fpga reads the digital inputs at a rock steady 6.xxx microseconds. I don't remember the number, but that is actually limited by the bus access time for the module. With a faster module, it could go far higher. My initial advice would be to make a small test project using just an encoder example. spin the encoder by hand. If it is flaky, make sure that the issue isn't with the wiring, the digital breakout, or the sensor. Being the programmer, you are often the first to see that the system doesn't work, and since the system is complex, the issue could be any number of places. Being able to isolate parts of the system and determine if they are at fault is a valuable technique, and is actually fun once you become good at it. Greg McKaskle |
|
#2
|
||||
|
||||
|
Re: I woke up...and discovered CAN
The CAN bus and the Jaguars are a unique challenge. Many of the problems you'll see can be overcome fairly easily (once you find them)...but not if you're in a hurry. I don't encourage anyone with limits to their patience or available time to try them casually. You'll end up REALLY disliking them if you plan poorly for this and possibly a bit unfairly to them in general.
That being said...I don't advise people to fall asleep in: datasheets, on robots or in the box of the KOP. These would seem to be the places you'll most likely wake up and discover CAN. Safety first you know.Last edited by techhelpbb : 03-02-2012 at 15:13. |
|
#3
|
|||
|
|||
|
Re: I woke up...and discovered CAN
The only error I had been having is lack of connection to the cRIO. I can talk to it from the computer fine, but the cRIO Java implementation gives me an error message about the CAN interface not connecting. Otherwise, it seemed pretty self explanatory. (No, still haven't fixed it, nothing on the error message around).
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|