FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding servos to the basic robot main.vi stops all devices

I need help with this. When I add any more devices such as more motors or servos, the code deploys but nothing will work.

The initial code that is supplied by creating a new basic project works just fine, but if I add another 2 motor drive and wire it to the joystick, the motors run until I hit the left most position on the Y axis (axis 1). All the motors stop at this point and I must disable and then enable the DS to get them to do the same thing over again.

When I add in and wire servos, nothing will run at all. When I remove the servos the initial 2 motor drive works.

Has anyone else run into this problem?
I have updated Labview, the DS, and the cRIO with the latest updates (version 3).
I can actually see the Joystick axes values and buttons change value and all the logic and math I've created for it shows me exactly what I expect when I probe the individual test points on their respective outputs.
I've attached the Basic Robot Main.vi if that will help with the trouble shooting.

Thanks,

Gary (Dude)
0 Kudos
Message 1 of 7
(8,417 Views)

Hi,

Are you ever reading from the global variables?  I noticed you write different references to each global at the same time, which means you cannot predict which reference you will get.  Any code which reads from those globals may have problems.

What happens when you run in highlight execution?  Debugging that way can be quite useful to see what is going on on your loop.

What happens with the robot status light on the digital sidecar?  Does it still indicate the watchdog is being fed?  Also, what happens to the lights on the jaguars?  Do they lose the PWM signal?

Regards,

JeremyB
Applications Engineer
National Instruments

Regards,

Jeremy_B

Applications Engineer
National Instruments
0 Kudos
Message 2 of 7
(3,075 Views)

I wasn't sure about the DevRefs for all the objects. I wasn't sure if I needed to create new ones for each one placed on the diagram. I will create new variables for each object (copy the devref from the objects' vi into the robot global.vi and then select the new one from the pick list for each one I create.) I haven't run in highlighted mode yet. I will try that tonight to see how the loop is working.

Yes, the watchdog is still being fed. The Jaguars do lose their PWM signal. I will work with the globals tonight and let you know how it goes.

I am a newbie to labview and don't know all of its idiosyncrasies. I have only been working with it for a few weeks.

Thank you, Jeremy, for your help.

TTFN,

Gary

0 Kudos
Message 3 of 7
(3,075 Views)

I found that the RSL light does not light up at all even when the default 2 motor code runs. On the Digital Sidecar the 5V led lights up but the 6V led never does with or without a servo wired to the sidecar or coded in LV. This problem is persistent.

Is there a jumper somewhere (other than the PWM 6V servo jumper) such as on the DS that the system needs? I am at my wits end here. Is there a possibility that the cRIO is malfunctioning? I have switched out the DIO module and the sidecar. Are all sidecars supposed to be connected for the system to work? All the modules are in the cRIO but we only have the one digital sidecar connected to slot 4. None of the other modules have anything connected to them.

Thanks,

Gary

0 Kudos
Message 4 of 7
(3,075 Views)

I found the problem. We have a bad Power Distribution module. It is putting out electrical noise on the 12V bus causing problems on with the cRIO.

Thanks for your help.

-Gary

0 Kudos
Message 5 of 7
(3,075 Views)

Wow, that doesn't sound good. How did you diagnose this noise? Did you get a new PD board and it solved the problem?

Stephen B
0 Kudos
Message 6 of 7
(3,075 Views)

Sounds like the resistance was possibly bad........probably a component problem.......however, scrapping for a new board is the way to go.

0 Kudos
Message 7 of 7
(3,075 Views)