Open motor reference on Slot 6 DIO Module

I thought I was a pretty decent LabView “coder” after using it for over 3 years, and I’m actually happy to say that I’ve found something that has stumped me. I am attempting to open a motor reference in the Advanced framework Begin.vi and select PWM channels for eventually controlling motors connected to the sidecar on the Slot 6 DIO module. Slot 4 is selected by default internally in the OPEN X MOTOR.vi and since there is not an external connector to the outside of this vi for selecting the slot, I can think of only two (relatively cumbersome) ways of changing the slot reference:

  1. Change the lib vi to extend the slot through the vi connector. I have a feeling this would be a bad idea because updates would probably break this

  2. Decompose the open motor output cluster and insert my new reference to the slot in the cluster output. Blah:confused:

I know there is an easier way and I appreciate the help

What you are seeing is the result of WPI lib trying to make the drive class look really simple. To do this, params were left out such as the slot.

I don’t have the code open, but I’ll list a few other choices which are perhaps less cumbersome.

  1. Use slot 4 for the drive motors, and the other slot for mechanism motors.
  2. Look at the drive class. It doesn’t do much anyway. The primary benefit is probably the joysick differential algorithms. You can drop down and directly interact with the motor class.

If you do decide to change the Drive library, you may want to save it to a new location. It is unlikely to change again, but you wouldn’t want an updater to back out your changes.

Greg McKaskle

Thanks for the response Greg. I liked the convenience of having all the params grouped together, so I ended up copying the 2 motor open VI to a new VI and pulling the slot params out of the block. We have a three motor drive system, in which each are independently controlled, so I added another motor while I was at it.