Go to Post Every year, everyone reads too much into the hints given by Dave. - EricH [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-02-2013, 20:01
jli42533 jli42533 is offline
Registered User
FRC #0867
 
Join Date: Nov 2012
Location: United States of America
Posts: 2
jli42533 is an unknown quantity at this point
Help! Labview manipulator code doesn't function!

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?
Attached Thumbnails
Click image for larger version

Name:	Asking about codee.png
Views:	35
Size:	51.7 KB
ID:	14025  
  #2   Spotlight this post!  
Unread 15-02-2013, 20:14
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Help! Labview manipulator code doesn't function!

You used a Refnum Set in Teleop
It should be a Refnum Get

Example

Attached Thumbnails
Click image for larger version

Name:	Get-vs-Set.jpg
Views:	13
Size:	4.8 KB
ID:	14027  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 15-02-2013 at 20:32.
  #3   Spotlight this post!  
Unread 16-02-2013, 00:50
nicholsjj's Avatar
nicholsjj nicholsjj is offline
Registered User
AKA: John Nichols
no team (Devil Bots)
Team Role: Coach
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Murpyhsboro, IL.
Posts: 261
nicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant future
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.
__________________
2011-FRC Team 3862, Team Captain
2012-FRC Team 3862, Strategy Mentor
2013-FRC Team 3885, Programming Mentor, Razorback Regional, Curie Inspector
2014- FRC Team 3885, Programming Mentor, Arkansas Regional, Newton inspector
2015-??? Teacher Murphysboro High School


“They call it coaching but it is teaching. You do not just tell them…you show them the reasons.”- V. Lombardi

  #4   Spotlight this post!  
Unread 16-02-2013, 01:22
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 16-02-2013 at 01:47.
  #5   Spotlight this post!  
Unread 16-02-2013, 01:36
nicholsjj's Avatar
nicholsjj nicholsjj is offline
Registered User
AKA: John Nichols
no team (Devil Bots)
Team Role: Coach
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Murpyhsboro, IL.
Posts: 261
nicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant futurenicholsjj has a brilliant future
Re: Help! Labview manipulator code doesn't function!

Quote:
Originally Posted by Mark McLeod View Post
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.
__________________
2011-FRC Team 3862, Team Captain
2012-FRC Team 3862, Strategy Mentor
2013-FRC Team 3885, Programming Mentor, Razorback Regional, Curie Inspector
2014- FRC Team 3885, Programming Mentor, Arkansas Regional, Newton inspector
2015-??? Teacher Murphysboro High School


“They call it coaching but it is teaching. You do not just tell them…you show them the reasons.”- V. Lombardi

  #6   Spotlight this post!  
Unread 16-02-2013, 01:46
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 16-02-2013 at 01:55.
  #7   Spotlight this post!  
Unread 16-02-2013, 13:29
jli42533 jli42533 is offline
Registered User
FRC #0867
 
Join Date: Nov 2012
Location: United States of America
Posts: 2
jli42533 is an unknown quantity at this point
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?
Closed Thread


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 02:12.

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