Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Help! Labview manipulator code doesn't function! (http://www.chiefdelphi.com/forums/showthread.php?t=113590)

jli42533 15-02-2013 20:01

Help! Labview manipulator code doesn't function!
 
1 Attachment(s)
Hi guys,
My name is Jack and I am the programmer for team 867.
I am writing code for our manipulator system. However, the only motor that functions when I run the code is "VexMotor".

As far as I know, the all the USB ports and PMW ports are correct.
Here is a list of what I want the code to do and what actually happens:
Press button one: VexMotor runs backwards - this works
Press button two: WindowMotor runs backwards - nothing happens
Press button three: WindowMotor runs forwards - nothing happens
Press button four: FasterMotor runs forwards - nothing happens
Press button five: SlowerMotor runs forwards - nothing happens
Press button six: Pneumatic system pushes - not connected at the time when I tested the code

SlowerMotor and FasterMotor are both Jaguars
WindowMotor and VexMotor are both Victors

I have attached a picture of my code.

Does anybody have an idea of why the program isn't functioning correctly?

Mark McLeod 15-02-2013 20:14

Re: Help! Labview manipulator code doesn't function!
 
1 Attachment(s)
You used a Refnum Set in Teleop
It should be a Refnum Get

Example


nicholsjj 16-02-2013 00:50

Re: Help! Labview manipulator code doesn't function!
 
Mark could you explain how the vex motor could then work? I had an issue like this once and didn't believe I had put in the set instead get just because one of the buttons had worked.

Mark McLeod 16-02-2013 01:22

Re: Help! Labview manipulator code doesn't function!
 
I just pointed that out because it's an obvious error. Use of the Set instead of the Get is causing extra work, because it keeps replacing the Refnum entry 50 times a second for Joystick 3. I don't know what grief that might be causing elsewhere, but I suppose it could be suffering from a propagation delay. At the least it's probably wiping out the Joystick cache.

For debugging you can run Test mode from the Driver Station to see if all the devices show up on the Dashboard Test tab, and from there you can test each of them by clicking on "value", then using the control that appears at the bottom of the Test tab. That'll bypass the Joystick to remove it from consideration (or point to it as the culprit).
P.S.
You can also watch the Joystick buttons being pressed, so you can be sure the Joystick is working normally.

BTW, the button operating the solenoid should light a status LED on the Solenoid Breakout if it's working. You don't need the pneumatic system to see if that's responding properly.

nicholsjj 16-02-2013 01:36

Re: Help! Labview manipulator code doesn't function!
 
Quote:

Originally Posted by Mark McLeod (Post 1234207)
I just pointed that out because it's an obvious error. Use of the Set instead of the Get is causing extra work, because it keeps replacing the Refnum entry 50 times a second for Joystick 3. I don't know what grief that might be causing elsewhere, but I suppose it could be suffering from a propagation delay. At the least it's probably wiping out the Joystick cache.

For debugging you can run Test mode from the Driver Station to see if all the devices show up on the Dashboard Test tab, and from there you can test each of them by clicking on "value", then using the control that appears at the bottom of the Test tab. That'll bypass the Joystick to remove it from consideration (or point to it as the culprit).

BTW, the button operating the solenoid should light a status LED on the Solenoid Breakout if it's working. You don't need the pneumatic system to see if that's responding properly.

Thanks Mark, So the reference would just be called in teleop. So that smaller motors such as a vex (or in my case it was a FP) would then execute but the large CIM's wouldn't receive a steady impulse long enough to run.

Mark McLeod 16-02-2013 01:46

Re: Help! Labview manipulator code doesn't function!
 
It wouldn't be a long/short pulse issue. The actual PWM signal is generated by the FPGA. The Motor Sets are just passing their requests to the FPGA.
It might be more along the line of the new joystick entry starts getting populated in parallel with Teleop from the last command packet and it only gets as far as the axis and button 1 before Teleop has read past the data and is getting zeros for the rest of the unpopulated fields.

But then again, until you test everything, it could also be a broken joystick.

jli42533 16-02-2013 13:29

Re: Help! Labview manipulator code doesn't function!
 
Hi, thanks for responding Mark.
I have fixed the set to get. However, my original problem still persists.
I believe the joystick is working because when I was running the code in driverstation, the joystick button would light up whenever a button is pressed. However, there would still be no response.
Can you give me more details about the new joystick reading and command bracket thing?


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

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi