Motors in LabVIEW

My team has a problem where one of our motors is spinning the wrong way I was wondering if there was a way to fix that in lab view? thanks!

I believe there is an input to reverse the motor direction. What kind of motors and motor controllers? I am rusty on labview

we are using victor spx for the controllers and toughbox mini for the motors

if its a brushed motor, have you tried reversing the polarity by swapping red and black connectors?
EDIT: examples are 775 pros, Cim, Mini Cim and bag motors

1 Like

You can either set it in the phoenix tuner (not recommended), or you can set it in code.

I’m not 100% sure how to do it, but if you have a Victor SPX reference, I think you can set the invert settings there. It’ll take some playing around. If you “right click > Create constant” on certain inputs, you might find some useful things there.

Also look at the software examples from CTRE

Look at Talon examples too. Victor SPXs and Talon SRXs are very similar

In the labview library for the Victor SPX, there is the Set Invert block. You’ll want this one. Pass a “true” boolean constant to it to reverse output polarity.

1 Like

ok @GodCed what do I wire it to and in what VI

You’ll want it at the same place you call “open” on the Victor SPX.

It is wired the same way your set is wired, i.e. it takes a refnum to the drive and an input. (your boolean constant in this case).

You can put it just beside your Victor SPX open vi.

ok thanks!

1 Like

See this example for a full project using motor invert and sensor phase. (You won’t need sensor phase if you are not doing PID control or fancy stuff like that)

And this section of Phoenix documentation.

cool thanks so much

1 Like

yeah it worked thanks so much

1 Like

In the open VI, there should be a boolean input labeled “Invert”, which eliminates the need to use a separate VI for it.