First LabView Program - Trouble with motor control

I’ve spent the last few hours trying to run a program on the roboRIO. I followed the tutorial attached but I used an old Victor to get started. I’m really not sure what I’m doing wrong, but the PWM isn’t outputting anything despite what I put in the dashboard.

[FRC 2015] Basic Motor Control.pdf (826 KB)
Untitled 1.vi (9.93 KB)


[FRC 2015] Basic Motor Control.pdf (826 KB)
Untitled 1.vi (9.93 KB)

Try the Motor example that comes with LabVIEW.
From the Getting Started window select Support -> Find FRC Examples… -> FRC Robotics -> roboRIO->Robot and Motor->Motor Control

These examples assume you are tethered using the USB cable.

I’ll have to test it out tomorrow, but assuming it does work which I can’t imagine why it wouldn’t, it still doesn’t explain why my current program isn’t. The key portions of the block diagram appear to be the same. I followed the tutorial attached in the previous post. Should something have been done to make sure that that file was run when I began running Robot Main.vi?

As for the example, if I wanted to run it wirelessly, do I just need to change the target from 172.22.11.2 to whatever the DNS is for my router?





I tried running the example as well and it doesn’t appear to be working either. For some reason I can’t get the PWM to output anything.

How are you determining that the PWM is not outputting anything? i.e. LabVIEW probes, Driver Station, Dashboard, LEDs on motor controllers, voltmeter, something else?

I’ve tried with the voltmeter/oscilloscope and I LABVIEW probed some of the blocks when I did the example exercise and it seems to be setting the PWM to a value of 1537 . As far as I’ve delved into the internal blocks anyway. I’m not sure where to look to see if there are any issues with it actually setting the PWM to that value. The drive station hasn’t spat out any errors either.

I just tried doing the arcade drive example. I can see that LABVIEW is reading the joystick values no problem but I get the following message when looking at the wire after declaring which PWM from the dropdown: PWM Channel | Not Executed.





That message means the Driver Station hasn’t been put in Teleop mode and Enabled.

Maybe a screenshot of the Driver Station while the robot is Enabled.

The vi in the example that was posted in the beginning tutorial your first post is meant to be stand alone. Try putting the code in the teleop.vi and enable the robot from the driverstation after either deploying the project, or running robot main.vi