Phidget Motor Control HC for Phidget Module 1064_1

This element allows you to control the angular velocity and acceleration of up to two high-current DC motors with a 1064 Phidget module. Many variations of brushed DC motors exist: permanent magnet motors, electromagnet motors, coreless motors, linear motors... the PhidgetMotorController can be used with any of these, as well as other devices like:

The 1064:

Usage

To use any Phidget element, drag an drop its icon to the list of model elements of your model. Then, edit the connection parameters and invoke phidget.connect() in your code.

All methods returning a boolean will return true on successful completion of the command, false otherwise. Methods returning a double value will return Double.NaN if there is any error when connecting to the phidget.

Available method for this particular phidgets include:

Example of use

// Init the module
if (!phidget1064.connect()) _view.alert(null,"Connection error","Can't connect to Motor Control phidget");
// set the PWM value
phidget1064.setPowerPWM(0, 25); // sets 25% of total power on the first output
// get the applied PWM excitation value and the current being consumed
double value = phidget1064.getPowerPWM(0);
double current = phidget1064.getCurrent(0);