Log in

View Full Version : Problem with serial can coms!


kd008702
04-02-2014, 07:12
We are trying to use can this year for first time. We are using the serial comms. Have set up ID's on all four JAGS using BD-Comm. Have updated firmware. Checked and re-cheched and checked connections one more time. Formmated CRIO for CAN coms with Net console enabled. What we get is We can plug into each individual LAG from the CRIO and talk to it correctly, But can not get the CAN Network to function. Need a little nudge in the right direction to figure out what that ONE little piece is that we are missing.
Also we have 100ohm resistor at both ends of the network. We have tried using both JAVA and LAB view for program and get the same results in both.

Thanks.
Kevin Daniels
Senior Tech.
Pair Electronics
Greenville, NC

tlewis
04-02-2014, 08:37
Get the Jaguar Getting Started Guide here http://www.usfirst.org/roboticsprograms/frc/control-system if you haven't already. Check the Jaguar LED status indicators (page 7 in the Getting Started Guide) for a better indication of the problem.

The most likely problems:
It's not clear if you're not getting communications or if it's just that there is no motor output happening. If it's just no output (but the lights go solid when the robot is enabled and blink green or red when commanded to drive a motor) then check your limit switch jumpers -- they MUST be installed or there will be no output voltage to the motors.

If your limit switch jumpers are installed correctly, check your CAN cable pinout; you can not use standard 4-pin telephone cables. verify the pinout in Appendix A, pages 23-25 of the Getting Started Guide and verify that your cables are made correctly. Also, looking at the front of the Jaguar, signal comes in from the previous Jag via the left-most connector and out to the next one via the right-most connector.

FrankJ
04-02-2014, 08:46
Comms to the First Jag is RS232. Sounds like you have that working correctly along with the Crio & software. Silly question but, your Jags have different addresses?
From the the first jag to the rest is Canbus. Sounds like a cable issue with the canbus cable since the first jag on the chain is RS232 & is working.

Cecil
04-02-2014, 09:44
An even sillier question - did you go through the cRIO imaging tool, select the serial driver for the CAN network, and click apply? This has to be done for the cRIO to load the driver for CAN to work.

FrankJ
04-02-2014, 11:14
Since the OP can communicate to the first jag in the chain... the Crio is configured correctly & the canbus driver is loaded

gpetilli
04-02-2014, 12:20
What we get is We can plug into each individual LAG from the CRIO and talk to it correctly, But can not get the CAN Network to function.
Also we have 100ohm resistor at both ends of the network. We have tried using both JAVA and LAB view for program and get the same results in both.


I am confused by the resistor at both ends comment. The connections should be cRIO-RS232 -> BLACK Jaguar 1 In, Jag 1 Out -> Jag 2 In, ... Jag N Out -> Resistor. Only one resistor at end of daisy chain.

Also, since you already know how to use BDC-Comm, you can unplug the cRIO and plug in your PC to the chain and from the single RS232 connector query the bus and see which "boards" are on the bus. You should see one pulldown for each ID that you gave your Jaguars. BTW, it is recommended not to use ID 1, since that is the factory default. You can send commands to each unique Jaguar using this method to verify functionality and if one ID does not show up, you know which Jag is misbehaving.

We use Java - remember to wrap your CAN commands in a Try - Catch to aid in debug.

FrankJ
04-02-2014, 12:35
You need a resistor on both ends of the canbus chain. The plug for the RS323 should have a terminating resistor for the canbus. See the getting started guide.

Testing your chain with BDC-comm is agood idea.

gpetilli
04-02-2014, 12:57
You need a resistor on both ends of the canbus chain. The plug for the RS323 should have a terminating resistor for the canbus. See the getting started guide.

Testing your chain with BDC-comm is agood idea.

There may be a resistor inside the shell of the RS232 adapter we use and i forgot - its been 4years since we built it. I will have to check.

kd008702
04-02-2014, 15:54
Thanks for getting back to me guys.
So here is a stupid question for you. I completely understand the resister at both ends of the can network. Made 6-pin con with 100 ohm resister for last jag in chain. On the DB9 cable (CRIO to 1st JAG) we have the resister on the jag end crimped into 6 pin con on terminals3 and 4, or does it go with the resister towards the jag on towards the CRIO.

kd008702
04-02-2014, 15:56
Oh one more thing. The chain does not work in BDC com either.

gpetilli
04-02-2014, 16:18
Oh one more thing. The chain does not work in BDC com either.

Some things to try from BDC-Comm

1) when you hook BDC-Comm up to the first Jag in a multi Jag chain, what "Board ID" are shown as available from the pull down on top left?
2) If you unplug the chain and move the terminator to the first output port - Re-Enumerate then what board ids show up?
3) After you set the IDs, did you re-enumerate to confirm that the ID took?
4) While you have one Jag in the chain selected, if you switch to the Mode tab, can you run a motor in voltage mode?
5) If you set the Encoder lines in the config tab and run the motor, do you see the speed change on the bottom?
6) If you set the reference to quadrature in the mode tab, can you get speed to be both pos and neg?

Levansic
05-02-2014, 00:16
It sounds like you have a broken CAN chain. If nothing beyond the first node is seen, you have a good place to start checking. Broken chains will let you see up to the break, as long as your termination is good on the serial connector.

Look into each and every RJ11/12 port, and make sure that the contact wires are not stuck in a retracted position. If any are overly compacted, use a dental pick to VERY CAREFULLY stretch them out to a position that will ensure good contact when the CAN cables are inserted.

Not knowing the source of your CAN connection cables, you may want to check all of them, to make sure they are constructed correctly. We've had students shift wires by one position, or reverse the plug, when un-monitored. This is something that is simple enough to check, and could provide a moment for instruction.

--Len

orangemoore
05-02-2014, 00:26
What color Jags are you using?