Datasheet
DMC60C™ Software Reference Manual
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 8 of 16
2. Click the WPI logo on the top right.
3. Go to Manage Vendor Libraries > Install new libraries (offline).
4. If the DMC60C API has been installed, you should see Digilent-DMC60C. Select that and press OK.
5. (C++)In your main robot.cpp, #include <digilent/dmc60/WPI_DMC60C.h>
6. (Java)In you main robot.java import com.dmc60.DMC60C
7. Create a new object:
a. C++: DMC60::WPI_DMC60C * myDMC60C = new DMC60::WPI_DMC60C(deviceNum);
b. Java: private DMC60C myDMC60C = new DMC60C(deviceNum);
2.2 Labview
1. In Labview, create a new robot project or open an existing 2019 robot project.
2. Open Target/Team Code/Begin.vi.
3. Press CTRL+E to open the block diagram view.
4. Right click to open the VI palette and go to WPI Robotics Library > Third Party > DMC60C.
a. It can be useful to pin this subpalette for ease of use.
5. Click and drag the Open DMC60C VI to the block diagram.
6. Right click the device number input and create a constant. Change this to the DMC60C’s device number.
7. In the DMC60C subpalette, open the WPI subpallete and add a DMC60C RefNum Registry Set.vi.
8. Connect the DMC60C output cluster to the input of the Registry Set vi.
9. Create a constant for the refnum name and give the DMC reference any name. (DMC in this picture)
10. To access this DMC60C device in another vi:
a. Add a DMC60C RefNum Registry Get.vi
b. Enter the refnum name as the input. The output will be the DMC60C reference cluster.
3. Configuring the DMC60C
The DMC60C has many configurable settings in the high-level API. These settings will typically be set when the
robot code is initialized.
3.1 General Settings
• SetInverted(bool isInverted) – Inverts the motor direction.
o isInverted – True to invert the motor, false otherwise.
• invertEncoder(bool isInverted) – Inverts the signals of the feedback sensor. This alleviates the need to
swap the QEA and QEB signals when the quadrature encoder direction does not match the motor.
o isInverted – True to invert the encoder, false otherwise.
• configIndexActiveEdge(bool edge) – Configures the index pin on the DMC60C to trigger on the rising or
falling edge. Use this when using the index pin (pin 9) on the DMC60C.
o edge – True to trigger on rising edge, false to trigger on falling edge.