Go to Post Welcome to FIRST, the place where you can be competitive in a team. Here people can learn more in one year of FIRST than in four years of high school. - dude__hi [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 19-01-2011, 00:46
duane's Avatar
duane duane is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 98
duane is an unknown quantity at this point
Send a message via AIM to duane
CAN Installation Details

We are having trouble with CAN controlling a motor with the cRio. When the same serial connector is connected to the computer directly and using BDC-COMM, the Jaguar and motor work fine. That seems to eliminate wiring.

We have assigned a different address to the Jaguar (10).

We have updated the Jaguar firmware to v.92.

We get error -52007 on the CANReceive.vi. (could be spelled wrong).

I'm concerned that we have not updated all the pieces properly.

The FirstForge website now says that the CAN LabView components and drivers are all Obsolete. All of the files are now supposed to be part of the regular distribution.

What does that mean and how are all of the pieces installed?

The cRio needs the CAN driver? Is that included with the 2011 update for the cRio?

CAN vi's for LabView are obviously required. Are those installed by default? We are using the vi's that are in the "User VIs" section. We found other VIs under WPI. Which should we be using?

We can we find details or project examples.

Thank you for the help,
...Duane
__________________
Duane Murphy
Mentor - Software
Vanden Vikings FIRST Team 701
http://www.vandenrobotics.com
Reply With Quote
  #2   Spotlight this post!  
Unread 19-01-2011, 08:17
Bot190's Avatar
Bot190 Bot190 is offline
Registered User
FRC #0166 (ChopShop)
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Merrimack NH
Posts: 105
Bot190 will become famous soon enough
Re: CAN Installation Details

Everything necessary for the use of CAN is included in the updates. When the imaging tool is installed, BDC-Comm and the latest firmware versions are also installed. Then, when you go to reimage your cRIO, there is a new option for the CAN plugins. The language update includes the CAN library.

Make sure you have reimaged your cRIO.

I don't use labview so I can't help you with that part.
__________________

Reply With Quote
  #3   Spotlight this post!  
Unread 19-01-2011, 11:39
duane's Avatar
duane duane is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 98
duane is an unknown quantity at this point
Send a message via AIM to duane
Re: CAN Installation Details

Quote:
Originally Posted by Bot190 View Post
Everything necessary for the use of CAN is included in the updates. When the imaging tool is installed, BDC-Comm and the latest firmware versions are also installed. Then, when you go to reimage your cRIO, there is a new option for the CAN plugins. The language update includes the CAN library.

Make sure you have reimaged your cRIO.

I don't use labview so I can't help you with that part.
Thanks Bot190.

I don't understand part of this statement "When the imaging tool is installed, BDC-Comm and the latest firmware versions are also installed."

I need more reference. I don't understand which imaging tool you are referring too. Is this the cRio imaging tool? Is BDC-COMM the application or the firmware drivers?

It seems that details are important in this case.
__________________
Duane Murphy
Mentor - Software
Vanden Vikings FIRST Team 701
http://www.vandenrobotics.com
Reply With Quote
  #4   Spotlight this post!  
Unread 19-01-2011, 22:14
Bot190's Avatar
Bot190 Bot190 is offline
Registered User
FRC #0166 (ChopShop)
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Merrimack NH
Posts: 105
Bot190 will become famous soon enough
Re: CAN Installation Details

Sorry, Yes, by imaging tool I was referring to the cRIO Imager. I don't remember which update it came with, but when it's installed BDC-COMM, the firmware, and some documentation. It used to be put in Public documents, but it might be put in the installing users documents folder.

I assume you know that you use BDC-Comm to load the firmware onto the jaguars? They need to be running version 92 to be used with Image v25 on the cRIO.
__________________

Reply With Quote
  #5   Spotlight this post!  
Unread 19-01-2011, 22:54
duane's Avatar
duane duane is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 98
duane is an unknown quantity at this point
Send a message via AIM to duane
Re: CAN Installation Details

Thank you. That makes more sense.

We updated the Jaguars to v92 and the cRio is using v25.

What is left is which CAN vi's we should be using. I get the idea that we are using last years vi's because they are in the "User Library" section of the LabView.

We need to figure out where the correct VIs to use are.

Right now we are just trying to do basic a SetSpeed on the Jaguars. Not driving yet.

Suggestions?
__________________
Duane Murphy
Mentor - Software
Vanden Vikings FIRST Team 701
http://www.vandenrobotics.com
Reply With Quote
  #6   Spotlight this post!  
Unread 20-01-2011, 12:50
Bot190's Avatar
Bot190 Bot190 is offline
Registered User
FRC #0166 (ChopShop)
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Merrimack NH
Posts: 105
Bot190 will become famous soon enough
Re: CAN Installation Details

As I said, i don't know much about labview but it would make sense to me that, the VIs in the user section are what you've added to the project. Given that, it would seem that they are the old version of the library. Try switching all the Can VI's for the ones from WPILib.
__________________

Reply With Quote
  #7   Spotlight this post!  
Unread 20-01-2011, 21:56
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: CAN Installation Details

Quote:
Originally Posted by duane View Post
What is left is which CAN vi's we should be using. I get the idea that we are using last years vi's because they are in the "User Library" section of the LabView.

We need to figure out where the correct VIs to use are.
The VIs you need to use are in vi.lib\Rock Robotics\WPI\. The VIs in user.lib are old and should no longer be used.

You should find them in the Robotics Library palette. Robot Drive and Actuators/Motor Control have integrated CAN support now.

-Joe
Reply With Quote
  #8   Spotlight this post!  
Unread 22-01-2011, 01:53
duane's Avatar
duane duane is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 98
duane is an unknown quantity at this point
Send a message via AIM to duane
Re: CAN Installation Details

Quote:
Originally Posted by jhersh View Post
The VIs you need to use are in vi.lib\Rock Robotics\WPI\. The VIs in user.lib are old and should no longer be used.

You should find them in the Robotics Library palette. Robot Drive and Actuators/Motor Control have integrated CAN support now.

-Joe
Thanks Joe! We found these today! We were quite happy to find that the Open Motor VI had an choice for CAN Jaguar! Woohoo. We used that VI into a while loop, into a SetOutput into a GetOutput out of the while loop and into a Close Motor. Downloaded to the cRio and .... nothin. Nada.

There are no errors indications. The error connections do not indicate any errors. The single Jaguar is still blinking yellow. :-(

I'm looking for suggestions on diagnosing the problem. We'll spend some more time on this tomorrow.

An example posted vi would be great to ensure that we are doing everything correctly. Without examples we are in the blind.

Thanks for your help!
__________________
Duane Murphy
Mentor - Software
Vanden Vikings FIRST Team 701
http://www.vandenrobotics.com
Reply With Quote
  #9   Spotlight this post!  
Unread 22-01-2011, 02:18
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: CAN Installation Details

The easiest test of your CAN network is enumeration. If you can enumerate the Jaguars, then your cabling works. (You can test this with the cRIO or with BDC-comm. Enumeration is in the functions pallette under "WPI Robotics Library">Communications>CAN. The BDC-comm enumerates automatically when you open it up - the Jaguars you can select from the drop-down menu are the ones it enumerated.)

If enumeration works on the cRIO, then the issue is probably the Jaguar firmware; the Jaguar firmware must be updated (using the BDC-COMM) for using CAN in FRC.
If enumeration works on the BDC-COMM, but not on your cRIO, then there's probably an issue with your CAN plugin, or your code.

Now, it's entirely possible that your CAN network and code is working correctly, and you are simply not enabled or do not have DS communication. Make sure you have a "StartCommunication" on your block diagram. (This can be found in the DriverStation subpallette of the "WPI Robotics Library" functions.)

EDIT:
You asked for an example. I have a repository with a default project modified to CAN here:
https://github.com/kamocat/ThunderTech_3213/tree/CAN
If you'd like something specific, you can upload your code or state exactly what you're testing.
__________________
-- Marshal Horn

Last edited by kamocat : 22-01-2011 at 02:26.
Reply With Quote
  #10   Spotlight this post!  
Unread 22-01-2011, 11:02
duane's Avatar
duane duane is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 98
duane is an unknown quantity at this point
Send a message via AIM to duane
Re: CAN Installation Details

Quote:
Originally Posted by kamocat View Post
Now, it's entirely possible that your CAN network and code is working correctly, and you are simply not enabled or do not have DS communication. Make sure you have a "StartCommunication" on your block diagram. (This can be found in the DriverStation subpallette of the "WPI Robotics Library" functions.)

EDIT:
You asked for an example. I have a repository with a default project modified to CAN here:
https://github.com/kamocat/ThunderTech_3213/tree/CAN
If you'd like something specific, you can upload your code or state exactly what you're testing.
Thank you for the pointers. We'll see if we can do an enumeration from the cRio. Enumeration works from BDC-COMM just fine with all the same connections.

Why is the DS communication required? We have a StartCommunication in the vi, but have not turned on or connected the DriverStation.

We're just trying to see if we can control a single motor. Seems like this should be pretty easy. :-)

Thank you for the examples, we'll give them a look. I'm concerned that the example expects an entire set of motors, etc. All we have connected to the cRio is one Jaguar and one motor. The idea was to demonstrate the minimum requirements for using the Jaguar.
__________________
Duane Murphy
Mentor - Software
Vanden Vikings FIRST Team 701
http://www.vandenrobotics.com
Reply With Quote
  #11   Spotlight this post!  
Unread 22-01-2011, 18:17
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: CAN Installation Details

Quote:
Originally Posted by duane View Post
Why is the DS communication required? We have a StartCommunication in the vi, but have not turned on or connected the DriverStation.

We're just trying to see if we can control a single motor. Seems like this should be pretty easy. :-)

Thank you for the examples, we'll give them a look. I'm concerned that the example expects an entire set of motors, etc. All we have connected to the cRio is one Jaguar and one motor. The idea was to demonstrate the minimum requirements for using the Jaguar.
The reason you need the driver station to test is the Jaguars have a safety system integrated that only allows them to operate when the driver station enables the robot. This way the robot can always be disabled from the driver station remotely.

-Joe
Reply With Quote
  #12   Spotlight this post!  
Unread 22-01-2011, 19:30
duane's Avatar
duane duane is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 98
duane is an unknown quantity at this point
Send a message via AIM to duane
Re: CAN Installation Details

Somehow, I didn't remember requiring the DS to be connected last year, but that was last year. Better notes this year for next year.

We had some success today and we have discovered at least one problem with the cRio. Ethernet port 2 does not work on the cRio. We cannot connect both the DS and the LabView computer at the same time. We have since connected Ethernet Port 1 to a hub and connected the both computers to the hub.

We can now download and run code from the LabView system after the robot is enabled with the DS.

However we are still having trouble with CAN. We can only address the first CAN Node. That is whatever CAN device is attached to the serial port works just fine. The other devices are not recognized (they continue to blink yellow).

Addressing the devices is a problem even with the BDC-COMM program. So it seems like wiring. We have gone through every possible combination of Jaguar, wire connection, and terminator. We've swapped all the different components (save the Jaguars) with parts from last years robot.

It seems like the serial to CAN translation is not occurring. The serial interface is working but the next device does not see any signal.

Is there any way to verify that the signal is on the bus?

We can get one Jaguar to work. Last year we had 10 all on CAN. I know this works. I must be missing something.
__________________
Duane Murphy
Mentor - Software
Vanden Vikings FIRST Team 701
http://www.vandenrobotics.com
Reply With Quote
  #13   Spotlight this post!  
Unread 22-01-2011, 19:41
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: CAN Installation Details

Port 2 on the cRIO is a separate NIC, and is on a separate subnet from port 1. You normally attach the camera to port 2, although if you have other devices that are supposed to be isolated to the robot, they can be connected via a hub. Port 1 is the outside port, and you should be able to have both the programming and DS laptops join the wireless AP on the robot. You can also wire both computer to the AP which is connected to port 1.

Greg McKaskle
Reply With Quote
  #14   Spotlight this post!  
Unread 22-01-2011, 19:51
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: CAN Installation Details

Quote:
Originally Posted by duane View Post
Somehow, I didn't remember requiring the DS to be connected last year, but that was last year. Better notes this year for next year.
It was required last year too.

Quote:
Originally Posted by duane View Post
We had some success today and we have discovered at least one problem with the cRio. Ethernet port 2 does not work on the cRio. We cannot connect both the DS and the LabView computer at the same time. We have since connected Ethernet Port 1 to a hub and connected the both computers to the hub.
Port 1 and Port 2 are on different networks. Both the deployment and the driver station packets need to be on the Port 1 network. You can use a camera or 2CAN or other Ethernet device on Port 2, just not the 2 functions you were trying.

Quote:
Originally Posted by duane View Post
However we are still having trouble with CAN. We can only address the first CAN Node. That is whatever CAN device is attached to the serial port works just fine. The other devices are not recognized (they continue to blink yellow).

Addressing the devices is a problem even with the BDC-COMM program. So it seems like wiring. We have gone through every possible combination of Jaguar, wire connection, and terminator. We've swapped all the different components (save the Jaguars) with parts from last years robot.

It seems like the serial to CAN translation is not occurring. The serial interface is working but the next device does not see any signal.
Make sure all your cables are straight through. Make sure you have 100 Ohm terminators installed. Make sure there aren't any shorts on the CAN bus (especially in the DB9 serial adapter).

Quote:
Originally Posted by duane View Post
Is there any way to verify that the signal is on the bus?
Sure, if you have a scope or a differential DAQ system.

-Joe
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 10:09.

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