public class CanOpenEPOS extends CanOpenDevice implements EPOSController
| Modifier and Type | Field and Description |
|---|---|
protected EPOSEnumerations.EposMode |
mode |
booted, bridge, errorHistory, errorRegister, inError, initialized, nodeID, serialNB, tcpProxy| Constructor and Description |
|---|
CanOpenEPOS(String nodeID,
String serialNB,
Map<String,Integer> paramsForCurrent,
Map<String,Integer> paramsForProfilePosition,
Map<String,Integer> paramsForHoming)
Construction of a CanOpenEPOS.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activateBrake()
A holding brake can be associated to a Controller.
|
void |
activateCurrentMode() |
void |
activateHomingMode() |
void |
activateProfilePositionMode() |
String |
changeMode(EPOSEnumerations.EposMode newMode)
This methods changes the mode to the new mode given as an argument.
|
String |
changeMode(String modeInString)
Changes the mode to the new mode given as a String argument.
|
void |
changeParameterForCurrent(String clef,
int value) |
void |
changeParameterForHoming(String clef,
int value) |
void |
changeParameterForProfilePosition(String clef,
int value) |
void |
checkFault()
Check if the Controller is in fault.
|
void |
checkParameters(EPOSEnumerations.EposMode aMode)
Check parameters for a given EPOS mode : compare the values stored in the Configuration System and
the values stored in controller CPU.
|
void |
checkParameters(Map<String,Integer> paramsMap)
Compare values of parameters in the map with the values of parameters in
the controller CPU.
|
void |
checkParameters(String modeInString)
For every parameter to be defined for this mode this method compares the
values in configuration with the value stored in controller CPU and
throws a HardwareException if these values are not equal.
|
boolean |
checkTargetReached()
In HOMING mode and PROFILE_POSITION mode this indicates that the position
is reached.
|
void |
defineAbsolutePosition(int position)
Defines the actual position as the absolute position which value is given
as an argument.
|
void |
disable()
Disable controller.
|
String |
enable()
This methods enables the controller : i.e.
|
void |
faultReset()
Clear faults on the controller.
|
int |
getMaxCurrent()
Return the max value of current which can be sent to this controller.
|
int |
getMaxPosition()
Return the max position for the object moved by motor which is controlled by this controller.
|
int |
getMaxSpeed()
Return the min value of speed for the motor controlled by this controller.
|
int |
getMinCurrent()
Return the min value of current which can be sent to this controller.
|
int |
getMinPosition()
Return the min position for the object moved by motor which is controlled by this controller.
|
EPOSEnumerations.EposMode |
getMode()
Return Epos mode for GUI.
|
int |
getMotorParameterValue(String parameterName)
Return the value configured for a motor parameter.
|
Map<String,Integer> |
getParamsForCurrent()
Return the list of parameters in Current mode that are in Configuration System for this controller.
|
Map<String,Integer> |
getParamsForHoming()
Return the list of parameters in Homing mode that are in Configuration System for this controller.
|
Map<String,Integer> |
getParamsForProfilePosition()
Return the list of parameters in Homing mode that are in Configuration System for this controller.
|
StatusDataPublishedByEPOSController |
getStatusData()
Return the status object to be published on the STATUS bus.
|
String |
initializeAndCheckHardware()
Check if the parameters in the cPU of the controller have the right values.
|
boolean |
isEnabled()
Return true if the controller is enabled and so ready to receive commands.
|
boolean |
isEnabledToPublish()
For GUI.
|
boolean |
isParametersOK()
This methods returns true if the values of parameters stored in CPU are
the same than those stored in the configuration system.
|
boolean |
isTargetPositionReached(int position)
Return true if after a command writeTarget(position), the position is reached.
|
boolean |
isTurnedOff()
Return true if the controller is turned OFF;
|
String |
off()
Turn off controller.
|
String |
printConfigurationParameters(String modeInString)
Print the configured parameters for this EPOS for a mode name given in
argument.
|
String |
printParameters()
Print the configured parameters for this EPOS for a mode name given in
argument.
|
void |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
void |
quickStop()
Send a quickStop command to the controller.
|
String |
readControlWord()
Read the control world (index=6040, subindex=0,size=2)
|
int |
readCurrent()
In Current Mode this methods returns the current actualy received by the
motor.
|
int |
readCurrentAverageValue()
In Current Mode this methods returns the average of the current received
by the motor.
|
EPOSEnumerations.EposMode |
readMode()
Reads the EPOS mode in the CPU of the EPOS device, updates the field mode
and returns the mode as a String.
|
int |
readParameter(EPOSEnumerations.Parameter param)
Reads in the EPOS CPU the value of the Parameter.
|
int |
readParameter(String parameterName)
Reads in the EPOS CPU the value of the Parameter which parameter name is
given as argument.
|
String |
readParameterInHexa(EPOSEnumerations.Parameter param)
Reads in the EPOS CPU the value of the Parameter.
|
String |
readParameterInHexa(String parameterName)
Reads in the EPOS CPU the hexadecimal value of the Parameter.
|
String |
readParameters() |
String |
readParameters(EPOSEnumerations.EposMode aMode)
Read all the value of parameters for a given EPOS mode and return a printed list of this values.
|
String |
readParameters(String modeInString)
This methods reads in the CPU of the EPOS the values of the parameters
for a given mode.
|
int |
readPosition()
Reads in the CPU the value of the parameter PositionActualValue and
returns it in a decimal format.
|
int |
readProfileVelocity()
In PROFILE_POSITION returns the value of the parameter ProfileVelocity.
|
int |
readSSIPosition()
Read the position returned by the absolute encoder (single serial data).
|
String |
readStatusWord()
Read the status world (index=6041, subindex=0,size=2)
|
void |
releaseBrake()
A holding brake can be associated to a Controller.
|
Object |
restoreParameters()
Restore default parameters.
|
String |
setHomePosition(int position)
Set the Home Position with the value given as argument in decimal format.
|
String |
setHomingMethodActual()
Writes value 35 in hexa to set the Homing method as Actual (See EPOS
documentation)
|
void |
setParamsForCurrent(Map<String,Integer> newMap) |
String |
shutdown()
Shutdown the controller.
|
void |
startHoming()
Starts homing : (See EPOS documentation) For engineering mode.
|
void |
stopCurrent()
In current mode this methods set to zero the value of the current sent to
the motor.
|
void |
switchOnEnableOperation()
SwitchOn and enable controller.
|
void |
writeControlWord(String value)
Write a value in hexa in the control world (index=6040,
subindex=0,size=2)
|
void |
writeCurrent(int aValue)
In current mode this methods send a current to the motor.
|
String |
writeParameter(EPOSEnumerations.Parameter param,
int value)
Set the parameter given as argument with the decimal value given as
argument and write it in the controller CPU.
|
String |
writeParameter(String parameterName,
int value)
This method writes a parameter in the CPU of the EPOS.
|
String |
writeParameterInHexa(EPOSEnumerations.Parameter param,
String hexaValue)
Set the parameter given as argument with the hexadecimal value given as
argument and write it in the controller CPU.
|
String |
writeParameterInHexa(String parameterName,
String hexaValue)
This method writes a parameter in the CPU of the EPOS.
|
void |
writeParameters() |
void |
writeParameters(EPOSEnumerations.EposMode mode)
This methods writes in the CPU of the EPOS devis the values of the
parameters set for the mode.
|
void |
writeParameters(Map<String,Integer> paramMap)
Write to the CPU of the EPOS a map of parameters.
|
void |
writeParameters(String modeInString) |
void |
writeTargetPosition(int aValue)
In PROFILE_POSITION mode this methods set the target position.
|
configAsHeartbeatConsumer, configAsHeartbeatProducer, configAsHeartbeatProducer, createStatusDataPublishedByCanOpenDevice, displayErrorHistory, displayErrorRegister, getErrorHistory, getErrorRegister, getNodeID, getSerialNB, getTcpProxy, initModule, isBooted, isInError, isInitialized, processUpdate, readErrorHistory, readErrorHistoryNames, readErrorRegister, readNumberOfErrors, readSDO, saveParameters, setBooted, toString, writeSDOgetNObserverThreads, getObservables, getTickMillis, init, listens, sendSignal, sendSignalWithTimeLimit, setNObserverThreads, setObservables, setTickMillis, shutdownNow, signal, startTicking, tick, updateaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdisplayErrorHistory, getErrorHistory, getErrorRegister, isInError, readNumberOfErrorsgetNodeID, getSerialNB, isBooted, isInitialized, printState, setBootedgetComponentConfigurationEnvironment, getComponentLookup, getName, getSubsystemraiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarning, raiseWarningchange, dropSubmittedChanges, getChildren, getComponentByName, getEnvironment, getParent, getParentObject, getSubmittedChanges, isParameterConfigurable, postStart, printConfigurableParameters, setBulkParameter, start, submitChange, submitChanges, validateBulkChangeprotected EPOSEnumerations.EposMode mode
public CanOpenEPOS(String nodeID, String serialNB, Map<String,Integer> paramsForCurrent, Map<String,Integer> paramsForProfilePosition, Map<String,Integer> paramsForHoming)
nodeID - serialNB - paramsForCurrent - paramsForProfilePosition - paramsForHoming - public boolean isEnabledToPublish()
EPOSControllerisEnabledToPublish in interface EPOSControllerpublic boolean isTurnedOff()
EPOSControllerisTurnedOff in interface EPOSControllerpublic boolean isParametersOK()
EPOSControllerisParametersOK in interface EPOSControllerpublic Map<String,Integer> getParamsForHoming()
EPOSControllergetParamsForHoming in interface EPOSControllerpublic Map<String,Integer> getParamsForProfilePosition()
EPOSControllergetParamsForProfilePosition in interface EPOSControllerpublic Map<String,Integer> getParamsForCurrent()
EPOSControllergetParamsForCurrent in interface EPOSController@ConfigurationParameterChanger public void setParamsForCurrent(Map<String,Integer> newMap)
@Command(description="Change a parameter for mode CURRENT, and write the new value on the CPU of the controller.",
type=QUERY,
level=1)
public void changeParameterForCurrent(String clef,
int value)
@Command(description="Change a parameter for mode ProfilePosition, and write the new value on the CPU of the controller.",
type=QUERY,
level=1)
public void changeParameterForProfilePosition(String clef,
int value)
@Command(description="Change a parameter for mode Homing, and write the new value on the CPU of the controller.",
type=QUERY,
level=1)
public void changeParameterForHoming(String clef,
int value)
public EPOSEnumerations.EposMode getMode()
getMode in interface EPOSControllerpublic int getMaxCurrent()
EPOSControllergetMaxCurrent in interface EPOSControllerpublic int getMinCurrent()
EPOSControllergetMinCurrent in interface EPOSControllerpublic int getMaxSpeed()
EPOSControllergetMaxSpeed in interface EPOSControllerpublic int getMaxPosition()
EPOSControllergetMaxPosition in interface EPOSControllerpublic int getMinPosition()
EPOSControllergetMinPosition in interface EPOSControllerpublic int getMotorParameterValue(String parameterName) throws EPOSConfigurationException
parameterName - EPOSConfigurationException@Command(type=QUERY,
level=1,
description="Print the configured parameters for this EPOS for this mode.This command doesn\'t read the controlle.")
public String printParameters()
SDORequestExceptionShortResponseToSDORequestException@Command(type=QUERY,
level=1,
description="Print the configured parameters for this EPOS for a mode name given in argument. This command doesn\'t read the controller.")
public String printConfigurationParameters(String modeInString)
modeInString - @Command(type=QUERY,
level=1,
description="Reads the EPOS mode in the CPU of the EPOS device and updates the field mode.")
public EPOSEnumerations.EposMode readMode()
readMode in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestException@Command(type=ACTION,
level=3,
description="Change EPOS mode .")
public String changeMode(String modeInString)
modeInString - SDORequestExceptionpublic String changeMode(EPOSEnumerations.EposMode newMode)
changeMode in interface EPOSControllernewMode - SDORequestException@Command(type=QUERY,
level=1,
description="This methods reads in the CPU of the EPOS the values of the parameters for a given mode.")
public String readParameters(String modeInString)
modeInString - SDORequestExceptionShortResponseToSDORequestExceptionpublic String readParameters(EPOSEnumerations.EposMode aMode)
EPOSControllerreadParameters in interface EPOSController@Command(type=QUERY,
level=1,
description="Read the parameters for the actual mode.")
public String readParameters()
@Command(type=ACTION,
level=3,
description="This methods writes in the CPU of the EPOS device the values of the parameters set for the mode.")
public void writeParameters()
@Command(type=ACTION,
level=3,
description="This methods writes in the CPU of the EPOS device the values of the parameters set for the mode given as argument")
public void writeParameters(String modeInString)
public void writeParameters(EPOSEnumerations.EposMode mode)
writeParameters in interface EPOSControllermode - SDORequestExceptionpublic void writeParameters(Map<String,Integer> paramMap)
writeParameters in interface EPOSControllerparamMap - SDORequestException@Command(type=ACTION,
level=3,
description="Set EPOS parameter with the value given as argument.")
public String writeParameter(String parameterName,
int value)
parameterName - the name of the parametervalue - in decimalSDORequestExceptionpublic String writeParameter(EPOSEnumerations.Parameter param, int value)
param - parameter to be setvalue - decimal valueSDORequestException@Command(type=ACTION,
level=3,
description="Set EPOS parameter with the hexadecimal value given as argument.")
public String writeParameterInHexa(String parameterName,
String hexaValue)
parameterName - the name of the parameterhexaValue - value of the parameter given in hexaSDORequestExceptionpublic String writeParameterInHexa(EPOSEnumerations.Parameter param, String hexaValue)
writeParameterInHexa in interface EPOSControllerparam - hexaValue - SDORequestException@Command(type=QUERY,
level=1,
description="Reads in the EPOS CPU the decimal value of the Parameter which parameter name is given as argument.")
public int readParameter(String parameterName)
parameterName - name of the parameter to readSDORequestExceptionShortResponseToSDORequestExceptionpublic int readParameter(EPOSEnumerations.Parameter param)
param - FcsHardwareException@Command(type=QUERY,
level=1,
description="Reads in the EPOS CPU the hexadecimal value of the Parameter which parameter name is given as argument.")
public String readParameterInHexa(String parameterName)
parameterName - FcsHardwareExceptionpublic String readParameterInHexa(EPOSEnumerations.Parameter param)
param - FcsHardwareExceptionpublic boolean isTargetPositionReached(int position)
isTargetPositionReached in interface EPOSControllerposition - FcsHardwareException@Command(type=QUERY,
level=1,
description="Read controller\'s parameter in the CPU for each mode and warn if a parameter has not the same value as in the configuration.Then publish data.")
public String initializeAndCheckHardware()
initializeAndCheckHardware in interface PieceOfHardwareinitializeAndCheckHardware in class CanOpenDeviceFcsHardwareException@Command(type=QUERY,
level=1,
description="Returns true if the controller is enabled.")
public boolean isEnabled()
EPOSControllerisEnabled in interface EPOSController@Command(type=ACTION,
level=1,
description="This methods enables the controller : i.e. this makes it able to receive commands.")
public String enable()
enable in interface EPOSControllerSDORequestException@Command(type=ACTION,
level=1,
description="Shutdown the controller.")
public String shutdown()
shutdown in interface EPOSControllerSDORequestException@Command(type=ACTION,
level=1,
description="writeControlWord(\"F\")")
public void switchOnEnableOperation()
EPOSControllerswitchOnEnableOperation in interface EPOSController@Command(type=ACTION,
level=3,
description="Restore default parameters. AT YOUR OWN RISK.")
public Object restoreParameters()
SDORequestException@Command(type=ACTION,
level=1,
description="Write a value in hexa in the control world (index=6040, subindex=0,size=2)")
public void writeControlWord(String value)
writeControlWord in interface EPOSControllervalue - in hexaSDORequestException@Command(type=QUERY,
level=1,
description="Read the control world (index=6040, subindex=0,size=2)")
public String readControlWord()
SDORequestExceptionShortResponseToSDORequestException@Command(type=QUERY,
level=1,
description="Read the status world (index=6041, subindex=0,size=2)")
public String readStatusWord()
SDORequestExceptionShortResponseToSDORequestException@Command(type=ACTION,
level=1,
description="QuickStop.")
public void quickStop()
EPOSControllerquickStop in interface EPOSController@Command(type=ACTION,
level=1,
description="Turn OFF controller (in mode CURRENT, stop CURRENT) and shutdown.")
public String off()
EPOSControlleroff in interface EPOSController@Command(type=ACTION,
level=3,
description="Set the current value in the EPOS CPU.")
public void writeCurrent(int aValue)
writeCurrent in interface EPOSControlleraValue - UNIT=mA / FORMAT=decimal the value of the current to be
sent.FcsHardwareException@Command(type=QUERY,
level=1,
alias="readCurrentActualValue",
description="In Current Mode this methods returns the current actualy received by the motor.")
public int readCurrent()
readCurrent in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestException@Command(type=QUERY,
level=1,
alias="readCurrentAverage",
description="In Current Mode this methods returns the average of the current received by the motor.")
public int readCurrentAverageValue()
SDORequestExceptionShortResponseToSDORequestExceptionpublic void stopCurrent()
SDORequestException@Command(type=QUERY,
level=1,
alias="readPositionActualValue",
description="In PROFILE_POSITION Mode this methods returns the actual position.")
public int readPosition()
readPosition in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestException@Command(type=QUERY,
level=1,
description="Read the position returned by the absolute encoder (single serial data).")
public int readSSIPosition()
readSSIPosition in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestException@Command(type=QUERY,
level=1,
description="In PROFILE_POSITION returns the value of the parameter ProfileVelocity.")
public int readProfileVelocity()
readProfileVelocity in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestExceptionpublic String setHomingMethodActual()
RejectedCommandException - if not in HOMING mode.FcsHardwareExceptionpublic void startHoming()
public String setHomePosition(int position)
position - in decimal formatSDORequestExceptionRejectedCommandException@Command(type=ACTION,
level=3,
description="Define the actual position as position given as argument.")
public void defineAbsolutePosition(int position)
defineAbsolutePosition in interface EPOSControllerSDORequestExceptionRejectedCommandException@Command(type=ACTION,
level=1,
description="In PROFILE_POSITION mode this methods set the target position. Target position has to be given in microns.")
public void writeTargetPosition(int aValue)
writeTargetPosition in interface EPOSControlleraValue - UNIT=mA / FORMAT=decimal the value of the current to be
sent.RejectedCommandExceptionSDORequestException@Command(type=QUERY,
level=1,
description="In HOMING mode and PROFILE_POSITION mode this indicates that the position is reached.")
public boolean checkTargetReached()
checkTargetReached in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestException@Command(type=QUERY,
level=1,
description="Check if the Controller is in fault.")
public void checkFault()
checkFault in interface EPOSControllerFcsHardwareException@Command(type=ACTION,
level=1,
description="Clear faults on the controller.",
alias="resetFault")
public void faultReset()
public void checkParameters(EPOSEnumerations.EposMode aMode)
EPOSControllercheckParameters in interface EPOSController@Command(type=QUERY,
level=1,
description="For every parameter to be defined for this mode this method compares the values in configuration with the value stored in controller CPUand throws a HardwareException if these values are not equal.")
public void checkParameters(String modeInString)
checkParameters in interface EPOSControllermodeInString - SDORequestExceptionShortResponseToSDORequestExceptionpublic void checkParameters(Map<String,Integer> paramsMap)
paramsMap - SDORequestExceptionShortResponseToSDORequestException@Command(type=ACTION,
level=3,
description="Change mode to CURRENT mode and initialize theCURRENT mode parameters from configuration values.")
public void activateCurrentMode()
@Command(type=ACTION,
level=3,
description="Change mode to HOMING mode and initialize theHOMING mode parameters from configuration values.")
public void activateHomingMode()
@Command(type=ACTION,
level=3,
description="Change mode to PROFILE_POSITION mode and initialize thePROFILE_POSITION mode parameters from configuration values.")
public void activateProfilePositionMode()
@Command(type=ACTION,
level=1,
description="Put the brake on to prevent the trucks motion.")
public void activateBrake()
activateBrake in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestException@Command(type=ACTION,
level=1,
description="Release the brake in order to be able to move the trucks.")
public void releaseBrake()
releaseBrake in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestException@Command(type=ACTION,
level=1,
description="Activate the holding brake and shutdown the controller.")
public void disable()
EPOSControllerdisable in interface EPOSControllerpublic StatusDataPublishedByEPOSController getStatusData()
getStatusData in class CanOpenDevice@Command(type=QUERY,
level=1,
alias="refreshGUI",
description="Publish data for the controller on the status bus.")
public void publishData()
publishData in class CanOpenDeviceCopyright © 2016 LSST. All rights reserved.