public class PhidgetServoInterface extends PhidgetInterface
itsPhidgetModel, kIsRatiometric, kSamplesPerSec, kSensorChangeTrigger
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, lastSampleTime, listValues, logFileName, loggerIsRunning, operChannelsInUse, sensChannelsInUse, sensorTraces, startTimeDataIn, timeDevice, validRange
Constructor and Description |
---|
PhidgetServoInterface(int nChannels)
standard constructor for the PhidgetRelayController class
|
Modifier and Type | Method and Description |
---|---|
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 channel to engaged
|
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, close, closeEventInterface, completeInterface, confirmPhidgetHardware, getAdvancedServoHardware, getAnalogOutHardware, getControlHardware, getIFKitHardware, getSensorHardware, getSensorValue, getServoHardware, handleSensorEvent, prepareEventInterface, processSensorEvent, resetAllChannels, sensorChanged
addControlDeviceOperator, addDeviceOperator, addSensorDeviceOperator, autoColorTraces, confirmChannelRange, confirmInputCapable, confirmMinNChannels, confirmOutputCapable, controlAllDevices, controlDeviceFromSchedule, finalizeInterface, getAnalogSensorHardware, getChannelAccess, getControlDeviceOperator, getDataRate, getDeviceOperator, getDeviceOperatorForChannel, getDeviceType, getHardware, getHotShapeList, getItsName, getNControlDeviceOperators, getNDeviceOperators, getNInterfaceChannels, getNSensorDeviceOperators, getSensorDeviceOperator, getSensorValue, getTracker, initializeFromSettings, isValidControlHardware, isValidSensorHardware, list, listDeviceOperators, makeControlDeviceOperator, makeDeviceOperator, makeInterface, makeSensorDeviceOperator, makeSineWave, 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 PhidgetServoInterface(int nChannels) throws java.lang.Exception
nChannels
- the number of channels requestedjava.lang.Exception
- ...public void makeHardwareInterface() throws java.lang.Exception
makeHardwareInterface
in class PhidgetInterface
java.lang.Exception
- ...public void listDeviceInterface() throws java.lang.Exception
listDeviceInterface
in class PhidgetInterface
java.lang.Exception
- ...public void setEngaged(int channel, boolean turnON) throws java.lang.Exception
setEngaged
in class DeviceInterface
channel
- index of the deviceturnON
- do turn on?java.lang.Exception
- ...public void turnOn(int channel) throws java.lang.Exception
turnOn
in class PhidgetInterface
channel
- index of the devicejava.lang.Exception
- ...public void turnOff(int channel) throws java.lang.Exception
turnOff
in class PhidgetInterface
channel
- index of the devicejava.lang.Exception
- ...public void setValue(int channel, float value) throws java.lang.Exception
setValue
in class PhidgetInterface
channel
- index of the devicevalue
- the voltage to setjava.lang.Exception
- ...public static void main(java.lang.String[] args)
args
- the argumentsRH, 2017