public class PhidgetAdvancedServoInterface extends DeviceInterface
attached, ChannelAccess_DIRECT, ChannelAccess_EVENTS, ChannelAccess_NONE, contrChannelsInUse, currSampleTime, datVal, DeviceType_IN, DeviceType_INOUT, DeviceType_NONE, DeviceType_OUT, fw, isActive, isDataInRunning, isDataLoggingReady, itsControlDesign, itsDeviceTimer, itsDeviceType, itsDurationTraceTime, itsEngine, itsHardware, itsInstrumentPanel, itsOffVoltage, itsOnVoltage, itsReader, itsRunTime, itsSamplesPerSec, itsSerNum, itsSettings, itsStartTraceTime, itsTimerRowCounter, itsType, itsWriter, kSamplesPerSec, lastSampleTime, listValues, logFileName, loggerIsRunning, operChannelsInUse, sensChannelsInUse, sensorTraces, startTimeDataIn, timeDevice, validRange
Constructor and Description |
---|
PhidgetAdvancedServoInterface(int nChannels)
standard constructor for the PhidgetRelayController class
|
Modifier and Type | Method and Description |
---|---|
com.phidgets.AdvancedServoPhidget |
getAdvancedServoHardware()
returns an advanced servo phidget - if it exists
|
void |
listDeviceInterface()
checks for all available serial ports
|
static void |
main(java.lang.String[] args)
Main method.
|
void |
makeHardwareInterface()
looks for and initializes the interfacekit for the relay controller
|
void |
setEngaged(int channel,
boolean turnON)
sets the device to a specific position
Typically, the range might be 25 - 180 degrees, but this depends on the servo, each
corresponding approximately to an angle in degrees.
|
void |
setValue(int channel,
float value)
sets the device to a specific position
Typically, the range might be 25 - 180 degrees, but this depends on the servo, each
corresponding approximately to an angle in degrees.
|
void |
turnOff(int channel)
stops the device on one channel.
|
void |
turnOn(int channel)
starts the device on one channel.
|
activateUsedChannels, addControlDeviceOperator, addDeviceOperator, addSensorDeviceOperator, autoColorTraces, close, closeEventInterface, completeInterface, confirmChannelRange, confirmInputCapable, confirmMinNChannels, confirmOutputCapable, controlAllDevices, controlDeviceFromSchedule, finalizeInterface, getAnalogOutHardware, getAnalogSensorHardware, getChannelAccess, getControlDeviceOperator, getControlHardware, getDataRate, getDeviceOperator, getDeviceOperatorForChannel, getDeviceType, getHardware, getHotShapeList, getItsName, getNControlDeviceOperators, getNDeviceOperators, getNInterfaceChannels, getNSensorDeviceOperators, getSensorDeviceOperator, getSensorHardware, getSensorValue, getSensorValue, getTracker, initializeFromSettings, isValidControlHardware, isValidSensorHardware, list, listDeviceOperators, makeControlDeviceOperator, makeDeviceOperator, makeInterface, makeSensorDeviceOperator, makeSineWave, prepareEventInterface, resetAllChannels, resetTraces, sendCommand, setByteValue, setByteValue, setChannelAccess, setDataRate, setDeviceType, setEnabled, setInterface, setItsName, setNControlInterfaceChannels, setTraceTimes, setTracker, setupDataLogging, setValidRange, startDataIn_DirectPolling, startDataIn_DirectPolling, startDataIn_EventDriven, startDataIn, startEventInterface, stopDataIn, stopEventInterface, toString, updateSamplingRate, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
public PhidgetAdvancedServoInterface(int nChannels) throws java.lang.Exception
nChannels
- the number of channels requestedjava.lang.Exception
- ...public void makeHardwareInterface() throws java.lang.Exception
makeHardwareInterface
in class DeviceInterface
java.lang.Exception
- ...public com.phidgets.AdvancedServoPhidget getAdvancedServoHardware() throws java.lang.Exception
java.lang.Exception
- ...public void listDeviceInterface() throws java.lang.Exception
listDeviceInterface
in class DeviceInterface
java.lang.Exception
- ...public void turnOn(int channel) throws java.lang.Exception
turnOn
in class DeviceInterface
channel
- index of the devicejava.lang.Exception
- ...public void turnOff(int channel) throws java.lang.Exception
turnOff
in class DeviceInterface
channel
- index of the devicejava.lang.Exception
- ...public void setEngaged(int channel, boolean turnON) throws java.lang.Exception
setEngaged
in class DeviceInterface
channel
- index of the deviceturnON
- engaged?java.lang.Exception
- ...public void setValue(int channel, float value) throws java.lang.Exception
setValue
in class DeviceInterface
channel
- index of the devicevalue
- desired positionjava.lang.Exception
- ...public static void main(java.lang.String[] args)
args
- the argumentsRH, 2017