Go to Post P.S. I'm not boring! - Matt Krass [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-01-2017, 10:30
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,275
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: Running Robot

Quote:
Originally Posted by WalnutsAndBolts View Post
How do I get this thing working and how do I program it?
"how do I program it" is the first step. You have to install the preferred environment on your Programming Computer (which can also be your Driver's Station). Write the Code. Compile it.

At that point, you are ready to attempt communicating with the Robot.

Do the basic robot setup (battery, pdp, crio). Also attache a motor controller, and put a Volt Meter on the output. Alternatively, you can setup the pneumatic system (compressor, pressure sensor).

Program and setup the radio. Update the cRio firmware.

Establish communications with the robot (I suggested tethered for the first time until you are sure it works).
Deploy the code.
Enable the robot.

What you want to do with your code is energize the Motor Controller (without the motor attached), or enable the pneumatic system and hear the compressor start up. Have it cycle on and off (1 second on, 1 second off).

At that point, you have gotten code to run on your robot.
__________________

Reply With Quote
  #2   Spotlight this post!  
Unread 18-01-2017, 10:36
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,908
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: Running Robot

With Ethernet from your picture, it looks like your robot is running fine.
Does it not respond to your joystick?

Check the USB tab in the Driver Station (on the left-the tab with a USB symbol) to see where your joystick has been connected. For the basic LabVIEW project it should be in the USB 0 position, it should be green, and it should brighten whenever a button is pushed.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #3   Spotlight this post!  
Unread 18-01-2017, 10:43
WalnutsAndBolts WalnutsAndBolts is offline
Registered User
FRC #6643 (Walnuts and Bolts)
 
Join Date: Jan 2017
Rookie Year: 2017
Location: Racine Wisconsin
Posts: 32
WalnutsAndBolts is an unknown quantity at this point
Re: Running Robot

Quote:
Originally Posted by Mark McLeod View Post
With Ethernet from your picture, it looks like your robot is running fine.
Does it not respond to your joystick?

Check the USB tab in the Driver Station (on the left-the tab with a USB symbol) to see where your joystick has been connected. For the basic LabVIEW project it should be in the USB 0 position, it should be green, and it should brighten whenever a button is pushed.
Yes, the bot is not responding to the joystick. The joystick comes up in USB 0, and I can see the xyz axis things. Do we need to write code in order for this to connect, or should the robotmain file work?
Reply With Quote
  #4   Spotlight this post!  
Unread 18-01-2017, 10:56
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,908
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: Running Robot

Check that your motor controllers for the left side are connected with a PWM cable to the roboRIO PWM 0 port, while the right side motor controller is connected to PWM 1. If you have two motors per side then use a PWM splitter on each side.
The default code assumes one motor per side and the left side motor controller connected to PWM 0 on the roboRIO, the right side motor controller connected to PWM 1.

The default project described in screensteps should just work.
The joystick will be in arcade mode y-axis is forward and back, x-axis causes turns.

P.S.
I should have asked what the status lights are doing on your motor controllers (and which model motor controllers you are using-white Spark ones?)?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 18-01-2017 at 11:01.
Reply With Quote
  #5   Spotlight this post!  
Unread 18-01-2017, 10:38
WalnutsAndBolts WalnutsAndBolts is offline
Registered User
FRC #6643 (Walnuts and Bolts)
 
Join Date: Jan 2017
Rookie Year: 2017
Location: Racine Wisconsin
Posts: 32
WalnutsAndBolts is an unknown quantity at this point
Re: Running Robot

Quote:
Originally Posted by rich2202 View Post
"how do I program it" is the first step. You have to install the preferred environment on your Programming Computer (which can also be your Driver's Station). Write the Code. Compile it.

At that point, you are ready to attempt communicating with the Robot.

At that point, you have gotten code to run on your robot.
I have imaged the roboRIO and set up the radio, but do I need to image or setup anything else?

Also, how would I write a basic code in labview so that I can use the joystick in the KOP?
Reply With Quote
  #6   Spotlight this post!  
Unread 18-01-2017, 12:29
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,275
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: Running Robot

Quote:
Originally Posted by WalnutsAndBolts View Post
I have imaged the roboRIO and set up the radio, but do I need to image or setup anything else?
LabVIEW for FRC and the FRC Driver Station

https://wpilib.screenstepslive.com/s.../13811/c/57243
https://wpilib.screenstepslive.com/s/4485/m/24192

Quote:
Also, how would I write a basic code in labview so that I can use the joystick in the KOP?
Have you done this yet:
https://wpilib.screenstepslive.com/s/4485/m/13811

IMHO: Make sure you can deploy code and have it run ("hello world" type program). Then you can figure out how to get input (joystick) and drive motors. I don't know Labview, but I assume you need to define the USB Joystick before you can start using it in your code. I believe there is a default joystick type drive that you can use to connect the joystick to your drive motors (which you also may need to define).
__________________


Last edited by rich2202 : 18-01-2017 at 12:32.
Reply With Quote
Reply


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 15:35.

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