Firmware

Motor Controller Firmware

Functionality of the SIMOTION Controller

In the following subsections, the swing arm for the left LBT eye (SX) is considered. The swing arm for the right LBT eye (DX) is similar to the one of the left side.

Commands

The SIMOTION controller knows these commands:
  1. Move to park position (commandSX: Bit 0)
  2. Move to work position (commandSX: Bit 1)
  3. Stop motion immediately (commandSX: Bit 2)
  4. Move absolute (commandSX: Bit 6; position in ABS_Pos_SX)
  5. Move relative (commandSX: Bit 5; position in Rel_Pos_SX)
  6. Reset swing arm to defaults (commandSX: Bit 7)
  7. Lock/unlock swing arm (swing arm will refuse movement commands) (commandSX: Bit 3)

Status

  1. Is condition fulfilled for enabling swing arm? (receiveSX: Bit 0)
  2. Has any error occurred during latest swing arm motion? (receiveSX: Bit 1)
  3. Is swing arm in motion? (receiveSX Bit 2)
  4. Is swing arm driving into park position? (receiveSX: Bit 3)
  5. Is swing arm in work position? (receiveSX: Bit 4)
  6. Is position switch 1 activated? (receiveSX: Bit 5)
  7. Is position switch 2 activated? (receiveSX: Bit 6)
  8. Is collision switch activated? (receiveSX: Bit 7)
  9. Is holding magnet switched on or off? (receiveSX: Bit 8)
  10. What is the rotation direction (on or off)? (receiveSX: Bit 9 and 10)
  11. Was recent command plausible? (receiveSX: Bit 15)
  12. What is the incremental position? (Pos_SX_INC)
  13. What is the absolute encoder position? (Pos_SX_ABS)
  14. Is telescope in zenith position? (receiveTELES: Bit 0)
  15. Is the swing arm enabled globally? (receiveTELES: Bit 1)
  16. Has Argos enabled the swing arm? (receiveTELES: Bit 2)
  17. Is prime focus camera (SX/DX) in park position? (receiveTELES: Bit 3 and 4)
  18. What is the current motor torque? (Torque_SX)

Tuning

  1. Set acceleration (A_SX)
  2. Set deceleration (D_SX)
  3. Set velocity v1 / v2 / v3 (V1_SX, V2_SX, V3_SX)
  4. Set lower limit of working range (LL_work_SX)
  5. Set upper limit of working range (UL_work_SX)
  6. Set lower limit of velocity v2 range (LL_V2_SX)
  7. Set upper limit of velocity v2 range (LU_V2_SX)
  8. Set absolute encoder position where the magnet is toggled on / off (Pos_SX_MAG)
  9. Set rotation to positive / negative (commandSX: Bit 4)
  10. Set the motor switch off torque (Off_torque_SX)

Range of Values

  1. Default velocity V1: 20.0 rpm
  2. Default velocity V2: 75.0 rpm
  3. Default velocity V3: 25.0 rpm
  4. Default acceleration/deceleration: 1500 r/min^2
  5. Maximum velocity: 120 rpm
  6. Maximum acceleration: 2500 r/min^2
  7. Maximum torque: 13.5 Nm

Creating Custom Web Pages

The Simotion motor controller runs a web server which replaces placeholders in HTML files by current values. The whole procedure is documented in section 2.5.9 of the diagnostic manual (German only)

The following steps are necessary:
  1. Create HTML file containing server side includes for the desired values (e.g. foo.html).
  2. Rename the HTML file extension to .mcs (e.g. foo.mcs).
  3. Convert the .mcs file to a .mbs file (e.g. foo.mbs) by using a Windows-based conversion tool
  4. Upload the file on http://<IP address of web server>/FILES.
  5. Access the page via http://<IP address of web server/FILES/foo.htm
The Argos SVN repository contains the official HTM pages which can serve as a template: /trunk/misc/swingarm/html

Engineering GUI

The following screen-shots presents the engineering GUI.

Swing_Arm_Engineering_GUIs.png

Properties of the Swing Arm

A sample configuration file is the source code repository.

Overview

Mandatory HTTP Settings
 * DEV[0-9]*
   * HOSTNAME:String (e.g. "127.0.0.1")
   * HTTP_PORT:Int
   * ROTATION_DIRECTION:String ("NEGATIVE", "POSITIVE")
   * TELESCOPE_SIDE:String ("SX", "DX")

Automatically Generated Properties
* DEV[0-9]*:String=GUI +UI:String=$INSROOT/share/ui/ArgosSwingArm.ui
  * IS_REACHABLE:Bool=1
  * NAME:String=swing_arm_SX
  * COMMAND
    * MOVE_ABSOLUTE:Completion
       +ABSOLUTE_MOTION_DESTINATION_IN_DEGREE:Double
    * MOVE_RELATIVE:Completion
       +RELATIVE_MOTION_DESTINATION_IN_DEGREE:Double
    * MOVE_TO_PARK_POSITION:Completion
    * MOVE_TO_WORKING_POSITION:Completion
    * RESET_TO_DEFAULTS:Completion
    * STOP_MOTION:Completion
    * LOCK:Completion
    * UNLOCK:Completion
  * STATUS
    * ARE_CONDITIONS_FULFILLED_FOR_ENABLING_SWING_ARM:String ("yes", "no", "?")
    * CURRENT_ABSOLUTE_POSITION_IN_DEGREE:String (number, "?")
    * CURRENT_HOLDING_MAGNET_STATE:String ("OFF", "ON", "UNKNOWN", "?")
    * CURRENT_INCREMENTAL_ENCODER_POSITION_IN_DEGREE:String (number, "?")
    * CURRENT_MOTOR_TORQUE_IN_NEWTONMETRE:String (number, "?")
    * CURRENT_ROTATION_DIRECTION:String ("POSITIVE", "NEGATIVE", "UNKNOWN", "?")
    * HARDWARE_STATUS:String
    * HAS_ANY_ERROR_OCCURED_DURING_RECENT_MOTION:String ("yes", "no", "?")
    * HAS_ARGOS_ENABLED_SWING_ARM:String ("yes", "no", "?")
    * IS_COLLISION_SWITCH_ACTIVATED:String ("yes", "no", "?")
    * IS_INDEX_SWITCH_1_ACTIVATED:String ("yes", "no", "?")
    * IS_INDEX_SWITCH_2_ACTIVATED:String ("yes", "no", "?")
    * IS_IN_MOTION:String ("yes", "no", "?")
    * IS_IN_PARK_POSITION:String ("yes", "no", "?")
    * IS_IN_WORKING_POSITION:String ("yes", "no", "?")
    * IS_LOCKED:String ("yes", "no", "?")
    * IS_PRIME_FOCUS_CAMERA_IN_PARK_POSITION:String ("yes", "no", "?")
    * IS_SWING_ARM_ENABLED_GLOBALLY:String ("yes", "no", "?")
    * IS_TELESCOPE_IN_ZENITH_POSITION:String ("yes", "no", "?")
    * WAS_RECENT_COMMAND_PLAUSIBLE:String ("yes", "no", "?")
  * TUNING
    * ACCELERATION_IN_REVOLUTIONS_PER_SQUARE_MINUTE
      * CURRENT_VALUE:String  (number, "?")
      * SET_VALUE:Double
    * DECELERATION_IN_REVOLUTIONS_PER_SQUARE_MINUTE
      * CURRENT_VALUE:String (number, "?")
      * SET_VALUE:Double
    * LOWER_LIMIT_OF_VELOCITY_V2_IN_DEGREE
      * CURRENT_VALUE:String (number, "?")
      * SET_VALUE:Double
    * LOWER_LIMIT_OF_WORKING_RANGE_IN_DEGREE
      * CURRENT_VALUE:String (number, "?")
      * SET_VALUE:Double
    * MAGNET_TOGGLING_ABSOLUTE_ENCODER_POSITION_IN_DEGREE
      * CURRENT_VALUE:String (number, "?")
      * SET_VALUE:Double
    * MOTOR_SWITCH_OFF_TORQUE_IN_NEWTONMETRE
      * CURRENT_VALUE:String (number, "?")
      * SET_VALUE:Double
    * UPPER_LIMIT_OF_VELOCITY_V2_IN_DEGREE
      * CURRENT_VALUE:String (number, "?")
      * SET_VALUE:Double
    * UPPER_LIMIT_OF_WORKING_RANGE_IN_DEGREE
      * CURRENT_VALUE:String (number, "?")
      * SET_VALUE:Double
    * VELOCITY_V1_IN_REVOLUTIONS_PER_MINUTE
      * CURRENT_VALUE:String (number, "?")
      * SET_VALUE:Double
    * VELOCITY_V2_IN_REVOLUTIONS_PER_MINUTE
      * CURRENT_VALUE:String (number, "?")
      * SET_VALUE:Double
    * VELOCITY_V3_IN_REVOLUTIONS_PER_MINUTE
      * CURRENT_VALUE:String (number, "?")
      * SET_VALUE:Double

Details

HOSTNAME
The host name of the web server.
HTTP_PORT
The TCP port that the web server is listening on.
ROTATION_DIRECTION
The rotation bit in the command word.
TELESCOPE_SIDE
The telescope side. $ NAME:String: The name of the device.
IS_REACHABLE
the hardware reachability status.
COMMAND.MOVE_ABSOLUTE
The Completion property for starting an absolute movement. The property ABSOLUTE_MOTION_DESTINATION_IN_DEGREE contains the target position.
COMMAND.MOVE_RELATIVE
The Completion property for initiating an relative movement. In the property RELATIVE_MOTION_DESTINATION_IN_DEGREE, the Basda device finds the motion offset.
COMMAND.MOVE_TO_PARK_POSITION
This Completion property moves the swing arm to the park position.
COMMAND.MOVE_TO_WORKING_POSITION
By this Completion property, one moves the swing arm to the working position.
COMMAND.RESET_TO_DEFAULTS
Using this Completion property, the basda device resets the Simotion motor controller.
COMMAND.STOP_MOTION
This Completion property stops any swing arm motion.
COMMAND.LOCK
Using this Completion property, the basda device locks the swing arm.
COMMAND.UNLOCK
This Completion property unlocks the swing arm.
STATUS.ARE_CONDITIONS_FULFILLED_FOR_ENABLING_SWING_ARM
receive{SX, DX} bit no. 0.
STATUS.CURRENT_ABSOLUTE_POSITION_IN_DEGREE
Pos_SX_ABS or Pos_DX_ABS.
STATUS.CURRENT_HOLDING_MAGNET_STATE
receive{SX, DX} bit no. 8.
STATUS.CURRENT_INCREMENTAL_ENCODER_POSITION_IN_DEGREE
Pos_SX_INC or Pos_DX_INC.
STATUS.CURRENT_MOTOR_TORQUE_IN_NEWTONMETRE
Torque_SX or Torque_DX
STATUS.CURRENT_ROTATION_DIRECTION
receive{SX, DX} bit no. 9 and bit no. 10.
STATUS.HARDWARE_STATUS
The form fields status1 or status2.
STATUS.HAS_ANY_ERROR_OCCURED_DURING_RECENT_MOTION
receive{SX, DX} bit no. 1.
STATUS.HAS_ARGOS_ENABLED_SWING_ARM
receiveTeles bit no. 2.
STATUS.IS_COLLISION_SWITCH_ACTIVATED
receive{SX, DX} bit no. 7.
STATUS.IS_INDEX_SWITCH_1_ACTIVATED
receive{SX, DX} bit no. 5.
STATUS.IS_INDEX_SWITCH_2_ACTIVATED
receive{SX, DX} bit no. 6.
STATUS.IS_IN_MOTION
receive{SX, DX} bit no. 2.
STATUS.IS_IN_PARK_POSITION
receive{SX, DX} bit no. 3.
STATUS.IS_IN_WORKING_POSITION
receive{SX, DX} bit no. 4.
STATUS.IS_LOCKED
receive{SX, DX} bit no. 11.
STATUS.IS_PRIME_FOCUS_CAMERA_IN_PARK_POSITION
receiveTeles bit no. 3 or bit no. 4.
STATUS.IS_SWING_ARM_ENABLED_GLOBALLY
receiveTeles bit no. 1.
STATUS.IS_TELESCOPE_IN_ZENITH_POSITION
receiveTeles bit no. 0.
STATUS.WAS_RECENT_COMMAND_PLAUSIBLE
receive{SX, DX}bit no. 15.
TUNING.ACCELERATION_IN_REVOLUTIONS_PER_SQUARE_MINUTE
A_SX or A_DX.
TUNING.DECELERATION_IN_REVOLUTIONS_PER_SQUARE_MINUTE
D_SX or D_DX.
TUNING.LOWER_LIMIT_OF_VELOCITY_V2_IN_DEGREE
LL_V2_SX or LL_V2_DX.
TUNING.LOWER_LIMIT_OF_WORKING_RANGE_IN_DEGREE
LL_work_SX or LL_work_DX.
TUNING.MAGNET_TOGGLING_ABSOLUTE_ENCODER_POSITION_IN_DEGREE
Pos_SX_MAG or Pos_DX_MAG.
TUNING.MOTOR_SWITCH_OFF_TORQUE_IN_NEWTONMETRE
Off_torque_SX or Off_torque_DX.
TUNING.UPPER_LIMIT_OF_VELOCITY_V2_IN_DEGREE
UL_V2_SX or UL_V2_DX.
TUNING.UPPER_LIMIT_OF_WORKING_RANGE_IN_DEGREE
UL_work_SX or UL_work_DX.
TUNING.VELOCITY_V1_IN_REVOLUTIONS_PER_MINUTE
V1_SX or V1_DX.
TUNING.VELOCITY_V2_IN_REVOLUTIONS_PER_MINUTE
V2_SX or V2_DX.
TUNING.VELOCITY_V3_IN_REVOLUTIONS_PER_MINUTE
V3_SX or V3_DX.


Topic attachments
I Attachment Action Size Date Who Comment
ArgosSwingArmExample.cfgcfg ArgosSwingArmExample.cfg manage 1 K 01 Jun 2018 - 17:03 AndrewColson  
SIMOTION_IT_DIAG.pdfpdf SIMOTION_IT_DIAG.pdf manage 3 MB 01 Jun 2018 - 16:59 AndrewColson  
Swing_Arm_Engineering_GUIs.pngpng Swing_Arm_Engineering_GUIs.png manage 483 K 31 Jul 2018 - 22:30 AndrewColson  
U7NW2XMX.exeexe U7NW2XMX.exe manage 72 K 01 Jun 2018 - 17:01 AndrewColson  
swingarm_motor_controller_firmware_20130312.tgztgz swingarm_motor_controller_firmware_20130312.tgz manage 46 MB 01 Jun 2018 - 16:58 AndrewColson  
Topic revision: r5 - 15 Aug 2018, AndrewColson
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback