FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO-FRC Training Video: Joystick Motor Control in 10 Minutes!

gattu wrote:

PLease find the document attached  and let me know if there is any error in it.

Thank you

Gattu

Gattu,

I can see from you code that have turned off the user watchdog, but I want to ensure the system watchdog is being fed.  If the system or user watchdog has been killed there is a flashing LED on the digital sidecar indicating this.

If all of the physical network connections are correct the system watchdog will still not be fed if any of the IP addresses of the different system components are incorrect.  I have seen this several times when we have set the team number on the Driver Station, but the IP address of the computer and/or cRIO do not match (for example the team number on Driver Station = 555 and the cRIO or computer's IP is set to 10.0.0.2 and 10.0.0.6 respectively).


-Mark

Mark
NI App Software R&D
0 Kudos
Message 21 of 35
(1,146 Views)

Hello Mark

I can see the LED of the side car Blinking green. I tried to configure everything as per the nstruction of chapter 5 from the FIRST website. Can you pleae tell me the difference between the watchdog timers. The user and system types. How do i overcome the digital side car blinking.

Thank you

Srinivas

0 Kudos
Message 22 of 35
(1,146 Views)

gattu,

Here is a brief description of the differences between the User and System watchdog.  We are in the process of developing a more detailed document.  I will post a link to it as soon as it is published.

System

This is a watchdog build into the FPGA that is fed TCP packets sent from the driver station to the cRIO-FRC.  If anything disrupts the connection between the DS and the cRIO (such as a loss of wireless network connection) the FPGA turns off all PWM and actuator outputs.  This immediately stops the robot and prevents a run-away robot.  Teams do not have any way to access or modify this watchdog.

User

The user watchdog is made up of a collection of VIs that can be found in the Functions Palette at WPI Robotics  » Utilities » Watchdog.  I recommend looking at the LabVIEW Help for the specifics about each of the VIs that make up the Watchdog palette.  If the User Watchdog is killed it, like the system watchdog, it immediately turns all motors and actuators.  An example of using this might be checking an accelerometer to see if your robot has flipped over and killing the watchdog if it has.

For troubleshooting watchdog issues I recommend the following steps.

  1. Check all of your network connectuions.  The simplest way to do this is to see if you can connect to you cRIO in LabVIEW.  Its always possible one of your network cables came loose without anyone noticing.
  2. Make sure the IP address of the cRIO matches the team number set on the driver station.  Configuring the component IP addresses
  3. Explicitly turn off the user watchdog in your LabVIEW code (I believe you have already done this, but I would double check).

This list is in no ways exhaustive.  Does anyone in the community have any other troubleshooting suggestions?

Cheers,

Mark

Mark
NI App Software R&D
0 Kudos
Message 23 of 35
(1,146 Views)

Hello Mark

I appreciate you help.I will start the troubleshooting as soon as possible.

Thank you

Gattu

0 Kudos
Message 24 of 35
(1,146 Views)

Gattu,

We've posted a document on Watchdogs.  Let me know if you have any more questions. 

Cheers,

Mark

Mark
NI App Software R&D
0 Kudos
Message 25 of 35
(1,146 Views)

We think we have faithfully followed the Video up through the end of the first section, using a Numeric Input to control a motor.

Everything looks great, but motor doesn't turn.

If we Highlight Execution, we see happy lumps traveling down wire to the Motor/Set Speed VI.

If we double click the Set Speed vi, the faceplate that comes up shows no errors and a Speed that matches the Numeric Input Control.

We are pretty sure things are wired up and IP'd right, because it worked with the out of box stuff and with a C++ program we wrote.

What are some good debugging techniques?

How can we see why things aren't coming out on PWM?

Other Data points:

We are using a Jaguar instead of Victor as in the video.

The Yellow LED is blinking (which we think means no PWM signal).

3 solid green LED's on the digital sidecar (Bat, 5V, 6V)

Battery voltage is correctly reported on Driver Station.

Thanks in advance for thoughts, tips, suggestions.

0 Kudos
Message 26 of 35
(1,146 Views)

Can anyone identify the axis on the Joystick?  The joystick vi implies 6 axis, but, all the examples only define the X and Y axis (i.e. forward/back and left/right).  Thanks,Bill

0 Kudos
Message 27 of 35
(1,146 Views)

DavidFort wrote:

We are pretty sure things are wired up and IP'd right, because it worked with the out of box stuff and with a C++ program we wrote.

What are some good debugging techniques?

How can we see why things aren't coming out on PWM?

Other Data points:

We are using a Jaguar instead of Victor as in the video.

The Yellow LED is blinking (which we think means no PWM signal).

3 solid green LED's on the digital sidecar (Bat, 5V, 6V)

Battery voltage is correctly reported on Driver Station.

Thanks in advance for thoughts, tips, suggestions.

Did you set the controller to the LabVIEW development environment after switching from C++ to LabVIEW?  This is done with the cRIO Imaging Tool.  If you have not done this you will not be able to successfully run your code on the cRIO.  In the attached screenshot I have highlighted the radio button where you select your development environment.  Click on the LabVIEW radio button and click on Apply.  You should not have to format the controller.

Please let me know if this helps.

Cheers,

Mark

Mark
NI App Software R&D
0 Kudos
Message 28 of 35
(1,146 Views)
Did you set the controller to the LabVIEW development environment aftering swtiching from C++ to LabVIEW.

Yes, pretty sure we did this.  After using the WindRiver/Eclipse stuff, we turned on Labview and ran the "template" project with no changes, and it seemed to work (although I suppose it is possible it was really the C++ flavor running).

Is there a way to Read the LabView/C++ configuration out of the cRIO controller?

If the VI Block Diagram animates when you Run it, does that mean it is really running?

0 Kudos
Message 29 of 35
(1,146 Views)

Bill_801 wrote:

Can anyone identify the axis on the Joystick?  The joystick vi implies 6 axis, but, all the examples only define the X and Y axis (i.e. forward/back and left/right).  Thanks,Bill

The best place for an explanation of these is in the LabVIEW help.  You can find an explanation of these values by mousing-over the GetRawValue VI in the Joystick palette with Context Help turned on (Help » Show Contect Help), and then clicking on the Detailed help link in the Context help window.  Alternatively you can find this help document by navigating in the LabVIEW help to  VI and Function Reference » FIRST Robotics Competition VIs » WPI Robotics Library VIs » Driver Station VIs » Joystick VIs »  GetRawValue VI.

I hope this helps,

Mark

Mark
NI App Software R&D
0 Kudos
Message 30 of 35
(1,146 Views)