We have been trying to fix this code for a couple weeks with no luck. We have gotten the error code 44007 at <LOCATION>Teleop.vi<CALLSTACK>Teleop.vi.
Here is a link to our robot project file if anyone could help it would be greatly appreciated.
https://drive.google.com/drive/folders/1Gvxl5oqNq0Of-icwQ53PqFjJFk0dOf6-?usp=sharing
Depending on which of the two projects you are talking about,
2017 Robot Project - Experimental or 2017 Robot Project,
you are using Agitator and Shooter in Teleop, when they have been commented out in Begin.
So the mechanisms don’t exist as far as Teleop can tell.
As a side note, your projects are pulling vi’s from non-project locations, so it’s not complete when you share it,
e.g., ButtonToToggle.vi, AutoPiston.vi, etc.
I fixed what you had mentioned and it deployed without any errors but when I moved the joystick axis and pressed the buttons the talens did not respond. What is the likely the issue?
Your code looks fine as far as the Talons are concerned.
It might just be where you have the Gamepad assigned.
What kind of Gamepad are you using-it looks like an xbox controller?Your code says that the Gamepad is in the second USB slot on the Driver Station (USB 1).
Since things are counted beginning with zero, with the GamePad at USB 1 that’s the second position in the Driver Station.
Look on the Driver Station *USB Devices *tab (see attached image- your GamePad should show up where I have the MadCatz).
You can click and drag the devices on the Driver Station to reposition them.
That makes sense. We are using a Logitech controller similar to an Xbox controller. I will try that tomorrow. I have been trying to learn the basics of coding since our programmer hasn’t been able to work on it lately so your help is greatly appreciated.
Be aware that Logitech F310 gamepad has two modes.
There is a light on the front that should be off.
There is a switch on the back that puts it into xBox emulator mode (light off) or Dual Action mode (light on).
It just changes some of the mapping-both mappings are diagrammed here in this pdf.
Here’s a button diagram for it if it helps visualize how the axis/button mapping is in code.
I tried switching what port the controller was plugged into and programmed for earlier today and did not get the talens to respond. I will try again later and make sure the light is off and the controller is on the right setting.
I made sure the controller was in the right mode and even tried the other modes just because. I still didn’t get a response from the talens so I am going to see if our old programmer that programmed this robot can come in and look at it.
Couple things I can tell you:
Your button to toggle VI is messed up - it assumes that each instance will act independently, but is set up for shared memory. (I’ll attach my tester VI where you can run and see how this causes all instances to flicker).
One solution is to set that VI to be Reentrant execution (in the VI Properties that you can get to through right clicking on the icon, or in the file menu when viewing that VI).
https://i.imgur.com/5ATwshr.png
On the other hand, you could replace it using “Button-on Button-off setup” here: https://frclabviewtutorials.com/memory-library/ (this uses the memory VI’s that are attached to the page.
https://frclabviewtutorials.com/memory-library/images/buttonOnButtonOff.png
Beyond that:
From Begin - Left should be PWM 0 and Right should be PWM 1
Double check on the driver station, once you’ve got the above worked out, you should be able:
- Go to the usb tab
- select the controller in the second slot
- and see the joysticks correspond to the graph
As currently programmed, Axis 1 is the left, Axis 5 is the right.
Slow mode is set/unset with button 3.
PM me and I’ll send you my personal contact info - you could clean this up a lot by using the OpenTwo motors and the TankDrive vi’s.
testToggle.vi (4.76 KB)