Arm problem with PWM in teleop code

We have 2 motors on our arm, i have the 2 motors in teleop, begin, finish, and autonomous vi’s. When i go into the front panel of the set output motor vi in teleop to change one to PWM 5 and the other to PWM 6, but when i close them out and reopen them, they change to become the same PWM. either 5 or 6. I need one to be 5 and one to be 6, how do i change this?

I’m not sure what motors you are using, either window or jaguars but there is a terminal on the vi that you can right click and choose create constant and then select the PWM option. Save and then reopen and it should be the same.

You should not be changing anything inside those functions. You need to wire things to the function inputs. One of the inputs to the Set Output function is a “device reference”, which you need to get from the output of a “Refnum Get” function.

Look at the motor control example, and then look at Tutorial 7 - Integrating Examples into Robot Code for detailed instructions. The tutorials are accessed from LabVIEW’s Getting Started window.

Anything involving PWM should remain constant. There is no reason I can thin of that would require you to use the front panel between stages. Use a ‘Constant’ instead of ‘Control’.