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 12 of 16
• getMetersPerSecond() – Returns the current velocity in meters per second. This is measured in a 100ms
window.
• getEncoderPositionCount() – Returns the raw encoder position count.
• getEncoderVelocityCount() – Returns the raw velocity count logged from the encoder in the past 100ms.
• getP(unsigned int slot) – Returns the P constant of the specified PID slot.
• getI(unsigned int slot) – Returns the I constant of the specified PID slot.
• getD(unsigned int slot) – Returns the D constant of the specified PID slot.
• getF(unsigned int slot) – Returns the F constant of the specified PID slot.
5.4 Fault Status
• isOverTempFaultActive() - Returns whether or not the over temperature fault is active.
• isUnderVoltageFaultActive() - Returns whether or not the under voltage fault is active.
6. Tutorials
This section will walk through a couple of common procedures to get the robot functioning properly.
6.1 Setting correct motor and encoder direction
In order to use limit switches and closed loop the encoder must be configured to work in phase with the motor In
other words, the DMC60C needs to know that when the quadrature encoder count increases, the motor is moving
forward. To do this, use the code below. Drive the motor forward manually using a joystick. If the motor is moving
in the wrong direction, change the invert motor call in RobotInit() to SetInverted (true) and restart before
continuing. Check the position count by reading the results from getEncoderPositionCount() on the Smart
Dashboard (or the front panel in Labview). If the position count is negative, then the encoder needs to be inverted.
To do this, change the invert encoder call to invertEncoder(true). These settings are not stored in nonvolatile
memory, so SetInverted() and invertEncoder() need to be called during robot initialization each time.