Using the arm with VICTOR motor

Hello everyone,
My team is using the Victor motor for our arm. We did the programmation, but it doesn’t work. We added the same vi’s (Begin, Set, Get, Set Refnum, Get Refnum and Close). And also, what is the signification of the red light on the Victor?

Here’s three print screen about our arm with Victor with LabView:

Thank you very much!

Actually if no buttons are pressed you will have a race condition and it is impossible to determine if the output will be 0 or 50% reverse.

I recommend you place one case structure inside the other and explicitly define what you want to happen in all 4 possible conditions (Only #1 pressed, Only #5 pressed, Both pressed, neither pressed). If you need help understanding how to nest the case structure or how it works with one inside the other feel free to post here and I will explain further.

EDIT: Also without seeing the “true” Case for the case structures we can’t tell what will happen when you actually do push the buttons. If you want to continue down this path and not nest them as I suggest above we’ll need to see the “True” cases and we’ll also need a description of what you want the code to do (IE. Power the motor at 50% reverse when button #1 is pressed and power at 50% forward when button #5 is pressed)

You are correct. With no buttons pressed, the motor is sent both 0 and -.5. My bad.


First of all thanks for the answer.

Actually what, we would like to do is basically simple.

We first use a spike to control our electric motor, but it appeared we are not allowed to use a spike.:ahh:

So we putted a victor instead. So all our code has to change.

After we wrote our code, we couldn’t control our motor anymore. We don’t know if there is something wrong about the code, or it’s the component itself that doesn’t work well.

Now as far as our code above is concerned, we wanted to control our victor with two buttons.

One will make the current go through in a direction(button 1), and the other one will reverse the current (button 5). To be more specific, button 1 will be used to foward our vitor whenever we’ll press it and button 5 will reverse it anytime also.

The true condition does the opposite of the false meaning button 1 sets the motor to 0.5 and button 5 sets the motor to 0.

Seriously we don’t understand what’s wrong with the code. We tried a couple of solutions but it didn’t work. We need your HELP on this. This is our rookie year and we would like to impress our school and the community.

THANKS a lot.

You are setting the motor twice. That will never work
Stack the case structures. If button 1 true, write motor 1. Inside button 1 false, check button 5 and write either -1 or 0.

Quick unrelated question. What physical motor are you using on the robot that was wired up to the Spike? There’s a pretty short list of motors that you’re not allowed to wire to a Spike, I’d like to make sure we’re not making this change for no reason.

A Victor motor.

A Victor is a Motor Controller, not a motor itself. Is it a CIM? Fisher Price? Window motor? 555?

Well, I don’t know

If it is a CIM or Fisher-Price motor it must be on a Victor. All others can be on Spikes. Since you said it’s an arm I would guess CIM or Fisher Price, as the others are fairly wimpy motors.

Can you give a physical description?

Big, black cylinder: CIM
smaller, gray/silver cylinder: FP, Mabuchi
oblong with a diskish shape on one end: Window motor

Well, I’ll see tuesday the type of Victor.

Sorry. but it doesn’t work. I’ve tried to stack the case structures. I’ve made three print screens and will post it right now.

By the way, our Victor control is a 2.5 ‘’ CIM Motor, 12V DC, 2.5’’ diameter, and we were advise to use a Victor instead of a Spike because it’s not allowed. :slight_smile:

Thank you very much!:smiley:

Just checking on the legality of things. Moving on…

Your code there looks good and should work. I think I see the problem, and we should have all noticed it earlier, but it’s a tricky one to catch. I think you’re accidentally using different names for your motor reference.

In the screen where you’re closing the reference and the screen where you’re controlling the motor, it looks like you’re calling it [Bras Robot]

In the screen where you’re opening the reference to the motor, it looks like you’re calling it [Bras Robot ] with an extra space at the end. That extra space DOES matter and it means you’re saving the motor reference to a different name that you’re accessing it with.

So, I think if you double check all your references to [Bras Robot] and make sure they’re all exactly the same, things should work for you. Copy / Paste works well here. You might also want to double check this for anything else in your program you’re having problems with.

In case that doesn’t fix things, what does the LED on the Victor look like when your robot is on and in teleop? Is it blinking yellow or is it a solid color? Does it change colors when you press buttons 1 and 5?

The type of Victor had better be 884. That’s the only one permitted according to <R42>. The question is what type of motor you’re trying to control.

An unrecognized reference name will be indicated in the diagnostic messages window on the Driver Station. Are there any other messages there that might tell you what else you should be looking at?