org.mbari.siam.distributed.devices
Interface ElmoIF

All Superinterfaces:
java.rmi.Remote
All Known Subinterfaces:
ElmoLouverIF, ElmoThrusterIF
All Known Implementing Classes:
ElmoImpl, ElmoLocal, ElmoLouver, ElmoService, ElmoThruster, ESWPump

public interface ElmoIF
extends java.rmi.Remote

Remote Interface for operating the FOCE louvers via remote methods implemented by the instrument service.


Method Summary
 void beginMotion()
          start motion using current settings n
 double counts2orpm(int counts)
          Convert output shaft speed (counts/sec) to (rpm) (at output after gear train) (using gear ratio and counts per revolution)
 double counts2rpm(int counts)
          Convert motor speed (counts/sec) to (rpm) (before gear train) (using countsPerRevolution)
 void delay(long delayMsec)
          delay for specified number of milliseconds
 int getCountsPerRevolution()
          Get commutation counts per motor revolution.
 int getEncoderVelocity()
          get motor feedback velocity in counts/sec.
 int getEncoderVelocity(int nSamples)
          get (average of nSamples) motor feedback velocity in counts/sec.
 int getFaultRegister()
          return detailed motor fault information.
 double getGearRatio()
          Get the gear ratio between the motor and the output shaft.
 int getJoggingVelocity()
          get motor jogging (commanded) velocity in counts/sec.
 long getPositionCounter()
          Get motor position counter for position modes
 long getPositionError()
          Get difference (counts) between commanded and actual position if available
 int getStatusRegister()
          return motor status.
 void initializeController()
          Initialize motor controller
 void initializeController(int serialMode, int countsPerRevolution, double gearRatio, int mode, int acceleration, int deceleration, int stopDeceleration)
           
 boolean isEnabled()
          return motor enabled (MO) status.
 void jog(int counts)
          command motor velocity in counts/sec
 int orpm2counts(double orpm)
          Convert output shaft speed (rpm) to (counts/sec) (at output after gear train) (using gear ratio and counts per revolution)
 void ptpAbsolute(long position, boolean wait)
          Move motor to absolute position Motion may be subject to modulo position counting modes in effect.
 void ptpRelative(long distanceCounts, boolean wait)
          Move motor relative to current position
 java.lang.String readRegister(java.lang.String register)
          read an Elmo register value
 int rpm2counts(double rpm)
          Convert motor speed (rpm) to (counts/sec) (before gear train) (using countsPerRevolution)
 void setCountsPerRevolution(int countsPerRevolution)
          Set commutation counts per motor revolution.
 void setEnable(boolean value, long timeoutMsec)
          enable/disable the motor.
 void setGearRatio(double value)
          Set the gear ratio between the motor and the output shaft.
 void setJoggingVelocity(int counts)
          set motor velocity in counts Do not initiate motion
 void setPositionCounter(long positionCounts)
          Set motor position counter for position modes
 void setPTPSpeed(int counts)
          set motor PTP velocity (used for Absolute motion) in counts Do not initiate motion
 void setSerialMode(int mode)
          Set serial port mode (MODE_SERIAL_LOCAL, MODE_SERIAL_RFC2217)
 java.lang.String showConfiguration()
          show current configuration information
 

Method Detail

initializeController

void initializeController()
                          throws TimeoutException,
                                 java.io.IOException,
                                 java.lang.Exception,
                                 java.rmi.RemoteException
Initialize motor controller

Throws:
TimeoutException
java.io.IOException
java.lang.Exception
java.rmi.RemoteException

initializeController

void initializeController(int serialMode,
                          int countsPerRevolution,
                          double gearRatio,
                          int mode,
                          int acceleration,
                          int deceleration,
                          int stopDeceleration)
                          throws TimeoutException,
                                 java.io.IOException,
                                 java.lang.Exception,
                                 java.rmi.RemoteException
Throws:
TimeoutException
java.io.IOException
java.lang.Exception
java.rmi.RemoteException

rpm2counts

int rpm2counts(double rpm)
               throws java.lang.Exception,
                      java.rmi.RemoteException
Convert motor speed (rpm) to (counts/sec) (before gear train) (using countsPerRevolution)

Throws:
java.lang.Exception
java.rmi.RemoteException

counts2rpm

double counts2rpm(int counts)
                  throws java.lang.Exception,
                         java.rmi.RemoteException
Convert motor speed (counts/sec) to (rpm) (before gear train) (using countsPerRevolution)

Throws:
java.lang.Exception
java.rmi.RemoteException

orpm2counts

int orpm2counts(double orpm)
                throws java.lang.Exception,
                       java.rmi.RemoteException
Convert output shaft speed (rpm) to (counts/sec) (at output after gear train) (using gear ratio and counts per revolution)

Throws:
java.lang.Exception
java.rmi.RemoteException

counts2orpm

double counts2orpm(int counts)
                   throws java.lang.Exception,
                          java.rmi.RemoteException
Convert output shaft speed (counts/sec) to (rpm) (at output after gear train) (using gear ratio and counts per revolution)

Throws:
java.lang.Exception
java.rmi.RemoteException

setSerialMode

void setSerialMode(int mode)
                   throws java.lang.IllegalArgumentException,
                          java.rmi.RemoteException
Set serial port mode (MODE_SERIAL_LOCAL, MODE_SERIAL_RFC2217)

Throws:
java.lang.IllegalArgumentException
java.rmi.RemoteException

setCountsPerRevolution

void setCountsPerRevolution(int countsPerRevolution)
                            throws java.lang.IllegalArgumentException,
                                   java.rmi.RemoteException
Set commutation counts per motor revolution. Depends on motor type (number of poles, etc.)

Throws:
java.lang.IllegalArgumentException
java.rmi.RemoteException

getCountsPerRevolution

int getCountsPerRevolution()
                           throws java.rmi.RemoteException
Get commutation counts per motor revolution. Depends on motor type (number of poles, etc.)

Throws:
java.rmi.RemoteException

setEnable

void setEnable(boolean value,
               long timeoutMsec)
               throws TimeoutException,
                      java.io.IOException,
                      java.lang.NullPointerException,
                      java.lang.IllegalArgumentException,
                      java.lang.Exception,
                      java.rmi.RemoteException
enable/disable the motor.

Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.Exception
java.rmi.RemoteException

setGearRatio

void setGearRatio(double value)
                  throws java.lang.IllegalArgumentException,
                         java.rmi.RemoteException
Set the gear ratio between the motor and the output shaft. For example, if the output shaft turns 67.5 times slower than the motor, the gear ratio should be set to 67.5.

Throws:
java.lang.IllegalArgumentException
java.rmi.RemoteException

getGearRatio

double getGearRatio()
                    throws java.rmi.RemoteException
Get the gear ratio between the motor and the output shaft. For example, if the output shaft turns 67.5 times slower than the motor, the gear ratio should be set to 67.5.

Throws:
java.rmi.RemoteException

setPositionCounter

void setPositionCounter(long positionCounts)
                        throws TimeoutException,
                               java.io.IOException,
                               java.lang.NullPointerException,
                               java.lang.IllegalArgumentException,
                               java.lang.Exception,
                               java.rmi.RemoteException
Set motor position counter for position modes

Parameters:
positionCounts - new value of position counter (counts) fulfills ElmoIF interface
Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.Exception
java.rmi.RemoteException

getPositionCounter

long getPositionCounter()
                        throws TimeoutException,
                               java.io.IOException,
                               java.lang.NullPointerException,
                               java.lang.Exception,
                               java.rmi.RemoteException
Get motor position counter for position modes

Returns:
position counter (counts)
Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.Exception
java.rmi.RemoteException

getJoggingVelocity

int getJoggingVelocity()
                       throws TimeoutException,
                              java.io.IOException,
                              java.lang.NullPointerException,
                              java.lang.IllegalArgumentException,
                              java.lang.Exception,
                              java.rmi.RemoteException
get motor jogging (commanded) velocity in counts/sec.

Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.Exception
java.rmi.RemoteException

getEncoderVelocity

int getEncoderVelocity()
                       throws TimeoutException,
                              java.io.IOException,
                              java.lang.NullPointerException,
                              java.lang.IllegalArgumentException,
                              java.lang.Exception,
                              java.rmi.RemoteException
get motor feedback velocity in counts/sec.

Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.Exception
java.rmi.RemoteException

getEncoderVelocity

int getEncoderVelocity(int nSamples)
                       throws TimeoutException,
                              java.io.IOException,
                              java.lang.NullPointerException,
                              java.lang.IllegalArgumentException,
                              java.lang.Exception,
                              java.rmi.RemoteException
get (average of nSamples) motor feedback velocity in counts/sec.

Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.Exception
java.rmi.RemoteException

isEnabled

boolean isEnabled()
                  throws TimeoutException,
                         java.io.IOException,
                         java.lang.NullPointerException,
                         java.lang.IllegalArgumentException,
                         java.lang.Exception,
                         java.rmi.RemoteException
return motor enabled (MO) status.

Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.Exception
java.rmi.RemoteException

getStatusRegister

int getStatusRegister()
                      throws TimeoutException,
                             java.io.IOException,
                             java.lang.NullPointerException,
                             java.lang.IllegalArgumentException,
                             java.lang.Exception,
                             java.rmi.RemoteException
return motor status.

Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.Exception
java.rmi.RemoteException

getFaultRegister

int getFaultRegister()
                     throws TimeoutException,
                            java.io.IOException,
                            java.lang.NullPointerException,
                            java.lang.IllegalArgumentException,
                            java.lang.Exception,
                            java.rmi.RemoteException
return detailed motor fault information.

Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.Exception
java.rmi.RemoteException

getPositionError

long getPositionError()
                      throws TimeoutException,
                             java.io.IOException,
                             java.lang.Exception,
                             java.rmi.RemoteException
Get difference (counts) between commanded and actual position if available

Returns:
position error (counts)
Throws:
TimeoutException
java.io.IOException
java.lang.Exception
java.rmi.RemoteException

setJoggingVelocity

void setJoggingVelocity(int counts)
                        throws TimeoutException,
                               java.io.IOException,
                               java.lang.NullPointerException,
                               java.lang.IllegalArgumentException,
                               java.lang.Exception,
                               java.rmi.RemoteException
set motor velocity in counts Do not initiate motion

Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.Exception
java.rmi.RemoteException

setPTPSpeed

void setPTPSpeed(int counts)
                 throws TimeoutException,
                        java.io.IOException,
                        java.lang.NullPointerException,
                        java.lang.IllegalArgumentException,
                        java.lang.Exception,
                        java.rmi.RemoteException
set motor PTP velocity (used for Absolute motion) in counts Do not initiate motion

Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.Exception
java.rmi.RemoteException

showConfiguration

java.lang.String showConfiguration()
                                   throws TimeoutException,
                                          java.io.IOException,
                                          java.lang.NullPointerException,
                                          java.lang.IllegalArgumentException,
                                          java.lang.Exception,
                                          java.rmi.RemoteException
show current configuration information

Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.Exception
java.rmi.RemoteException

readRegister

java.lang.String readRegister(java.lang.String register)
                              throws TimeoutException,
                                     java.io.IOException,
                                     java.lang.NullPointerException,
                                     java.lang.IllegalArgumentException,
                                     java.lang.Exception
read an Elmo register value

Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.Exception

beginMotion

void beginMotion()
                 throws TimeoutException,
                        java.io.IOException,
                        java.lang.NullPointerException,
                        java.lang.IllegalArgumentException,
                        java.lang.Exception,
                        java.rmi.RemoteException
start motion using current settings n

Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.Exception
java.rmi.RemoteException

jog

void jog(int counts)
         throws TimeoutException,
                java.io.IOException,
                java.lang.NullPointerException,
                java.lang.IllegalArgumentException,
                java.lang.Exception,
                java.rmi.RemoteException
command motor velocity in counts/sec

Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.Exception
java.rmi.RemoteException

ptpRelative

void ptpRelative(long distanceCounts,
                 boolean wait)
                 throws TimeoutException,
                        java.io.IOException,
                        java.lang.NullPointerException,
                        java.lang.IllegalArgumentException,
                        java.lang.Exception,
                        java.rmi.RemoteException
Move motor relative to current position

Parameters:
distanceCounts - distance to move (counts)
Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.Exception
java.rmi.RemoteException

ptpAbsolute

void ptpAbsolute(long position,
                 boolean wait)
                 throws TimeoutException,
                        java.io.IOException,
                        java.lang.NullPointerException,
                        java.lang.IllegalArgumentException,
                        java.lang.Exception,
                        java.rmi.RemoteException
Move motor to absolute position Motion may be subject to modulo position counting modes in effect.

Parameters:
position - to move to (counts)
Throws:
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.Exception
java.rmi.RemoteException

delay

void delay(long delayMsec)
           throws java.rmi.RemoteException
delay for specified number of milliseconds

Parameters:
delayMsec - delay duration in milliseconds
Throws:
java.rmi.RemoteException


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.