
public class CanOpenEPOS extends CanOpenDevice implements EPOSController
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
enabledToPublish
Used to publish on the status bus for the GUI*
|
protected EPOSEnumerations.EposMode |
mode |
protected boolean |
parametersOK
used in checkParameters and initializeAndCheckHardware methods
|
booted, errorHistory, errorRegister, inError, initialized, name, nodeID, serialNB, subs, tcpProxyalertSeparater| Constructor and Description |
|---|
CanOpenEPOS(int 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 |
changeEPOSParameter(String key,
int value)
Changes an EPOS parameter for this controller.
|
void |
changeMode(EPOSEnumerations.EposMode newMode)
This methods changes the mode to the new mode given as an argument.
|
void |
changeProfileVelocity(int newVelocity)
change ProfileVelocity to a new value.
|
void |
checkFault()
Check if the Controller is in fault.
|
void |
checkParameters(EPOSEnumerations.EposMode aMode)
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 FcsHardwareException if these values are not equal.
|
void |
checkParameters(Map<String,Integer> paramsMap)
Compare values of parameters in the map with the values of parameters in
the controller CPU.
|
void |
faultReset()
Clear faults on the controller and clear alarm that was raised for this controller.
|
EPOSEnumerations.EposMode |
getMode()
Return Epos mode for GUI.
|
void |
initializeAndCheckHardware()
Check if the parameters in the cPU of the controller have the right values.
|
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.
|
void |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
String |
readControlWord()
Read the control world (index=6040, subindex=0,size=2)
|
int |
readCurrent()
In Current Mode this methods returns the unsCurrent actualy received by the motor.
|
int |
readCurrentAverageValue()
In Current Mode this methods returns the average of the unsCurrent 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.
|
protected String |
readParameterInHexa(String parameterName)
Reads in the EPOS CPU the hexadecimal value of the Parameter and display it in
hexadecimal format.
|
String |
readStatusWord()
Read the status world (index=6041, subindex=0,size=2)
|
int |
readVelocity()
return motor velocity read on controller CPU
Unit = RPM
|
void |
restoreParameters()
Restore default parameters.
|
void |
setEnabledToPublish(boolean enabledToPublish) |
void |
writeControlWord(int value)
Write a value in hexa in the control world (index=6040,
subindex=0,size=2)
|
void |
writeCurrent(int aValue)
In unsCurrent mode this methods send a unsCurrent to the motor.
|
void |
writeParameter(EPOSEnumerations.Parameter param,
int value)
This method writes a parameter in the CPU of the EPOS.
|
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 |
writeTargetPosition(int aValue)
In PROFILE_POSITION mode this methods set the target position.
|
void |
writeTargetVelocity(int velocity)
set target velocity in mode PROFILE_VELOCITY
|
configAsHeartbeatConsumer, configAsHeartbeatProducer, createStatusDataPublishedByCanOpenDevice, displayErrorHistory, displayErrorRegister, doInitializePDOs, getAlertService, getErrorHistory, getErrorRegister, getName, getNodeID, getSerialNB, getSubsystem, getTcpProxy, isBooted, isInError, isInitialized, onEmergencyMessage, readErrorHistory, readErrorRegister, readNumberOfErrors, readSDO, readStringSerialNumber, resetError, saveParameters, setBooted, toString, updateFromPDO, writeSDOclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcheckCurrent, checkEnabled, checkTargetReached, createStatusDataPublishedByEPOSController, defineAbsolutePosition, disable, displayErrorHistory, enable, enableAndWriteAbsolutePosition, enableAndWriteCurrent, enableAndWriteRelativePosition, getErrorHistory, getErrorRegister, isEnabled, isInError, isInMode, isTargetReached, quickStop, readNumberOfErrors, readParameter, readParameters, readParameters, readParameters, readPosition, readPositionSensorType, readProfileVelocity, readSSIPosition, startVelocity, stopAction, stopPosition, stopVelocity, switchOnEnableOperation, writeParameters, writeParameterscheckBooted, checkId, checkInitialized, createStatusDataPublishedByHardware, doInitializePDOs, getName, getNodeID, getSerialNB, initializePDOs, isBooted, isInitialized, printState, raiseAlarmIfMissing, setBooted, updateFromPDOonEmergencyMessage, onFault, onFaultResetclearAlarm, getAlertService, getSubsystem, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarning, raiseWarning, raiseWarning, raiseWarningprotected boolean parametersOK
protected EPOSEnumerations.EposMode mode
protected boolean enabledToPublish
public CanOpenEPOS(int 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 void setEnabledToPublish(boolean enabledToPublish)
setEnabledToPublish in interface EPOSControllerpublic boolean isParametersOK()
EPOSControllerisParametersOK in interface EPOSControllerpublic EPOSEnumerations.EposMode getMode()
getMode in interface EPOSController@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=1, description="Changes EPOS mode in the CPU of the EPOS device and updates the field mode.") public void changeMode(EPOSEnumerations.EposMode newMode)
changeMode in interface EPOSControllernewMode - SDORequestExceptionpublic void changeProfileVelocity(int newVelocity)
changeProfileVelocity in interface EPOSControllernewVelocity - @Command(type=QUERY, level=1, description="Changes an EPOS parameter for this controller. Writes the new value on the CPU of the controller.Changes the new value in the configuration. But doesn\'t save the new parameter in the CPU. To save in CPU controller, use command saveParameters and saveAllChanges.To save configuration, use command saveAllChanges.") public void changeEPOSParameter(String key, int value)
key - value - @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(EPOSEnumerations.EposMode mode)
writeParameters in interface EPOSControllermode - SDORequestException@Command(type=ACTION, level=3, description="Set EPOS parameter with the value given as argument.") public void writeParameter(EPOSEnumerations.Parameter param, int value)
writeParameter in interface EPOSControllerparam - value - in decimalSDORequestExceptionpublic int readParameter(EPOSEnumerations.Parameter param)
readParameter in interface EPOSControllerparam - FcsHardwareException@Command(type=QUERY, level=1, description="Reads in the EPOS CPU the value of the Parameter which parameter name is given as argument.") protected String readParameterInHexa(String parameterName)
parameterName - 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 void initializeAndCheckHardware()
initializeAndCheckHardware in interface PieceOfHardwareinitializeAndCheckHardware in class CanOpenDeviceFcsHardwareException@Command(type=ACTION, level=3, description="Restore default parameters. AT YOUR OWN RISK.") public void 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(int 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()
readStatusWord in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestException@Command(type=ACTION, level=3, description="Sent current to controller the EPOS CPU. UNIT=mA / FORMAT=decimal") public void writeCurrent(int aValue)
writeCurrent in interface EPOSControlleraValue - UNIT=mA / FORMAT=decimal the value of the unsCurrent 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()
SDORequestExceptionShortResponseToSDORequestException@Command(type=QUERY, level=1, description="return motor velocity read on controller CPU. Unit:rpm") public int readVelocity()
readVelocity in interface EPOSController@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 unsCurrent to be
sent.RejectedCommandExceptionSDORequestException@Command(type=ACTION, level=1, description="set target velocity in mode PROFILE_VELOCITY.") public void writeTargetVelocity(int velocity)
writeTargetVelocity in interface EPOSControllervelocity - @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()
@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 FcsHardwareException if these values are not equal.") public void checkParameters(EPOSEnumerations.EposMode aMode)
checkParameters in interface EPOSControllerSDORequestExceptionShortResponseToSDORequestExceptionpublic void checkParameters(Map<String,Integer> paramsMap)
paramsMap - SDORequestExceptionShortResponseToSDORequestException@Command(type=QUERY, level=1, alias="refreshGUI", description="Publish data for the controller on the status bus.") public void publishData()
publishData in interface PieceOfHardwarepublishData in class CanOpenDeviceCopyright © 2018 LSST. All rights reserved.