Go to Post You don't have to build a robot to be on a robot team. This isn't about the robot, it's about learning. - engunneer [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 23-01-2010, 19:37
ellisk ellisk is offline
Registered User
FRC #1540
 
Join Date: Dec 2008
Location: Vancouver, WA
Posts: 41
ellisk is on a distinguished road
Re: Black jaguars: not working

Thanks for the reply. I talked to the control systems people on my team and they set the ID of the black Jaguar using the bdc-comm utility to 2. I tried the code again, however, with the ID given in the constructor of the black jaguar to 2, and I still get the exact same behavior. So, while it seems that I did have the wrong port, that isn't the reason I get these errors. Any advice?

Thanks,
Kevin

EDIT: yes, the driver loads correctly, as seen from the network console. The black jaguar utilities show that the Jaguar is functioning fine and the wiring is fine. I'm very confused...

Last edited by ellisk : 23-01-2010 at 19:40.
Reply With Quote
  #2   Spotlight this post!  
Unread 23-01-2010, 19:42
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Black jaguars: not working

What about the other list of suggestions in my last post? Also... if you have LabVIEW installed, you could run the voltage mode example to see what enumerates on your robot.

-Joe
Reply With Quote
  #3   Spotlight this post!  
Unread 23-01-2010, 19:47
ellisk ellisk is offline
Registered User
FRC #1540
 
Join Date: Dec 2008
Location: Vancouver, WA
Posts: 41
ellisk is on a distinguished road
Re: Black jaguars: not working

Yes, we've tried the other suggestions. The cable is fine, it's plugged in on the left, there is a 100 ohm resistor on the left jack, and I can see the driver loading on the console when the cRIO boots.

EDIT:
Here's the startup message from the cRIO's console:
Code:
FPGA Hardware GUID: 0xAD(a bunch of hex digits)
FPGA Software GUID: 0xAD(a bunch of hex digits)
FPGA Hardware Version: 2010
FPGA Software Version: 2010
FPGA Hardware Revision: 1.3.0
FPGA Software Revision: 1.3.0
* Loading StartupDlls: FRC_BlockJagBridgePlugin
FRC_BlockJagBridgePlugin was compiled from SVN revision 10
task 0x12d9610 (t2) deleted: erno=0 (0) status=0 (0)
* Loading StartupDls: FRC_UserProgram
...FRC_UserProgram failed to load.

NI-VISA Server 4.5 started successfully.
task 0xe414e8 (t1) deleted: errno=1835009 (0x1c001) status=1 (0x1)

Welcome to LabVIEW Real-Time 8.6.1f2
(the last line is odd, considering that it's not in LabVIEW mode...)

When I run the aforementioned program, I get the following error at startup, presumably from the call to Init of the CANJaguar in the constructor of the program:
Code:
>>>>ERROR: status == -63194 (0xFFFF0926) in InitJaguar() in C:/windriver/workspace/Spy/CANJaguar.cpp at line 32

Last edited by ellisk : 23-01-2010 at 19:58.
Reply With Quote
  #4   Spotlight this post!  
Unread 23-01-2010, 19:53
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Black jaguars: not working

If you just unplug the serial connector from the cRIO and plug it into a PC, does bdc-comm see the Jaguars?
Reply With Quote
  #5   Spotlight this post!  
Unread 23-01-2010, 23:15
ChristopherBuck's Avatar
ChristopherBuck ChristopherBuck is offline
Registered User
FRC #0612
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: United States
Posts: 38
ChristopherBuck is a jewel in the roughChristopherBuck is a jewel in the roughChristopherBuck is a jewel in the rough
Re: Black jaguars: not working

Hi, we had a seemingly similar problem with our CAN bus setup (using LabView). the driverstation would display an error regarding "CAN-Recieve.vi" and "operation not completed in time" (or something like that), so a timeout error of sorts. essentially, the cRIO was not getting a confirmation of initial setup from the black jag, or other jaguar- I forget exactly which. Anyway, we went into the code for initializing a 4motor robot drive system. and modified it such that it bypassed this error point (removing CAN-Recieve.vi). Then it worked perfectly. So my guess is that you may be able to do something similar in C++.
Reply With Quote
  #6   Spotlight this post!  
Unread 23-01-2010, 23:33
Dale's Avatar
Dale Dale is offline
Head Coach & Mentor
AKA: Dale Yocum
FRC #1540 (Flaming Chickens)
Team Role: Coach
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Portland, OR
Posts: 499
Dale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud of
Re: Black jaguars: not working

Answering for ellisk and in answer jhersh's question... yes the same cable works fine off a PC to talk to the Jaguar via the command line and GUI interface. The firmware was updated and ID set. No other changes were made to the Jaguar's settings. Also, for what it's worth, different cRIOs exhibit the same problem.

Once thing we didn't do was wire any of the the RS-232 handshake lines in the connector, things like CTS, RTS, DTR, DSR. The manual didn't say anything about that so we're assuming the cRIO doesn't care. Is that true?
__________________
2016 PNW Championship Chairman's; 2016 Winner Oregon City District, 2015 PNW Championship Chairman's; 2015 PNW District Engineering Inspiration; 2015 PNW District Finalist; 2014 PNW Championship Chairman's; 2014 Championship Innovation in Controls; 2013 Chairman's (Oregon); 2013 Finalist (OKC); 2012 Winner (OKC); 2012 Chairman's (OKC); 2012 Woody Flowers (Oregon); 2011 Volunteer of the Year (Oregon); 2011 Finalist & Captain (San Diego); 2011 Innovation in Control (San Diego); 2010 & 2007 Chairman's (Oregon); 2010 Regional Champions (Colorado); 2010 Innovation in Control (Colorado); 2009 & 2008 Engineering Inspiration (Oregon); 2008 Regional Champions (Oregon); 2007 Regional Finalist (Oregon); 2005 Rookie Inspiration (PNW)

Last edited by Dale : 24-01-2010 at 01:47.
Reply With Quote
  #7   Spotlight this post!  
Unread 24-01-2010, 00:12
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Black jaguars: not working

Quote:
Originally Posted by Dale View Post
Once thing we didn't do was wire any of the the RS-232 handshake lines in the connector, things like CTS, RTS, DTR, DSR. The manual didn't say anything about that so we're assuming the cRIO doesn't care. Is that true?
The Jaguar only has connections for RX and TX.
Reply With Quote
  #8   Spotlight this post!  
Unread 24-01-2010, 00:31
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Black jaguars: not working

Quote:
Originally Posted by ChristopherBuck View Post
Hi, we had a seemingly similar problem with our CAN bus setup (using LabView). the driverstation would display an error regarding "CAN-Recieve.vi" and "operation not completed in time" (or something like that), so a timeout error of sorts. essentially, the cRIO was not getting a confirmation of initial setup from the black jag, or other jaguar- I forget exactly which. Anyway, we went into the code for initializing a 4motor robot drive system. and modified it such that it bypassed this error point (removing CAN-Recieve.vi). Then it worked perfectly. So my guess is that you may be able to do something similar in C++.
That a great point... I forgot to ask if the robot was enabled when you got this error. The current image (v19) will not cause a reply if the robot is disabled. This means that, for the moment, you can't call any "Set" commands while the robot is disabled without an error. This will be addressed in the next update. It won't cause any trouble (the way the C++ library is written), but it will create some errors on the DS. As ChristopherBuck noted, in LabVIEW it is written with status chaining so one of these errors will prevent it from working from then on.
Reply With Quote
  #9   Spotlight this post!  
Unread 24-01-2010, 01:52
Dale's Avatar
Dale Dale is offline
Head Coach & Mentor
AKA: Dale Yocum
FRC #1540 (Flaming Chickens)
Team Role: Coach
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Portland, OR
Posts: 499
Dale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud of
Re: Black jaguars: not working

We do have the 100 ohm terminator in place. We know the Jaguars only have TX and RX but I wasn't clear whether the cRIO needed to have the other handshake lines jumpered at it's end. ellisk will have to answer about the robot being enabled.

They were trying a 2CAN ethernet adapter when I left the lab tonight to see if that yields better results. We'd still like to get the "official" RS-232 solution working though.
__________________
2016 PNW Championship Chairman's; 2016 Winner Oregon City District, 2015 PNW Championship Chairman's; 2015 PNW District Engineering Inspiration; 2015 PNW District Finalist; 2014 PNW Championship Chairman's; 2014 Championship Innovation in Controls; 2013 Chairman's (Oregon); 2013 Finalist (OKC); 2012 Winner (OKC); 2012 Chairman's (OKC); 2012 Woody Flowers (Oregon); 2011 Volunteer of the Year (Oregon); 2011 Finalist & Captain (San Diego); 2011 Innovation in Control (San Diego); 2010 & 2007 Chairman's (Oregon); 2010 Regional Champions (Colorado); 2010 Innovation in Control (Colorado); 2009 & 2008 Engineering Inspiration (Oregon); 2008 Regional Champions (Oregon); 2007 Regional Finalist (Oregon); 2005 Rookie Inspiration (PNW)
Reply With Quote
  #10   Spotlight this post!  
Unread 24-01-2010, 02:31
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Black jaguars: not working

Quote:
Originally Posted by Dale View Post
We know the Jaguars only have TX and RX but I wasn't clear whether the cRIO needed to have the other handshake lines jumpered at it's end.
The cRIO does support hardware flow control, but it's disabled by default and the BlakJagBridgePlugin does not enable it.

-Joe
Reply With Quote
  #11   Spotlight this post!  
Unread 25-01-2010, 13:05
Bryscus's Avatar
Bryscus Bryscus is offline
EE, CpE
AKA: Bryce B.
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 1999
Location: Jupiter, FL
Posts: 173
Bryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud of
Re: Black jaguars: not working

Quote:
Originally Posted by ellisk View Post
Yes, we've tried the other suggestions. The cable is fine, it's plugged in on the left, there is a 100 ohm resistor on the left jack, and I can see the driver loading on the console when the cRIO boots.
I have been having an issue with intermittent signals getting to the Jags. We currently have updated the firmware on both Jags connected (One black and one gray each with its respective firmware update) through the RS232 port on the cRio. There is a 100 ohm termination resistor inside the DB9 shield between CANL and CANH (the green and red wires). There is a 6 pin cable running from the RS232 to CAN inverter to the LEFT port of the black Jag. I have then tried both a 4pin and 6pin cable from the RIGHT port of the black Jag to the LEFT port of the gray Jag (just to see if I had made a bad cable). I then created a short Termination cable that only has a 100ohm resistor between the green and red wires. This short cable is plugged into the RIGHT port of the Gray Jag. I have tried communications with and without this termination cable and get similar results.

If I just send the Jags a constant max output value, they will run and then sputter, and then run, yada yada yada. It sounds as if I have a physical layer problem - i.e., signals not propagating properly.

Also, I have obviously been able to connect with BD-COM to assign IDs and re-flash the firmware...


So my questions are:

Should the termination resistor be on the cable at the LEFT port of the Gray Jag, or is it correct the way I have it?

Has anyone else been able to get a connection, but suffers from intermittent signal loss?

- Bryce

P.S. I have attached some pictures of errors that I am receiving in the NetConsole.

P.S.S. This is somewhat of a bummer, because I have written code to make use of the Speed and Position modes, but can't test it until I at least have a reliable communication interface...
Attached Thumbnails
Click image for larger version

Name:	CAN Problem - Black Jag.JPG
Views:	51
Size:	88.6 KB
ID:	8381  Click image for larger version

Name:	CAN Problem.JPG
Views:	29
Size:	85.1 KB
ID:	8382  
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote
  #12   Spotlight this post!  
Unread 25-01-2010, 13:33
Dale's Avatar
Dale Dale is offline
Head Coach & Mentor
AKA: Dale Yocum
FRC #1540 (Flaming Chickens)
Team Role: Coach
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Portland, OR
Posts: 499
Dale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud of
Re: Black jaguars: not working

It may not be your problem, but we ordered a RJ11 cable tester to test our CAN cables. We have 9 Jaguars on our board and can't have one of those cables being marginal if we can help it! You can get one for anywhere between $7 and $100+.

We still don't have our first Jaguar working on CAN so we'll see if we get to use that spiffy tester. For what it's worth we're getting this one because of it's good reviews and middle range price.
__________________
2016 PNW Championship Chairman's; 2016 Winner Oregon City District, 2015 PNW Championship Chairman's; 2015 PNW District Engineering Inspiration; 2015 PNW District Finalist; 2014 PNW Championship Chairman's; 2014 Championship Innovation in Controls; 2013 Chairman's (Oregon); 2013 Finalist (OKC); 2012 Winner (OKC); 2012 Chairman's (OKC); 2012 Woody Flowers (Oregon); 2011 Volunteer of the Year (Oregon); 2011 Finalist & Captain (San Diego); 2011 Innovation in Control (San Diego); 2010 & 2007 Chairman's (Oregon); 2010 Regional Champions (Colorado); 2010 Innovation in Control (Colorado); 2009 & 2008 Engineering Inspiration (Oregon); 2008 Regional Champions (Oregon); 2007 Regional Finalist (Oregon); 2005 Rookie Inspiration (PNW)

Last edited by Dale : 25-01-2010 at 13:57. Reason: Removed for incorrect info on single terminators
Reply With Quote
  #13   Spotlight this post!  
Unread 25-01-2010, 13:46
Mike Copioli's Avatar
Mike Copioli Mike Copioli is offline
You make it pretty We make it dance
no team (Retired(3539, 217))
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2001
Location: Romeo
Posts: 453
Mike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond repute
Re: Black jaguars: not working

Quote:
Originally Posted by Dale View Post
There should be just one terminator...at the end of the chain. Have a terminator inside the shell of the DB9 defeats the purpose of reducing reflections. See this article.
Two 120 ohm resistors are required on a CAN bus. One at each end of the BUS. The 2CAN contains one of the resistors internally that can be removed via a jumper. The second jumper needs to be placed by the user. My suggestion is to use the second RJ-11/12 connector on the Jag for this. I do not know if the Jaguar has an internal 120 ohm resistor or not. Maybe Scott Emley can answer this. If it does not, you will need to place one at the beginning of the BUS as well.
__________________
Mike Copioli
CTRE Hardware Engineer
http://www.ctr-electronics.com

Team 3539 The Byting Bull Dogs
2013 Michigan State Champions
Team 217 The Thunder Chickens
2006 World Champions
2008 World Champions
2009 Michigan State Champions
Reply With Quote
  #14   Spotlight this post!  
Unread 25-01-2010, 13:56
Dale's Avatar
Dale Dale is offline
Head Coach & Mentor
AKA: Dale Yocum
FRC #1540 (Flaming Chickens)
Team Role: Coach
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Portland, OR
Posts: 499
Dale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud of
Re: Black jaguars: not working

I stand corrected on the terminator! In re-reading page 29 of the Jaguar BDC24 getting started guide it clearly says you need a 100 ohm resistor at both ends. I wonder if that's our problem with getting the Jaguars to work via CAN! It would seem unlikely given that we only have one Jaguar in our test setup but it's certainly worth a try.
__________________
2016 PNW Championship Chairman's; 2016 Winner Oregon City District, 2015 PNW Championship Chairman's; 2015 PNW District Engineering Inspiration; 2015 PNW District Finalist; 2014 PNW Championship Chairman's; 2014 Championship Innovation in Controls; 2013 Chairman's (Oregon); 2013 Finalist (OKC); 2012 Winner (OKC); 2012 Chairman's (OKC); 2012 Woody Flowers (Oregon); 2011 Volunteer of the Year (Oregon); 2011 Finalist & Captain (San Diego); 2011 Innovation in Control (San Diego); 2010 & 2007 Chairman's (Oregon); 2010 Regional Champions (Colorado); 2010 Innovation in Control (Colorado); 2009 & 2008 Engineering Inspiration (Oregon); 2008 Regional Champions (Oregon); 2007 Regional Finalist (Oregon); 2005 Rookie Inspiration (PNW)
Reply With Quote
  #15   Spotlight this post!  
Unread 25-01-2010, 14:05
Bryscus's Avatar
Bryscus Bryscus is offline
EE, CpE
AKA: Bryce B.
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 1999
Location: Jupiter, FL
Posts: 173
Bryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud of
Re: Black jaguars: not working

Quote:
Originally Posted by Dale View Post
I stand corrected on the terminator! In re-reading page 29 of the Jaguar BDC24 getting started guide it clearly says you need a 100 ohm resistor at both ends. I wonder if that's our problem with getting the Jaguars to work via CAN! It would seem unlikely given that we only have one Jaguar in our test setup but it's certainly worth a try.
Dale,

The instructions in the Getting Started Guide show a 100 ohm connected between red and green (CAN_L and CAN_H) inside the RS-232 to CAN converter. If you did this, you should have the proper termination.

- Bryce

P.S. I wonder if the termination needs to occur closer the the black jag than at the converter. Our cable is only 5 inches or so, but maybe even that is too long?
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial to CAN Gateway in new Black Jaguars? dmcguire3006 Electrical 54 26-01-2010 07:32
Jaguars arent working yoavh360 Electrical 6 19-01-2010 17:20
Victors and Jaguars not Receiving Signal? excel2474 Electrical 1 12-02-2009 16:41
jaguars suddenly not working Mr. E Technical Discussion 1 07-02-2009 21:09
Jaguars working with 2.4 Ghz R/C NOV8R Technical Discussion 0 09-01-2009 16:15


All times are GMT -5. The time now is 12:25.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi