K1DM3
Control System
Software User’s Guide
William Deich
University of California Observatories
22 Nov 2019
ver 3.7a
Contents
1 Overview 6
1.1 Active Components of K1DM3 . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1.1 Drum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1.2 Swingarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2 Position Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.3 Motion Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.4 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.4.1 Back-end Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.4.2 End-User Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.5 K1DM3 Private Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2 Starting, Stopping, Suspending Services 17
2.1 Starting/Stopping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2 Suspending Dispatchers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3 Special No-Dock Engineering Version . . . . . . . . . . . . . . . . . . . . . . . 19
2.4 Periodic Restarts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3 Components, Assemblies, and Sequencers 21
3.1 Elementary Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2 Compound Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.3 Assemblies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.4 Sequencers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.5 The ACTIVATE Sequencer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.6 The M3AGENT Sequencer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.7 Monitoring Sequencer Execution . . . . . . . . . . . . . . . . . . . . . . . . . 27
4 Dispatcher Interfaces for Routine Operations 29
4.1 TCS Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.2 M3AGENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.3 Hand Paddle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.3.1 LED’s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.3.2 Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5 GUI’s 36
5.1 Tcsgui . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.2 The Engineering GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.3 The K1dm3mon GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2
ver 3.7a CONTENTS
6 Restrictions & Interlocks 41
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
6.2 Bypassing the M3AGENT Sequencer . . . . . . . . . . . . . . . . . . . . . . . 42
6.3 Conditions Without Override . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
6.3.1 Swingarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
6.3.2 Drum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
6.4 Overridable Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7 Recovery From Failures 47
7.1 General Troubleshooting Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.2 Low-level Actuator Operations . . . . . . . . . . . . . . . . . . . . . . . . . . 48
7.3 Specific Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.3.1 Reconnect failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.3.2 Amplifier fault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
7.3.3 Erroneous unclosed-clamps . . . . . . . . . . . . . . . . . . . . . . . . 50
7.3.4 Actual unclosed clamps . . . . . . . . . . . . . . . . . . . . . . . . . . 51
7.3.5 Air supply nozzle will not disconnect. . . . . . . . . . . . . . . . . . . 52
7.3.6 Need to operate swingarm, mirror facing down . . . . . . . . . . . . . 52
7.3.7 Software lockout is active . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.3.8 SASS: Swingarm past deploy point . . . . . . . . . . . . . . . . . . . . 53
7.3.9 SASS: Swingarm in hard stop . . . . . . . . . . . . . . . . . . . . . . . 53
7.3.10 SASS: misaligned arms . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
7.3.11 SASS: Arms misaligned and are past deploy point . . . . . . . . . . . 54
7.3.12 SASS: overshot V-blocks . . . . . . . . . . . . . . . . . . . . . . . . . . 55
7.3.13 SASS: impossible encoder value . . . . . . . . . . . . . . . . . . . . . . 55
7.3.14 Docking pin becomes stuck . . . . . . . . . . . . . . . . . . . . . . . . 55
7.3.15 Docking pin position error . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.3.16 In-tower signal failure . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.4 Power Outage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.5 SASS Temporary Override Procedure . . . . . . . . . . . . . . . . . . . . . . 58
8 Swingarm Safety System (SASS) 60
8.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
8.2 The Safety Monitor and Outputs . . . . . . . . . . . . . . . . . . . . . . . . . 60
8.3 k1dm3saf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
9 The K1DM3 Monitor 64
10 Galildisp Configuration 66
10.1 Major Elements of Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
10.1.1 Motor Axes and Digi-Axes . . . . . . . . . . . . . . . . . . . . . . . . 66
10.1.2 Non-Axis Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
10.1.3 Sequencers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
10.2 Dispatcher and Controller Information . . . . . . . . . . . . . . . . . . . . . . 68
10.3 Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
10.3.1 Template and Definition files . . . . . . . . . . . . . . . . . . . . . . . 69
10.3.2 The .defs and XML files . . . . . . . . . . . . . . . . . . . . . . . . . . 69
10.3.3 The .conf files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
10.4 Custom Dispatcher Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
3
CONTENTS ver 3.7a
11 Utility Programs 71
11.1 k1dm3.summarize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
11.2 k1dm3.status.email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
11.3 k1dm3.io . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
12 k1dm3 KTL Service Keywords 75
12.1 Dispatcher Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
12.2 Controller Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
12.3 Digi-Axis Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
12.4 Motor-Axis Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
12.5 Assembly (Combo-Axis) Keywords . . . . . . . . . . . . . . . . . . . . . . . . 87
12.5.1 Motor-like Assemblies . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
12.5.2 Digi-like Assemblies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
12.6 Status from Safety System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
12.7 TCS Interface Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
12.8 Major Sequencer Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
12.9 Elevation Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
12.10Environment Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
12.11Other Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
13 k1dm3saf KTL Service Keywords 98
14 k1dm3mon KTL Service Keywords 101
A Useful Numbers 104
A.1 Network Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
A.2 Swingarm Safety System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
A.3 Swingarm Actuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
A.4 Drum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
A.5 Typical Move Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
A.6 Other Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
B Actuator Calibration and Position Adjustment 109
B.1 Swingarm Absolute Encoders . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
B.2 Drum Readhead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
C Modifying k1dm3saf Galil Code 111
D Modifying k1dm3 Galil Code 114
D.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
D.2 Downloading Code for Galildisp . . . . . . . . . . . . . . . . . . . . . . . . . . 115
E How to do a Fresh Install 118
E.1 Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
E.2 System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
E.3 Software Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Bibliography 119
Subject Index 121
4
ver 3.7a CONTENTS
KTL Keyword Index 124
5
Chapter 1
Overview
1.1 Active Components of K1DM3
The K1DM3 module is conceptually simple. It has just two degrees of freedom: the inner
drum rotates to move the tertiary mirror to any instrument position (Nasmyth, “bent-
Cassegrain,” or Cassegrain orientation), and the swingarm moves the mirror in or out of
the Cassegrain light path. This section summarizes all the components that are visible to
the control system.
Figure 1.1: The K1DM3 Module, swingarm deployed (left) and retracted (right).
1.1.1 Drum
The drum’s rotation is driven by a Magmotor C33-H-400 servomotor (fig 1.2). Accurate
position feedback is provided by a Renishaw LM10 encoder system, using an encoder tape
6
ver 3.7a 1.1. ACTIVE COMPONENTS OF K1DM3
with 5µ resolution mounted on the inner drum, and a readhead mounted on the outer drum.
The tape has distance-coded reference marks, allowing the drum to home within 20 cm
motion from any position. Additionally, there are limit switches at the Cass/Stow and
MirrorUp (6- and 12-o’clock) positions. These switches provide the ability for the drum
to be calibrated with no motion whatsoever at those two positions, which is important for
bootstrapping the system from a cold start.
Figure 1.2: The drum rotation drive.
Each instrument position around the drum, plus the 6- and 12-o’clock positions, is
defined by a detent. The detent is engaged by a detent mechanism after the motor drives
the drum to the instrument position (fig 1.3, upper). The motor’s drive gear is set up with a
large amount of backlash — nearly 1900 motor encoder counts — between it and the drum’s
ring gear. This enables the option of finishing a move sequence with the motor backing off
by 1/2 backlash, before engaging the detent mechanism to pull the drum into the final
position. It turns out that the drive reliably positions the drum to 2 load encoder counts, or
10µ, and that the detent mechanism can easily pull the drum into final position regardless
of whether the motor is engaging firmly with the gear ring, so the large backlash is not in
fact required, and this optional end-of-move sequence is not implemented.
The detent mechanism uses a Bimba air cylinder that drives a steel wheel into or out
of one of the position-defining V-blocks (fig 1.3, lower). If air pressure is lost, the detent
will disengage. Two limit switches indicate when the detent mechanism fully engaged or
disengaged.
The module is balanced when the