How do I Program the intake and the arm of the robot in labview

How do I Program the intake and the arm of the robot in labview I look on every website and couldn’t find any think If anyone out there that can help then It will help me and my team out alot.

What is powering those two things?
e.g., robot arm

  • powered by what kind of motor/motor controller or pneumatic?

intake:

  • do you have a motor to turn rollers?
  • do you have pneumatics or a motor to move it outside the bumper and back in?

What game controller or joystick do you want to use to control both of those things?
Do you want to use a joystick or buttons and how do you want them to behave?

The motor I am using for the arms is sparks motors and for intake I am usings a spark max motor but for the question on motor to turn rollers? and neumatics or a motor to move it outside the bumper and back in? what do you mean by that? Also I am using a xbox controllor but what is the differenct in using a joystick or buttons and how do you want them to behave?

So,
Arm - 1 Spark motor controller (older type), I assume that you will be using a PWM connection from the roboRIO for this?

Intake - 1 Spark Max, Are you using PWM from the roboRIO PWM connections, or CAN from the roboRIO CAN port to drive this one?

We can work through controlling these with an xbox.

  • Do you want to hold a button down to keep a motor operating and have it stop when you let go of the button?

I just want to be sure what you are using and how they are connected to the roboRIO.
It makes a difference in how the code needs to be written.

The other questions are just because I don’t know what your robot looks like and what it does.

Copy of 2022 Everybot UMich Edition.pdf (36.3 MB)
This is the robot we are using and building if you can’t see the picture then let me know so I can fix it.

Yes I am going to be using a PWM for my arms and intake and yes I want my controler to be hold a button down to keep a motor operating and have it stop when you let go of the button?

But also my question is what type codes do I need in labview to progam the arm and intake of the robot.

Here is an example of running a PWM motor using two buttons on an xbox controller:
(this example can be saved to your desktop then drag-drop onto a LabVIEW block diagram to turn into real code, so you can check it out more easily)

The orange “1” and “-1” are max speed for the motors, so you might want to slow those down, e.g., use a fraction like “.75” for 75%of max speed, or “-0.5” for 50% of speed in reverse.

You can figure out what each axis and button on the xbox controller is called by using the Driver Station USB tab, highlighting the xbox controller and seeing which lights turn on as buttons/joysticks are pushed/moved.
The map looks like this: https://www.team358.org/files/programming/ControlSystem2015-2019/images/XBoxControlMapping.jpg

Okay thank you for that information but what about the arm code what codes do I need in Labview to make the arm code.

The arm code is a copy of the same.
Just

  • pick different buttons to use,
  • where it says “SPARK MAX - PWM” use the pulldown to change that to “SPARK-PWM”,
  • select a different PWM that it’s connected to
  • change the name “Intake” to “Arm” or whatever you want to call it

The part labeled "Begin.vi goes in your Begin.vi
and the Teleop.vi part goes in your Teleop.vi.

Thank you so much for the help

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.