PhidgetAnalog

This element allows you access to PhidgetAnalog devices, boards with analog outputs, like device 1002. 

The PhidgetAnalog 4-Output (1002) Produces a voltage over -10V to +10V. This voltage will be asserted up to +-20mA. An error will be reported when this current is exceeded, and the voltage the customer is getting is no longer accurate. The voltage is produced with 12 bit resolution (4.8mV).

The board is not isolated and all 4 channels share a common ground.

All the power is supplied by the USB bus.

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 group of phidgets include:

Example of use

// Init the module
ap.connect();
// enables all outputs
for (int i = 0; i < ap.getOutputCount() - 1; i++) {
  ap.enableAnalogOutput(i, true);
}
// Setting the Voltage of the first Analog Output to newVoltage
ap.setVoltage(0, newVoltage);

//closing
ap.setVoltage(0, 0);
for (int i = 0; i < ap.getOutputCount() - 1; i++) {
   ap.enableAnalogOutput(i, false);
}