Go to Post 99.9999% of the FIRSTers are really nice - Denman [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-01-2012, 20:20
jp1247's Avatar
jp1247 jp1247 is offline
No the cRio does not like aluminum!
FRC #1247 (ROK BOT)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: New Hampshire
Posts: 60
jp1247 is an unknown quantity at this point
cRIO serial-CAN no signal

Good evening members of CD,

This year our team decided we would go down the CAN route, enticed by the features offered by it. Originally turned down by the 200 dollar 2CAN, we discovered we could do CAN cheaper with the serial port on the cRio. I have been heading up the change over to CAN. I have updated the firmware of all the Jaguars we are using (3 black ones and 1 tan) to version 101 with BDC-COMM via the usb to DB-9 serial to rj11 adapter that we got in the KOP this year. I can manually control each one though the CAN bus into my computer (all the lights are solid yellow when i open BDC-COMM, and i can set the voltages/current etc). The problem is, plugging the serial to rj-11 adpater into the cRIO's serial port, the jaguars still indicate no signal. I have formatted our 8-slot cRIO for Java with the newest 2012 (v43) firmware including the serial CAN plugin.

Any help would appreciated on this. This is also my first post, so tell me if there is anything i should know next time i post.

Thanks
Reply With Quote
  #2   Spotlight this post!  
Unread 21-01-2012, 22:41
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,560
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: cRIO serial-CAN no signal

Did you turn off the console out dip switch?
Reply With Quote
  #3   Spotlight this post!  
Unread 21-01-2012, 23:51
jp1247's Avatar
jp1247 jp1247 is offline
No the cRio does not like aluminum!
FRC #1247 (ROK BOT)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: New Hampshire
Posts: 60
jp1247 is an unknown quantity at this point
Re: cRIO serial-CAN no signal

Yes I did, if i recall correctly, the 2012 cRIO imaging tool made me set the DIP switch to off before it would allow me to add the serial to CAN plug-in.
Reply With Quote
  #4   Spotlight this post!  
Unread 22-01-2012, 00:08
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: cRIO serial-CAN no signal

Quote:
Originally Posted by jp1247 View Post
Good evening members of CD,

This year our team decided we would go down the CAN route, enticed by the features offered by it. Originally turned down by the 200 dollar 2CAN, we discovered we could do CAN cheaper with the serial port on the cRio. I have been heading up the change over to CAN. I have updated the firmware of all the Jaguars we are using (3 black ones and 1 tan) to version 101 with BDC-COMM via the usb to DB-9 serial to rj11 adapter that we got in the KOP this year. I can manually control each one though the CAN bus into my computer (all the lights are solid yellow when i open BDC-COMM, and i can set the voltages/current etc). The problem is, plugging the serial to rj-11 adpater into the cRIO's serial port, the jaguars still indicate no signal. I have formatted our 8-slot cRIO for Java with the newest 2012 (v43) firmware including the serial CAN plugin.

Any help would appreciated on this. This is also my first post, so tell me if there is anything i should know next time i post.

Thanks
I don't know how much help this is, but I understand the C++ code is similar to the Java stuff. Make sure you use the CANJaguar class instead of the Jaguar class and also be sure to instantiate the CANJaguar object with the ID of the Jag you want to control. You should have set unique values for each Jag when you reprogrammed them.

Other than that, they are called exactly the same way (when in open-loop mode) as the Victor and Jaguar objects. And obviously you need to use a Black Jag as the first device. When you enable the lights should be steady.

- Bryce
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote
  #5   Spotlight this post!  
Unread 22-01-2012, 00:14
jp1247's Avatar
jp1247 jp1247 is offline
No the cRio does not like aluminum!
FRC #1247 (ROK BOT)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: New Hampshire
Posts: 60
jp1247 is an unknown quantity at this point
Re: cRIO serial-CAN no signal

Thank you for the quick reply. Yes, there is a black jaguar being used as the CAN initializer. I have each jag set to a specific ID, and thanks to my mentor they have nice labels too. The java code I have creates 4 CANJaguars, then initializes them, along with RobotDrive in a try statement to catch the exceptions. I suppose the question i have is, does the code actually create the communications between cRIO and jaguars? I have an error free deployed code, but the light on the jags continue to blink yellow (no signal).
__________________
"No, you can't use the Kinect to do pelvic thrusts."
Reply With Quote
  #6   Spotlight this post!  
Unread 22-01-2012, 08:50
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
Quote:
Originally Posted by jp1247 View Post
I suppose the question i have is, does the code actually create the communications between cRIO and jaguars? I have an error free deployed code, but the light on the jags continue to blink yellow (no signal).
Yes, it creates the communication. You use it just like the other objects after instantiation for open loop control. Start simple. Try using just one Jaguar to start with and set it to a constant value. Reuse the cable you made for programming the Jags to be sure that isn't a problem.

Does your Allen Bradley signal light blink? They moved the modules this year (not sure if other stuff is working). You also need to make sure the switch on the cRIO is set to off for the console. Check NetConsole for error messages.

C++ code

CANJaguar m_motor(5);
m_motor.Set(0.1);

Pretty simple most of the time. Or:

CANJaguar *m_motor;

m_motor = new CANJaguar(5);

m_motor->Set(0.1);

I think you have to use the latter to pass to RobotDrive...

- Bryce
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote
  #7   Spotlight this post!  
Unread 22-01-2012, 10:12
jp1247's Avatar
jp1247 jp1247 is offline
No the cRio does not like aluminum!
FRC #1247 (ROK BOT)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: New Hampshire
Posts: 60
jp1247 is an unknown quantity at this point
Re: cRIO serial-CAN no signal

I don't actually recall if our signal light blinks, it's half hidden at the top of our bot. I know the modules are correct, I had the robot driving on PWM second day of the season with new firmware and such. I will try with just one jaguar today, and see if I can get any results. I will be with robot today until about 4 pm EST if there any specific questions that you want me to answer.
Thanks.
__________________
"No, you can't use the Kinect to do pelvic thrusts."
Reply With Quote
  #8   Spotlight this post!  
Unread 22-01-2012, 11:06
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
Working 'bot suggests it's probably a code issue somewhere. The best thing to do at this point may just be to check the NetConsole for feedback. The CANJaguar class loves to throw errors to the netConsole, so if there's a problem it will tell you. Do others things work when you try this? Maybe use one on PWM and another on CAN and just tie each one to a joystick axis rather than using the RobotDrive class. Or even simpler, just put in hard values.
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote
  #9   Spotlight this post!  
Unread 22-01-2012, 16:39
jp1247's Avatar
jp1247 jp1247 is offline
No the cRio does not like aluminum!
FRC #1247 (ROK BOT)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: New Hampshire
Posts: 60
jp1247 is an unknown quantity at this point
Re: cRIO serial-CAN no signal

Thanks for all the feedback guys. I got it working today, it was a matter of not enabling the CANJaguars with CANspeedcontroller.enableControl(). Everything works now and we have a successful open loop mecanum drive system. We also have a closed loop system that works pretty well also (current mode).

Thanks for all the help.
__________________
"No, you can't use the Kinect to do pelvic thrusts."
Reply With Quote
  #10   Spotlight this post!  
Unread 22-01-2012, 16:58
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
Good to hear!
__________________
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


All times are GMT -5. The time now is 02:54.

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