TOC PREV NEXT INDEX

Put your logo here!


2 USER MANUAL

2.1 THE TCS INTERFACE

The TCS is composed of many software modules, each of them consisting of one or more processes. To unify and simplify the access from users to the TCS functions the TCS Interface was developed, represented by the tif module.

The tif module is responsible for providing the central and only command interface between external users and the TCS. The users are typically higher-level applications, such as INS, ROS or HOS software, or interactive user interfaces related to these applications. The user processes communicate with the TCS by sending commands to and receiving replies from the tif. The tif internally dispatches the commands to the responsible TCS processes, receives their replies and passes them back to the originator (see also the man-page in section 3.1).

The overall TCS design foresees to run one tif instance per telescope focus station, named:

tifNA for the Nasmyth A,
tifNB for the Nasmyth B and
tifCA for the Cassegrain focus.

Each tif instance has access to all TCS processes involved in controlling the corresponding focus, but only one instance at a time is controlling the telescope, because only one focus at a time has the light-beam. An instrument which is connected to a certain focus always talks to the same tif instance, whether it has the light beam or not.

Note:all tif instances have access to the telescope at the same time, whichever focus has the beam. The TCS Interface itself provides no access control functionality. Instrument operators have to take care of not accessing the telescope when another instrument has the focus and is operating.

If for maintenance reasons it is necessarey to e.g. move an adapter for an instrument which doesn't have the beam, this can be done by the TCS operator, who can access all tif instances and all TCS modules and who can also use maintenance commands.

To enable multiple read access to TCS public data, a Data Query Library is provided which is linked to the user process. Also a public Event Configuration Library is provided to attach events to TCS data items. These libraries are described in section 2.3.

The Data Query Library is independent from the tif instances and has no relation with the tif instance under use by an application (if any). All data retrieved via the Data Query Library correspond to the current focus configuration and are always the same, independent of which tif instance is used. This means that, for example, the rotator position is always the position of the rotator with the light beam.

There are two operational configurations for a user (instrument):

· access to the telescope and the adapter
· access to the data query library only

depending on which focus is active.

2.2 COMMANDS

This section gives a list of all TCS commands available up to now, together with a brief description. See section 3.2 for a detailed description of each command, and section 5.1 for sample programs.

NOTE: the command list below reflects the current implementation state of the TCS and is not final. The commands listed here are available with the delivered version of the software. Future releases might include additional commands, as necessary.

NOTE: the command list below applies to the VLT telescope and is slightly different for the NTT telescope. NTT users should check specific NTT documentation for an accurate list of commands available via tif.

The following table alphabetically lists the telescope control commands, i.e. those commands available to an application which has the light-beam. On top of these TCS commands, the tif control process accept all the usual VLT standard commands and a small set of specific commands used for maintenance purposes.

The complete set of commands accepted by a tif control process is described in the reference section 3 of this manual and in the CDT in section 5.4

Units and coordinate systems for command parameters follow VLT conventions.

These are perhaps not the ones some users would expect, or might be different to what is used in other contexts (like FITS Headers). Please, make sure that you always check units and conventions on the Command Definition Table (5.4).

Table 1: Telescope Commands
Command
Description
BOX2GS
Move guide box to actual position of selected guide star, then start guiding.
CLRSTP
Clear ready SETUP file with default values
CYCLAO
Start active optics. The same as STARTAO.
Provided for backward compatibility.
FFIN
Move Cassegrain Flat Field screen IN
FFOUT
Move Cassegrain Flat Field screen OUT
FGETAO
Retrieves the furrent m2 focus offset along Z axis in mm.
FSREL
Release Rapid Guiding Permission
FSREQ
Request permission for performing Rapid Guiding
DMSMODE
Select the operational mode for dome rotation.
auto: automatic position update
semi: position reference calculated every second but preset only on request
command: position reference calculated and preset only on request
GETINS
Get currently selected instrument
GETINSD
Get instrument configuration parameters
OBJROT
Modify image orientation with respect to deafult. Angle given in degrees
OFFSAA
Issue an ALT/AZ offset step
OFFSAD
Issue an RA/DEC offset step
OFFSADG
Issue an RA/DEC combined offset step
OFFSFAD
Absolute or differential adapter focus position setting.
OFFSFM2
Absolute or differential M2 position settings along Z axis.
Provided for backward compatibility, should not be used.
Use SETINSD instead.
OFFSGP
Offset step the guide probe in RA/DEC without stopping guiding
OFFSROT
Issue a rotator offset step in degrees
OFFSXY
Issue an offset step in defined X/Y coordinates.
ONECAL
Active Optics calibrated mirror corrections, based on current telescope altitude.
PRGS
Select the next suitable guide star in the internal catalogue and
position the probe to it. If no more un-tried entry is available
an error is returned.
PRSALAZ
Preset telescope to given ALT/AZ position (fixed)
PRSCOOR
Preset telescope to given RA/DEC coordinates (tracking)
PRSNAME
Preset telescope to named fixed position
ROTTRK
Set rotator tracking mode. One of: normal, altaz, none.
SAVCSTP
Save a copy of the current setup file with the given name
SAVRSTP
Save a copy of the ready setup file with the given name
SELINS
Select the logical observing instrument
SEQAO
Start a set of full active optics corrections.
SETADC
Set ADC separation
SETAV
Set additional velocity
SETBAFF
Retract/deploy sky baffles
SETLAM
Set observed wavelength
SETINSD
Set instrument configuration parameters
SETRLIM
Set limit value for remaining tracking time warning
SETUP
Define a new setup configuration (standard format, as defined in [6], for FITS keywords see section 5.5)
SHCLOSE
(*)
Requests to close an altitude shutter. The mandatory parameter specifies the side:
A or B.

SHOPEN(*)
Requests to open an altitude shutter. The mandatory parameter specifies the side:
A or B.
SHSTAT(*)
Requests altitude shutters status.
STARTAG
Start autoguiding.
STARTAO
Start active optics. The same as CYCLAO.
STOPAG
Stop autoguiding
STOPAO
Stop active optics
STOPCHP
Stop chopping
STOPTRK
Stop tracking and stay at actual position
STRTCHP
Start chopping
WSMODE
Select the operational mode for the windscreens.
auto: automatic position update
semi: position reference calculated every second but preset only on request
command: position reference calculated and preset only on request

(*) available only for Nasmyth adapters, i.e. these commands are rejected for the Cassegrain adapter.

The following table lists briefly the commands available (currently only for simulation) to an application which has acecess only to an adapter (i.e. which doesn't have the telescope beam).

Table 2: Adapter Commands
Command
Description
PRPARK
Move probe to park position
PRCNT
Move probe to centre position
ROTFIX
Set instrument rotator absolute position
ROTTRK
Set rotator tracking mode. One of NORMAL, ALTAZ, NONE
M4IN (*)
Move M4 unit in. Available only on Nasmyth foci.
M4OUT (*)
Move M4 unit out. Available only on Nasmyth foci.

(*) available only for Nasmyth adapters, i.e. these commands are rejected for the Cassegrain adapter.

2.2.1 Sending commands to TIF processes

In order to be able to send commands to tif processes it is necessary:

· To have TCS or TCS Simulation Package installed and configured (see 4 and 2.6.2)
· Environment variables properly set (see in particular 2.6.2.1)
· A running environment with TCS or TCS Simulation database branch (see in particular 2.3.4)
· A running TCS or TCS Simulation software.

2.2.2 Procedures

In this chapters some commands and procedures are described in detail to interact with tif correctly.

1. SETINSD
Store instrument configuration data in the TCS instruments data table for retrieval and use by Instruments and TCS applications.
For each instrument and each instrument mode that has different parameters a separate entry has to stored using SETINSD. The command triggers no action at all, unless it concerns the currently selected instrument. Then the new data might be retrieved and used by TCS applications, e.g. setting a different rotator offset.
2. GETINS
The Operator of TCS makes the instrument selection on the telescope side. The instrument uses the command GETINS to find out which instrument is selected, i.e. to find out if it has the beam.
3. SELINS
Select an entry of the instrument data table (previously stored with SETINSD) as the current instrument. TCS applications are notifed only of the new parameters, e.g. different rotator offset, and they trigger some action of their own accord.
Before using this command, the instrument should use the command GETINS to find out if it has the beam. If so, it can issue a SELINS to set the mode of the instrument. If the instrument does not have the telescope beam, it should set TCS in simulation automatically.
4. OFFSFAD
Offsets the adapter focus to find the best focus for a specific configuration of an instrument.
2.2.2.1 Focusing of the telescope using SETINSD, OFFSFAD

The following information has been excerpted from [12].

The UTs should only be focused using the active optics software. NO subsystem other than active optics is permitted to instruct the secondary unit to move in the Z (focus direction). The determination of the focal plane for the instrument is done by changing the focus of the guide probe, running active optics (with active optics OFFSET set to 0) an letting the active optics system determine the best value for the secondary mirror position. Then inspection of the image quality in the instrument will tell wether this is the best position for the focal plane. Once this value is determined then no further checks are necessary. Assuming the instrument focal plane does not change.

So for each focal plane of the instrument the guide probe offset has to be determined using OFFSFAD and the resulting value set afterwards with an SETINSD in the instrument configuration table, where it's retrieved automatically when a SELINS is issued. SETINSD has no other purpose than storing values for reference. It doesn't move anything, unless one issues SETINSD for the currently selected instrument. If a SELINS is issued the various subsystems retrieve the data set by the appropriate SETINSD.

2.3 APPLICATION PROGRAMMING INTERFACE

The TCS Interface provides some public libraries to be called by any user process to get access to TCS data and to interact programmatically with specific TCS subsystems.

The Data Query Library retrieves TCS data items. This includes functions to retrieve FITS header keywords.
The Event Configuration Library attaches events to TCS data items
The M2 Communication Library allows instruments to control M2 for Rapid Guiding, using the special RapidGuiding LAN

The two data libraries are combined in the tifLibs library files (both static and shared versions) under $VLTROOT/lib and can be linked to an application in the usual way (see man-page of the vltMakefile). The sources need to include the tif.h header file to access library functions. See section 3.3 and 3.5 for man-pages of the libraries, and section 5.1 for a sample program.

Both libraries use the concept of addressing data items by "name". These names are character strings and are also available as #defines. At implementation level, data items are configured via online database tables to allow an easier configuration. Previous versions of the library had a different implementation based on enumerations. This new approach makes the named access easily configurable without having to rebuild application executables.

The M2 Communication Library is available as a CCS library, as a NON CCS library and as an LCU library and is called m2com. The different versions are automatically installed in the proper directory under $VLTROOT, depending on the system configuration and can be linked to an application in the usual way (see man-page of the vltMakefile). The sources need to include the m2com.h header file to access library functions. See section 3.6 for man-pages of the library's functions.

As already mentioned, the tif libraries are independent from the tif instances and have no relation with the tif instance (if any) under use by an application. All data retrieved via the Data Query Library correspond to the current focus configuration and are always the same, independent of which tif instance is used. This means that, for example, the rotator position is always the position of the rotator with the light beam.

2.3.1 Data Query Library

The Data Query Library is intended to export all TCS data items which may be of interest for a user without forcing him to have detailed knowledge about the TCS database. The library has one general routine that retrieves single data items, three special functions that return groups of related data and two functions that produces FITS header data. The FITS functions are described in the following section.

The supported data items (configured by tif in the database) are read only once at startup of any tif application.

The set of functions which return groups of related data items in structures:

· tifGetPosition(): the telescope position in various coordinates.
· tifGetStates(): the states of TCS modules.
· tifGetStatus(): the status of the TCS (returned data still to be defined).

The information returned by the Data Query Library always reflects the state of the TCS correctly even after TCS shut-down or when a process crashes.

The general routine

· tifGetByName()

is provided to query single data items by name. The routine takes a symbolic name, as a string or by using provided defines, as input parameter and returns the data associated with that name in a user buffer, and also information about the data type.

The Table 3: below presents a list of all currently supported named data items and their data types.

The actual name for the name to be used in the call to tifGetByName() is obtained adding the prefix tifDATA_ to the name in the first column of the table. The name and the corresponding define are identical.

Units and coordinate systems for command parameters follow VLT conventions.

These are perhaps not the ones some users would expect, or might be different to what is used in other contexts (like FITS Headers). Please, make sure that you always check units and conventions here and on the man pages before using these values

Entries in the "Unit" column mean:

HMS: hours, minutes, seconds and fractions of seconds
DMS: degrees, arcminutes, arcseconds and fractions of arcseconds
MJD: modified julian date
BOOL: boolean (TRUE or FALSE)

Table 3: Named Data Items
Name
Type
Unit
Description
LST
vltDOUBLE
HMS
Local Sidereal Time
Format: HHMMSS.F, Range: 0 - 240000.0
UTC
vltDOUBLE
MJD
Universal Time Coordinated as modified julian date
HA
vltDOUBLE
HMS
actual Hour Angle
Format: HHMMSS.F, Range: 0 - 240000.0
RA
vltDOUBLE
HMS
actual Right Ascension (apparent places `now')
Format: HHMMSS.F, Range 0 - 240000.0
DEC
vltDOUBLE
DMS
actual Declination (apparent places `now')
Format: +/-DDMMSS.F, Range: -900000.0 - 900000.0
RA2000
vltDOUBLE
HMS
actual Right Ascension at mean place of J2000
Format: HHMMSS.F, Range 0 - 240000.0
DEC2000
vltDOUBLE
DMS
actual Declination at mean place of J2000
Format: +/-DDMMSS.F, Range: -900000.0 - 900000.0
RA2000DEG
vltDOUBLE
deg
actual Right Ascension at mean place of J2000
Range 0 - 360.0
DEC2000DEG
vltDOUBLE
deg
actual Declination at mean place of J2000
Range: -90.0 - 90.0
ALT
vltDOUBLE
deg
actual Altitude position
Range: 0.0 - 90.0
AZ
vltDOUBLE
deg
actual Azimuth position
Range: -180.0 - 360.0 (South=0, Est=90)
ALT_REF
vltDOUBLE
deg
Reference Altitude position
Range: 0.0 - 90.0
AZ_REF
vltDOUBLE
deg
actual Azimuth position
Range: -180.0 - 360.0 (South=0, Est=90)
AIRMASS
vltDOUBLE
none
actual airmass
PRLTIC
vltDOUBLE
deg
actual parallactic angle
Range: 0.0 - 360.0
DVELRA
vltDOUBLE
arcsec /sec
actual differential velocity in RA with respect to normal sidereal rate, Range: -15.0 - +15.0
DVELDEC
vltDOUBLE
arcsec /sec
actual differential velocity in Declination with respect to normal sidereal rate, Range: -15.0 - +15.0
LONGI
vltDOUBLE
rad
telescope site Longitude, west is positive
LATI
vltDOUBLE
rad
telescope site Latitude, south is negative
LEVEL
vltDOUBLE
m
telescope site Height above sea level
REMTIME
vltDOUBLE
sec
actual remaining tracking time
REMLIMIT
vltDOUBLE
sec
limit value for event triggering of remaining tracking time
TRACK
vltLOGICAL
BOOL
flag, indicating if currently in tracking state
FOCUS
vltINT32
focus ID
Current focus station. Can be one of (see mswDefines.h):
mswUNDEFINED_FOCUS 0
mswNASMYTH_A_FOCUS 2
mswnNASMYTH_B_FOCUS 3
mswCASSEGRAIN_FOCUS 4
mswCOUDE_FOCUS 5
mswINTERMEDIATE_D_FOCUS 6
FOCULEN_NA
vltDOUBLE
m
Focal length for Nasmyth focus
FOCULEN_CA
vltDOUBLE
m
Focal length for Cassegrainfocus
FOCULEN_CO
vltDOUBLE
m
Focal length for Coude'focus
FOCUSCALE_NA
vltDOUBLE
arcsec/mm
Focal scale for Nasmyth focus
FOCUSCALE_CA
vltDOUBLE
arcsec/mm
Focal scale for Cassegrainfocus
FOCUSCALE_CO
vltDOUBLE
arcsec/mm
Focal scale for Coude'focus
TELESCOP
vltBYTES20
string
Telescope name
VERSION
vltBYTES80
string
Version of TCS software
INSTALLED
vltBYTES80
string
TCS Installation date and information
OPER
vltBYTES32
string
Name of telescope operator
FOCU_VALUE
vltDOUBLE
mm
Position of mirror 2 in z-axis
DOME_STATUS
vltINT32
status ID
Status of dome.
Always 0 in the current VLT implementation.
See NTT specific documentation for NTT values.
AG_STATUS
vltINT32
status ID
Autoguiding substate (see agwsDefines.h):
evhSTATE_UNK             0
agwsSTATE_IDLE           7
agwsSTATE_ERROR          6
agwsSTATE_OPERATING      121
agwsSTATE_GUIDING        122
agwsSTATE_MANUAL         123

AG_RA
vltDOUBLE
HMS
actual Right Ascension for current Guide Star (J2000 coordinates)
Format: HHMMSS.F, Range 0 - 240000.0
AG_DEC
vltDOUBLE
DMS
actual Declination for current Guide
Star (J2000 coordinates)
Format: +/-DDMMSS.F, Range: -900000.0 - 900000.0
ROT_ANGLE
vltDOUBLE
deg
Rotator angle in Degrees (DD.ddd)
ADA_POSANG
vltDOUBLE
deg
Adapter pos angle, i.e. Rotator on sky (DD.ddd)
CCD_ON_SKY
vltDOUBLE
deg
Angle on sky og Guide Probe TCCD
ADA_ANGLE
vltDOUBLE
deg
Adapter angle (DD.ddd)
PROBE_RA
vltDOUBLE
HMS
Guide probe RA J2000 coordinate (HMS)uide probe X coordinate.
PROBE_DEC
vltDOUBLE
DMS
Guide probe DEC J2000 coordinate (DMS)
PROBE_X
vltDOUBLE
mm
Guide probe X coordinate.
PROBE_Y
vltDOUBLE
mm
Guide probe Y coordinate.
PROBE_IN_POS
vltLOGICAL
0/1
Guide probe in position
ASM_SEEING
vltDOUBLE
arcsec
Seeing reported from asm
ADC_SEP
vltDOUBLE
mm
ADC separation in mm
TEMP_SER_1
vltDOUBLE
Celsius
serrurier strut lower end N quadrant NasA side temperature sensing system
TEMP_SER_2
vltDOUBLE
Celsius
serrurier strut upper end N quadrant NasB side temperature sensing system
TEMP_SER_3
vltDOUBLE
Celsius
tserrurier strut lower end S quadrant NasA side emperature sensing system
TEMP_SER_4
vltDOUBLE
Celsius
serrurier strut upper end S quadrant NasB side temperature sensing system
TEMP_CNT_1
vltDOUBLE
Celsius
centerpiece N quadrant temperature sensing system
TEMP_CNT_2
vltDOUBLE
Celsius
centerpiece S quadrant temperature sensing system
TEMP_FLX_1
vltDOUBLE
Celsius
flexure bar upper end N quadrant NasA side temperature sensing system
TEMP_FLX_2
vltDOUBLE
Celsius
flexure bar lower end N quadrant NasB side temperature sensing system
TEMP_FLX_3
vltDOUBLE
Celsius
flexure bar upper end S quadrant NasA side temperature sensing system
TEMP_FLX_4
vltDOUBLE
Celsius
flexure bar lower end S quadrant NasB side temperature sensing system
ASM_WINDSPEED
vltDOUBLE
m/sec
Wind speed as reported from the ASM
ASM_WINDDIR
vltDOUBLE
deg
Wind direction as reported from the ASM
(0 - 360) (0 = north, 90 = east)
ASM_RHUM
vltDOUBLE
%
Observatory ambient relative humidity queried from ASM
ASM_TEMP
vltDOUBLE
ºC
Observatory ambient temperature queried from ASM
ASM_PRESSURE
vltDOUBLE
mbar
Observatory ambient air pressure queried from ASM
ASM_LRATE
vltDOUBLE
ºK/m
Observatory lapse rate queried from ASM
M1_CORRECTED
vltINT32
count
no of corrections applied to M1
M2_CORRECTED
vltINT32
count
no of corrections applied to M2
AO_CMD_STATE
vltINT32
ID
state of command:
actconCMD_NUM_IDLE ... 200
actconCMD_NUM_INITAO ... 201
actconCMD_NUM_INITIA ... 202
actconCMD_NUM_INITCOR ... 203
actconCMD_NUM_TERMCOR ... 204
actconCMD_NUM_STPWAIT ... 205
actconCMD_NUM_SHUTDWN ... 206
actconCMD_NUM_CORM1 ... 207
actconCMD_NUM_CORM2 ... 208
actconCMD_NUM_ONECOR ... 209
actconCMD_NUM_ONECAL ... 210
actconCMD_NUM_CYCLCAL ... 211
actconCMD_NUM_REFIA ... 212
actconCMD_NUM_ONEIA ... 213
actconCMD_NUM_SEQIA ... 214
actconCMD_NUM_SEQAO ... 215
actconCMD_NUM_CYCLAO ... 216
AO_TARGET
vltINT32
ID
corrections are applied to M1,M2 or both:
actconNUM_SET_NONE ... 0
actconNUM_SET_M2 ... 1
actconNUM_SET_M1_M2 ... 2
AO_CUR_IND_AVG
vltINT32
count
current analyses averaged
CHOP_STATUS
vltINT32
status ID
chop status:
chopwsCHOP_INACTIVE ... 0
chopwsCHOP_ACTIVE ... 1
chopwsCHOP_UNDEFINED ... 2
CHOP_STRT_TIME
vltBYTES32
UTC
chop start time in ISO format: yyyy-mm-ddThh:mm[:ss.[uuuuuu]]
CHOP_STOP_TIME
vltBYTES32
UTC
chop stop time in ISO format: yyyy-mm-ddThh:mm[:ss.[uuuuuu]]
CHOP_FREQ
vltDOUBLE
Hz
chop frequency
CHOP_THROW
vltDOUBLE
arcsec
chop throw (amplitude)
CHOP_POI
vltINT32
ID
chop position of optimum image:
chopwsOPTIMUM_IMAGE_OFF ... 0
chopwsOPTIMUM_IMAGE_ON ... 1
hopwsOPTIMUM_IMAGE_CENTRE ... 2
CHOP_PVR
vltDOUBLE
ratio
chop peak to valley ratio
CHOP_TPA
vltINT32
ID
chop telescope pointing axis:
chopwsTEL_POINTING_AXIS_OFF ... 0
chopwsTEL_POINTING_AXIS_ON ... 1
chopwsTEL_POINTING_AXIS_OPTIMUM ... 2
chopwsTEL_POINTING_AXIS_INDEPENDENT ... 3
CHOP_POSANG
vltDOUBLE
deg
chop orientation
CHOP_OFFSET
vltDOUBLE
arcsec
chop offset
MOON_RA
vltDOUBLE
HMS
Moon RA. Coordinates are given in J2000 mean places
MOON_DEC
vltDOUBLE
DMS
Moon DEC. Coordinates are given in J2000 mean places
M1_TEMP
vltDOUBLE
C
M1 average superficial temperature

2.3.2 FITS header data

The Data Query Library provides two functions to obtain the standard TCS FITS keywords, synchronized to when the functions are called. It is recommended the INS software makes use of these functions in order to obtain the latest version of TCS FITS keywords as approved by DICB. These functions internally make use of tifGetByName, and they produce an ASCII file ready to be incorporated in the completed FITS file.

· tifGetFitsStart(): Generate the TCS FITS keywords at start of exposure
· tifGetFitsEnd(): Generate the TCS FITS keyword at end of exposure and dump in file

The table below gives all possible keywords produced by these functions

Units and coordinate systems for FITS Header Keywords follow ESO Data Interface Control Board conventions[11].

These are not always identical to VLT conventions, used for the TCS control software development. Please, make sure that you always check units and conventions before using these values.

Table 4: TCS FITS Header Keywords
FITS Keyword
Unit
Description
TELESCOP
string
Telescope name
RA
degrees
Right Ascension in mean J2000 (DD.ddd)
DEC
degrees
Declination in mean J2000 (DD.ddd)
EQUINOX
years
Always 2000
RADECSYS
string
Always FK5
LST
seconds
Local Sidereal Time. Seconds since midnight
UTC
seconds
Universal Time. Seconds since midnight
TEL DID
string
Data dictionary name for TCS
TEL ID
string
TCS version string
TEL DATE
string
TCS release version and date
TEL ALT
degrees
Altitude angle at start
TEL AZ
degrees
Azimuth angle at start (S=0, W=90 !!!)
TEL GEOELEV
meters
Telescope elevation above sea level
TEL GEOLAT
degrees
Telescope geographic latitude (+=North)
TEL GEOLON
degrees
Telescope geographic longitude (+=East !!!)
TEL OPER
string
Name of telescope operator
TEL FOCU ID
string
Focus station (NA, NB, CA or CO)
TEL FOCU LEN
m
Focal len for the current focus
TEL FOCU SCALE
arcsec/mm
Scale for the current focus
TEL FOCU VALUE
mm
M2 absolute position in Z-axis
TEL PARANG END
degrees
Parallactic angle at end
TEL PARANG START
degrees
Parallactic angle at start
TEL AIRM END

Airmass at end
TEL AIRM START

Airmass at start
TEL AMBI FWHM END

Observatory seeing at end
TEL AMBI FWHM START

Observatory seeing s at start
TEL AMBI WINDSP
m/s
Observatory ambient wind speed queried from ASM
TEL AMBI WINDDIR
deg
Observatory ambient wind direction queried from ASM (N=0 E=90)
TEL AMBI RHUM
%
Observatory ambient relative humidity queried from ASM
TEL TH M1 TEMP
C
M1 superficial temperature
TEL MOOD RA
deg
RA (J2000) (deg)
TEL MOON DEC
deg
DEC (J2000) (deg)
TEL TRAK STATUS
string
OFF, NORMAL or DIFFERENTIAL
TEL TRAK RATEA
arcsec/sec
Absolute tracking rate in RA
(only if DIFFERENTIAL)
TEL TRAK RATED
arcsec/sec
Absolute tracking rate in DEC
(only if DIFFERENTIAL)
TEL DOME STATUS
string
FULLY-OPEN, PART-OPEN, CLOSED or VIGNETTING
TEL CHOP ST
logical
TRUE when chopping is active
TEL CHOP FREQ
1/sec
Frequency of chopping cycle in Hz
TEL CHOP THROW
arcsec
max. amplitude available dependent on chop period.
TEL CHOP POSOPTIM
string
Chop position for optimum image quality.One of: OFF, ON, CENTRE
TEL CHOP PVRATIO
(ratio)
Peak-to-valley ratio.(0.67 - 1.50).
TEL CHOP TPAXIS
string
chop position corresponding to telescope pointing axis.One of:
OPTIMUM, OFF, ON, INDEPENDENT
TEL CHOP POSANG
degrees
Orientation on sky (0 - 359; N=0 E=90).
TEL CHOP OFFSCHOP
arcsec
Offset in direction of chop for phi(-15.00 to +15.00)
ADA ABSROT START
deg
Absolute rotator angle at start (positive rotation clockwise)
ADA ABSROT END
deg
Absolute rotator angle at end (positive rotation clockwise)
ADA POSANG
deg
Rotator on sky
ADA GUID STATUS
string
ON or OFF
ADA GUID RA
deg
Guide star RA in J2000 (only if GUID ON)
ADA GUID DEC
deg
Guide star DEC in J2000 (only if GUID ON)

2.3.3 Event Configuration Library

The Event Configuration Library provides functions to attach events to certain TCS database attributes, by using the CCS event system. This enables the user to configure events from his functional viewpoint, e.g. on LOSS OF TRACKING, without needing knowledge by which TCS database attribute this event is reflected.; see the following table for a list of supported events and also the man-page of the Event Configuration Library, section 3.5.

The supported event items (configured by tif in the database) are read only once at startup of any tif applica
tion.

The routines

· tifAttachEvent()
· tifDetachEvent()

are provided to respectively attach and detach database events by name (actually, using an enum).

The following table presents a list of all currently supported named events.

The actual name for the enum to be used in the call to tifAttachEvent() is obtained adding the prefix tifEVENT_ to the name in the first column of the table.

This list will evolve in subsequent releases of this document and software.

Table 5: Database Events
Name
Description
TRACKING_LOST
This event is triggered when the TCS leaves state ONLINE, sub-state TRACKING unexpectedly, i.e. on an error. A presetting command will make TCS leave sub-state TRACKING but in a controlled way, so the event is not triggered in that case!
REMTRACK_LOW
This event is triggered whenever the remaining tracking time goes below a defined limit (variable REMLIMIT, see table above).
CHOP_PARM_CHANGE
This event is triggered whenever chopping parameters are reconfigured.
CHOP_STATUS
This event is triggered whenever the chopping status changes.
GUIDING_LOST
This event is triggered whenever the guiding is lost unexpectedly

2.3.4 Using the TCS Database and Event Interface Library

In order to use the TCS Database Interface Library it is necessary:

· To have TCS or TCS Simulation Package installed and configured (see 4 and 2.6.2)
· Environment variables properly set (see in particular 2.6.2.1)
· A running environment with TCS or TCS Simulation database branch (see in particular 2.6.3)
· The code should be written in C++ or at least compiled with the C++ compiler, i.e. the files should have the .C (capital C) filename extension. For more details on how C and C++ code interact, refer to the eccs[4] and evh[5] user manuals.
· The Makefile must contain proper definitions for the TARGET_TCS to be built (see section 2.6.2.2)
· The library tifLibs must be linked with the code. A typical VLT C++ application requires also the following set of libraries: evh eccs fnd C++ CCS.
It is then suggested the following minimal set of libraries for the Makefile:
USER_LIB = tifLibs evh eccs fnd C++ CCS
· If tifGetFitsStart() and tifGetFitsEnd() are used also the following libraries must be linked with the code; oslx slx misc tcsVcc msw.
USER_LIB = tifLibs oslx slx misc tcsVcc msw evh eccs fnd C++ CCS
· The include file tif.h contains all the necessary definitions and function prototypes.

Section 5.1 contains three complete and working sample programs, two using the Data Query Library and the other one using the Event Configuration Library.

The second Data Query Library example demonstrates how to use the tifGetFitsStart() and tifGetFitsEnd() to generate a complete FITS header.

2.3.5 M2 Communication Library

The M2 Communication Library provides functions to communicate with the M2 Unit via the Rapid Guiding Lan and to send M2 position offsets at high frequency.

The routines

· m2comConnect()
· m2comSend()
· m2comDisconnect()

are provided to respectively connect, to M2, send offset corrections and disconnect from M2.

2.4 ONLINE DATABASE ACCESS CLASSES

The tif module provides a set of public on-line database classes to allow access to TCS public data items via the on-line database instead that via the tif Data Query Library.

The class tifTCS_PUBLIC can be instantiated in any user (instrument) database to provide a local image of the TCS public data items. This class is used when the TCS database, real or simulated, is NOT in the same environment as the user (instrument) database. In this case, the scan system is used to update the user database with values from the TCS environment (real or simulated).

The class tifTCS_LOCAL has the same structure as tifTCS_PUBLIC (it is a subclass) and provides the same items, but can be instantiated in the same environment where TCS itself is running, i.e. when simulated TCS data are a part of the user (instrument) database. In this case, the items are updated using the calculation engine, instead of the scan system.

These classes have been implemented to provide access to TCS data for UIF instrument panels and Sequencer scripts, while C and C++ applications should use the tif Query Library.

For performance reasons, not more than one instance of the classes should be used in each environment.

2.4.1 Structure of the tifTCS_XXX public on-line database classes

The tifTCS_PUBLIC on-line database class (see the man page for details) is structured in sub-points that group the public items by category.

This has been done in order to allow a more structured access to the items themselves and to optimize performance on the update of the items, that is based on the RTAP calculation engine.

What follows is the structure of the class:

tifTCS_PUBLIC
tcsState Global TCS state information
tcsState TCS global state, as in Mode Switching
tcsSubstate TCS substate, as in Mode Switching
track TCS tracking flag (0/1)
focus Current focus ID
domeStatus Current dome Status
times Time items
lst Local Sideral Time
utc Universal Time Coordinated
coord Target coordinates
ha Target actual Hour Angle (apparent)
ra Target actual RA (apparent)
dec Target actual declination (apparent)
ra2000 RA at mean place of J2000 in HHMMSS
dec2000 dec at mean place of J2000 in DDMMSS
ra 2000deg RA at mean place of J2000 in deg
dec2000deg dec at mean place of J2000 in deg
alt Telescope altitude
az Telescope azimuth
prltic Actual parallactic angle
track Tracking parameters
airmass Actual airmass
dvelra Differential velocity RA
dveldec Differential velocity dec
rotAngle Actual rotator angle
adaAngle Adapter angle (DEG)
adaPosAngle Adapter pos angle (rot on sky) (DEG)
remtime Remaining tracking time
remlimit Remaining tracking time limit
trackingLost Event flag for lost tracking
remTimeLow Event flag for low remaining trk. time
guide Auto Guide parameters
status Auto Guide status
ra RA of current guide star
dec dec of current Guide Star
probeX Guide probe position in X
probeY Guide probe position in Y
ccdOnSky angle on sky probe tccd
m2 M2 parameters
focuValue
ao Active optics configuration
m1corrected
m2corrected
commandState
targetSettings
currentIndexAvg
info General information
telescop Telescope name
version TCS software version in use
installed TCS software installation date
oper Telescope Operator name
foculenNA Focus length nasmyth
foculenCA Focus length cassegrain
foculenCO Focus length coude
focuscaleNA Focus scale nasmyth
focuscaleCA Focus scale cassegrain
focuscaleCO Focus scale coude
site Site information
longi Longitude
lati Latitude
level Height above see level
chop Chopping configuration
status chopping status (active or not)
startTime starting time (ISO string)
stopTime stop time (ISO string)
freq frequency
throw amplitude
posOptImage optimal position for image
peakValleyRatio peak to valley ratio
telPointingAxis telescope pointing axes
posAng chopping angle
offsetChop chopping offset with respect to center position
adc Atmospheric dispersion corrector
actDist
hb Hydrostatic bearings
tempSer1
tempSer2
tempSer3
tempSer4
tempCnt1
tempCnt2
tempFlx1
tempFlx2
tempFlx3
tempFlx4
asm Astronomical site monitor
seeing
windspeed
winddir
pressure
humidity
temperature
lapseRate
moon
RA
dec
m1
temperature


For more information about the meaning of the items, their units and their availability, see the Data Query Library section 2.3.1, and in particular Table 3 on page 19.

2.4.2 Using the tifTCS_PUBLIC database class

This class can be instantiated in any place in a user environment to get access to TCS public data via the scan system.

It cannot be instantiated in the same environment on which TCS itself is running.

In order to use the class, it is necessary to perform the following steps (for an example see the modular test of the tif module:

1. Configure the TCS database to allow scanning from the remote user environment.
To this purpose it is necessary to add a scan device for the environment in the TCS database.
For example, add the following lines in the USER.db file of the TCS environment:
POINT "<VLT scan dev>" ccs_config:scan\ config:LAN:wsIns
BEGIN
ALIASwsIns
END

2. Configure the user database to perform scanning from the TCS environment.
To this purpose it is necessary to add a scan device for the TCS environment in the user database.
For example, add the following lines in the USER.db file of the user (instrument) environment:

POINT "<VLT scan dev>" ccs_config:scan\ config:LAN:wsTcs
BEGIN
ALIAS wsTcs
END

3. Add an instance of the tifTCS_PUBLIC class anywhere in the user database. The Makefile must contain proper definitions for the TARGET_TCS to be built (see section 2.6.2.2)
4. Configure the scan system by running the tifTcsScanSetup command.
See the man page for details on the command.
If a standard TCS configuration is used and if the environment variables are properly set, it is only necessary to pass the "-p" parameter with the symbolic address of the instance of the tifTCS_PUBLIC class.
5. In order to minimize the resources used by the scan system, it is suggested to disable the scan links for all the items not used, by using the CCS Engineering Interface tools or writing a proper script for this purpose.

2.4.3 Using the tifTCS_LOCAL database class

This class can be instantiated in any place in a TCS environment to get access to TCS public data via calculation engine expressions. This is typically used when a simulated TCS database is part of a user (instrument) database, and it is then used during simulation to temporary replace an instance of tifTCS_PUBLIC.

The class can also be used internally within TCS, by applications running on the TCS workstation.

If the TCS database is not placed in the standard branch Appl_data:TCS, it is necessary to (re)define tifTCS_DBROOT BEFORE including tifTCS_LOCAL.class in the database configuration file.

2.5 PANEL EDITOR CLASSES

The tif module provides a set of standard panel editor[8] User Interface Classes.

The purpose of these classes is to provide a standardized access for user interfaces to TCS data, provide a common look and feel and simplify and centralize under TCS modules responsibility some operations, like conversion from state indexes to strings that would otherwise be distributed in user applications.

In the current implementation only a class to display the status of TCS is provided.

Since it is very difficult to define "a priori" how TCS items will be displayed in instruments user interfaces, it has been decided not to initially design a set of classes but to incorporate in the library classes provided by the real applications designers.

Users are encouraged to develop and submit as soon as possible their classes for access to TCS data.

These classes will be checked for coherence with VLT UIF standards, evaluated for general interest, incorporated in this library, maintained and made public for reuse.

All classes are designed to get data from TCS via an instance of the tifTCS_PUBLIC or tifTCS_LOCAL class. The current working point[8] of the main panel and of the panel class instance must be set to provide the right database path to access such a database point. For an example of correct implementation, see the implementation of the panel class tifTcsState_uifClass in the tif module. For an example of correct usage, see the implementation of the panel tcssimTcsControl.pan in the tcssim module.

2.5.1 tifTcsState_uifClass

The panel class tifTcsState_uifClass provide access to TCS global status information.

The following figure displays the look and feel of the class. The conversion from the indexed values available on the database and the corresponding strings is performed internally by the class.

In order to use the class, it is necessary to insert an instance into a panel and configure its current working point in order to reach the required support instance of the tifTCS_PUBLIC or tifTCS_LOCAL database class. For an example of correct usage, see the implementation of the panel tcssimTcsControl.pan in the tcssim module.

2.6 SIMULATION PACKAGE

2.6.1 Introduction

The TCS Simulation Package consists of the TCS (as far as available, except LCU parts) being customized for simulation purposes by means of a special database configuration and the tcssim software module. The package is provided to enable testing instrument software which interacts with the TCS by simulating the relevant parts of TCS. It contains everything needed for the simulation which is not already provided by a standard VLT software environment.

The tcssim module consists of a set of scripts to control the simulation, dummy programs to simulate some not existing or not included TCS modules (e.g. trk) and a database branch, being a sub-set of the real TCS database branch. Further it uses the complete TCS modules for TCS Interface (tif), presetting (prs), tracking (trkws) and mode switching (msw). Later versions of the simulation package will include more TCS modules (complete, replaced by dummies or simulated by command manager) when these will be defined or implemented.

The simulation is focused on the communication between user processes and the TCS and NOT on the internal functionality of the TCS. The simulation allows to send commands to the TCS via the TCS Interface and get replies from there, as well as using the TCS Data Query Library, but internally nothing is done on some commands, except that some database items are updated with simulated values.

The simulation of TCS modules is achieved in general in three ways:

1. A module may not exist at all but is simulated by the command manager. Only the module CDT is needed. In general, this way is chosen for all TCS modules which are not yet implemented.
2. A module may be replaced by a dummy program which accepts the module commands, returns pre-configured replies and provides some simulated data items in the TCS database. This requires that the module CDT and the dummy program are installed. Currently there are such dummies for the tracking LCU part and the adapter module.
3. A module exists and runs in its internal simulation (or normal, if no difference) mode. This requires that the full module is installed. In the current version this is done by the TCS Interface (tif), Tracking Workstation (trkws), Preset (prs) and Mode Switching (msw) modules.

2.6.2 Creating a TCS Simulation Environment

The TCS Simulation Package may run locally, i.e. on the users development workstation, either in the same environment as the instrument application or in a dedicated environment, or it may run on a different workstation.

The following sub-sections will describe the steps necessary to create and configure a separate TCS Simulation environment.

A TCS simulation system requires a WS CCS environment. Although existing environments can be used, we suggest to perform the configuration using new environments. Once you are familiar with that, the integration of the TCS simulation software to an existing environment is a straight forward process.

This section assumes that you master the process of creating/configuring CCS environments, including the directory structure and available tools. (If not, please have a look to the configuration and verification section of [7]).

2.6.2.1 Environment variables.

The following environment variables are used and therefore must be defined:

RTAPENV
name of the workstation CCS environment where TCS simulation will run. Example:
$ setenv RTAPENV wmyTCS
INS_ROOT
name of the root directory where data dictionaries and configuration files are stored/retrieved (see [6] for the full directory structure). Such directory must exist and will be populated in the next step. Subdirectories needed by the TCS Simulation Package are:
i. $INS_ROOT/SYSTEM/COMMON/CONFIGFILES for configuration files
ii. $INS_ROOT/SYSTEM/COMMON/SETUPFILES/DET for setup files
iii. $INS_ROOT/SYSTEM/Dictionary for data dictionaries.
Note that INS_ROOT is also used for instrumentation sw, and it has to be defined and must exist also for TCS.

INS_SETUPPATH
path for setup file search (see [6] for more details). Example:
$ setenv INS_SETUPPATH \
".:$INS_ROOT/SYSTEM/COMMON/SETUPFILES/DET:\
$INS_ROOT/SYSTEM/COMMON/SETUPFILES/REF:\
$INS_ROOT/SYSTEM/Dictionary"


In the following sections we assume as example that the following definitions are done:

$ setenv RTAPENV wmyTCS
2.6.2.2 vltMakefile and target TCS definitions

The TCS software can be configured to produce software and database for the VLT telescope and for other telescopes (currently the NTT, the Astronomical Site Monitor and the VLT Auxiliary Telescopes are foreseen).

This must be configured in the makefile using the TARGET_TCS symbol.

By default, software for the VLT is built (but warnings are issued if the TARGET_TCS is not explicitly defined).

It is anyway cleaner and safer to explicitly define the TARGET_TCS.

In the case of the VLT, this must be set to VLT_TCS and passed explicitly to the C compiler and to dbl.

A typical Makefile will contain the following definitions:

#

# The following variable is used to define the target telescope:

# VLT or NTT.

# Programs require the preprocessor variable TARGET_TCS set to VLT_TCS

# or to NTT_TCS to distinguish between the two.

TARGET_TCS = VLT_TCS

# To pass the TARGET_TCS to the C compiler

USER_CFLAGS = -DTARGET_TCS=${TARGET_TCS}

#

# On-Line Database Files

# ----------------------

DBL_CLASSES =

DBL_LOAD =

DBL_FLAGS = -DTARGET_TCS=${TARGET_TCS}

A standard environment variable that is defined is TCSID.

It defines for which of the UTs the software has to be configured.
TCSID can only be used for database configuration and user interface configuration.

NOTE: It must NOT be used in code!!

TCSID can take the values 0,1,2,3,4,5. Where 0 stands for the VLT control model and 5 for the NTT. 1 to 4 defines the UT.

It can be used e.g. in user interfaces to genereate the environment name like lt$(TCSID)alt, etc.

2.6.2.3 Files needed for TCS operations

To install all files needed for operation of the TCS simulation system run from the UNIX shell:

$tcssimInstall.sh

The procedure creates:

1. the INS_ROOT sub-directories needed by TCS simulation, if not yet existing
2. the TCS Data Dictionary
3. the TCS Alias Tables
4. the default setup file

Note: The Data Dictionary is still subject to review. There might be changes in a future release.

2.6.2.4 WS Environment
1. Create a new environment as in 4.3.2 in [7]. Remember, the environment shall be named as in $RTAPENV. Do not forget to properly configure /etc/services, /etc/$RTAPROOOT/RtapEnvList, etc.

2. Configure the database
a. set to the environment dbl directory
b. add the TCS simulation branch to the database:
edit DATABASE.db file and
i. move to application definitions section.
ii. Add the following lines:
#include "tcssimUser.db"
c. add in the Makefile the definitions for the TARGET_TCS (2.6.2.2)
d. regenerate the (RTAP) database files:
$ make clean db
e. verify the correctness of the generated RTAP files:
$cd ../DB
$ls -R
...if the TCS branch has been successfully created, a subdirectory TCS exists

3. generate the environment: (autoStart) and then shutdown it.

4. Verify that point Appl_data contains a point TCS, having sub-points asm, msw, prs, tif and trk.

5. Verify that the needed processes are running in the CCS environment (use RtapPerfMon for verification):

Proc Name pid prio %cpu qid rx #msg bytes debug select

1 RtapScheduler 18102 NRT . 1217 . . . . ..

2 RtapMonitor 18104 NRT . 1218 . . . . ..

3 RtapQServer 18105 NRT . 1219 . . . . ..

4 RtapEventTrig 18106 NRT . 1220 . . . . ..

5 RtapEventConfg 18107 NRT . 1221 . . . . ..

6 RtapTimeKeeper 18108 NRT . 1222 . . . . ..

9 RtapDbCfServer 18115 NRT . 2524 . . . . ..

10 RtapScanMngr 18116 NRT . 1225 . . . . ..

11 ccsScan 18124 NRT . 1231 . . . . ..

12 cmdManager 18121 NRT 1 2527 . . . D ..

13 msgServer 18117 NRT . 1226 . . . . ..

15 RtapASServer 18119 NRT . 1228 . . . . ..

16 RtapASLogger 18120 NRT . 1229 . . . . ..

58 RtapMQDBM 18112 NRT . 2523 . . . . ..

2.6.2.5 Verification

To verify the installation and configuration, execute the following steps:

man-pages:
Visit the man-pages of tifControl, mswControl, prsControl and trkwsControl using. vltMan.
panels:
Start the TCS Simulation Control panel tcssimSimControl. From there start the TCS Control, TCS User and Adapter User panels.
scripts and processes:
From the TCS Simulation Control panel select simulation setup 3 and start/stop it.

2.6.3 Using a TCS Simulation Environment

In order to allow applications to use a TCS Simulation Environment, as well as to interface to the real VLT TCS, i.e. to send commands to TCS and to use the tif libraries to access TCS data, it is necessary to specify the environment name, the mount point of the database branch by setting three shell environment variables and to set one database attribute:

TCS_ENVNAME specifies the CCS environment name in which to run the simulation package. If not set, the value of the RTAPENV environment variable will be used, assuming that TCS is running on the same environment of the user application. This will NOT be the normal case, so it is suggested to always set properly this environment variable, also during testing and development.
TCS_DBPOINT specifies the absolute path of the TCS simulation database branch. If not set the default ":Appl_data:TCS" value is used. This should be the normal case and, except for special testing purposes, it should not be necessary to explicitly set this environment variable. If set, it must point to an instance of the tcssimDB on-line database class.
Typically such and instance is declared in the database configuration file for the environment in the following way:

#include "tcssimDB.class"

POINT tcssimDB ":Appl_data:TCS"
BEGIN
ALIAS "TCS"
END

TCSGAENV specifies the CCS environment name of the Guide Acquisition environment. If not set,
the value of the RTAPENV environment variable will be used, assuming that the Guide Acquisition tasks (CCD) are running in the same environment as the application.

$(TCS_DBPOINT):msw:foc.currentFocus must be set to a valid focus value before starting any TCS application. Valid values are: 2 = Nasmyth A, 3 = Nasmyth B, 4 = Cassegrain. The default value is 0, which means undefined.

The simulation start-up scripts temporarily sets the RTAPENV environment variable to TCS_ENVNAME to start the simulation processes in the desired environment and restores the original value afterwards.

Also the environment variables for setup file handling must be properly set (see the section 2.6.2.1 for details).

The shell environment variable CCSSTATE must be set to SIMULATION.

NOTE: THE USER MUST MAKE SURE THAT THESE ENVIRONMENT VARIABLES ARE PROPERLY SET FOR ALL USER PROCESSES WHICH ACCESS THE TCS. PAY ATTENTION TO THE VISIBILITY SCOPE OF ENVIRONMENT VARIABLES in SUB-SHELLS, PARENT-SHELLS, SPAWNED PROCESSES, etc.

2.6.4 Tracking Simulation

The tracking module consists of a workstation part (trkws) and a LCU part (trk). In simulation the trkws is used in normal mode since it has no special handling of module simulation mode, and the trk is replaced by a dummy program, on the workstation, which incorporates no functionality except updating the "actual position" data items with the values received in command parameters. Note that this information is static; no tracking motion is simulated!

If a command specifies coordinates as RA/DEC, the corresponding hour angle and ALT/AZ coordinates are computed, and vice versa. Thus, the current positions which are returned by the Data Query Library always consistently reflect the status at the time when the last preset or offset command was given.

The local sidereal time is simulated with the current UTC.

2.6.5 Data and Event Simulation

The TCS Data Query and Event Configuration Libraries are available also in simulation mode, however the data items are maintained only with setup 3 (see section 2.6.6), where some data items are maintained with simulated values and some are set to fixed values.

The following data items are provided by the Data Query Library in simulation:

· The Module States Data Structure tifSTATES, returned by tifGetStates() provides the TCS global state and sub-state as in normal operation (msw and trkws modules runs in normal mode). Hence, the state information is as reliable as in normal mode and can be used by instruments to detect if the TCS runs properly.
· The Telescope Position Data Structure tifPOSITION, returned by tifGetPosition(), is filled with simulated position values, which are written to the database by the tracking module dummy.
· The telescope status information provided in simulation mode is described in the Table 6: below

The table below shows how the named data items are handled in simulation mode. See also Table 3: for a description of the named data items.

Table 6: Simulated data items
Name
Description
LST
Updated on commands PRSCOOR, PRSALAZ, PRSNAME, OFFSAD, OFFSAA, OFFSXY (but no cyclic update)
UTC
as for LST
HA
as for LST
RA
as for LST
DEC
as for LST
RA2000
as for LST
DEC2000
as for LST
RA2000DEG
as for LST
DEC2000DEG
as for LST
ALT
as for LST
AZ
as for LST
ALT_REF
as for LST
AZ_REF
as for LST
AIRMASS
not updated
PRLTIC
not updated
DVELRA
Updated on command SETAV
DVELDEC
Updated on command SETAV
LONGI
VLT value
LATI
VLT value
LEVEL
VLT value
REMTIM
not updated
REMLIMIT
Updated on command SETRLIM
TRACK
Updated as in normal operation
FOCUS
Updated as in normal operation
FOCULEN_NA
VLT value
FOCULEN_CA
VLT value
FOCULEN_CO
VLT value
FOCUSCALE_NA
VLT value
FOCUSCALE_CA
VLT value
FOCUSCALE_CO
VLT value
TELESCOP
Default value
VERSION
Version of TCS Simulation Package
INSTALLED
Installation date of TCS Simulation package
OPER
Default value
FOCU_VALUE
not updated
DOME_STATUS
not updated
AG_STATUS
not updated
AG_RA
not updated
AG_DEC
not updated
ROT_ANGLE
not updated
ADA_POSANG
not updated
ADA_ANGLE
not updated
PROBE_X
not updated
PROBE_RA
not updated
PROBE_DEG
not updated
PROBE_IN_POS
not updated
ASM_SEEING
not updated
ASM_WINDSPEED
not updated
ASM_WINDDIR
not updated
ASM_RHUM
not updated
ASM_TEMP
not updated
ADC_SEP
not updated
Others
not updated

The TCS event library works as in normal mode, i.e. events are attached to the same database attributes as in normal mode, and those are maintained as in normal mode.

A special TCS simulation database branch is delivered with the simulation package as the tcssimDB database class. It is a sub-set of the original TCS database branch, i.e. it contains only the points and attributes which are needed for simulation but those are identical with the original structure, names and data types.

Database items not updated by the simulation software can be manipulated by hand (if necessary) by the user to test special behaviors.

To this purpose, it is necessary to keep in mind that:

· The TCS Simulation assumes that only the ALT and AZ LCUs are used for tracking (this is configured in the Simulaiton Mode Switching List)
· The real Tracking Workstation Software is running, but no LCU SW
· Writing in an LCU attribute correpsond to simulate the scan system of the true TCS going and picking up the values from the actual LCU.

For example, in order to set a specific vaule for the ramaining tracking time, it is just necessary to write the required value in the following database attributes:

@TCSENV:Appl_data:TCS:LCU:alt:trk.remTrkTime

@TCSENV:Appl_data:TCS:LCU:az:trk.remTrkTime

For this purpose, the dbWrite command line utility or any database write tool can be used.

For example:

dbWrite @wt0tcs0:Appl_data:TCS:LCU:alt:trk.remTrkTime 0.1

dbWrite @wt0tcs0:Appl_data:TCS:LCU:az:trk.remTrkTime 0.1

2.6.6 Simulation Setups

The TCS Simulation Package provides various setups, differing in what amount of software has to be installed on the target workstation and in degree of simulated functionality. Each setup simulates the whole TCS; all commands are always accepted.

The following setups are delivered:

Setup 1: simulates the TCS Interface by Command Manager, no TCS module simulation at all
Setup 2: uses real tif, simulates all other TCS Modules by Command Manager
Setup 3: uses all existing modules, i.e. simulates as much functionality as possible

More setups will be added or the setup 3 will be extended as more TCS modules become available.

For each setup, bourne-shell scripts are provided to start, check and stop the simulation. These are named:

tcssimStartSetupN, N=1,2,3 - start a simulation setup
tcssimStopSetupN, N=1,2,3 - stop a simulation setup
tcssimPingSetup - send a PING to all TCS processes, independent of setup number
tcssimCheckSetup3 - check if TCS processes running, for setup 3 only

See section 3.7 for man-pages of these scripts.

2.6.6.1 Setup 1

The Simulation Setup 1 implements the lowest level approach where the tif is simulated by the command manager and nothing else of TCS exists. This setup contains:

· the tifNA, tifNB and tifCA CDT's
· a script tcssimStartSetup1 to switch the TCS environment into command simulation and tell the command manager to simulate the tif instances
· a script tcssimStopSetup1 to shutdown the simulation setup and bring the TCS environment back to normal mode.

This setup is provided to verify the basic communication channel between an instrument application and the tif, but it is not sufficient to test any functionality.

The command manager replies whatever is defined in the CDT of the simulated module (here the tif) under keyword DEFAULT_REPLY. This is set to "OK" for all commands by default. The user can change the behaviour by either

· modifying the CDT of the appropriate tif instance and re-start the environment
· interactively tell the command manager to return another reply (see [4]).

It is not feasible to access the TCS Data Query Library or the Event Configuration Library in this setup. The data items are fixed and not updated with simulated values. The same for the Event Configuration Library: it is available but the events will never be triggered!

2.6.6.2 Setup 2

In setup 2 the tif exists and all TCS modules for which CDT's are available are simulated by the command manager. This setup contains:

· the full tif module
· the CDT's of all available TCS modules
· a script tcssimStartSetup2 to
· switch the TCS environment into command simulation
· start the tif module
· tell the command manager to simulate the available TCS modules
· a script tcssimStopSetup2 to shutdown the simulation setup and bring the TCS environment back to normal mode.

In this setup the TCS internal routing of commands really takes place and thus can be used to verify aspects of command validity, consistency between CDT's and tif routing table, some aspects of command and reply timing (sequence, performance, etc.). It is possible to access the TCS Data Query Library, however the data items are fixed and not updated with simulated values. The same for the Event Configuration Library: it is available but the events will never be triggered.

2.6.6.3 Setup 3

This setup provides the most realistic behaviour of the TCS. The TCS Interface, Mode switching, Preset and Tracking WS modules are running in their normal mode (there is no special handling of simulation mode in these modules). The Tracking LCU and the Adapter modules are replaced by dummies on the WS (no LCU's are involved in simulation mode) and the Autoguiding and Field Stabilization module is simulated by the command manager.

This setup contains:

· the full tif, trkws, prs and msw modules
· dummy for the tracking and adapter control processes
· the CDT of the autoguiding module (agws)
· a script tcssimStartSetup3 to
· switch the TCS environment into command simulation
· start the tif, trkws, prs and msw modules in normal mode
· start the dummies for the trk and ad control processes
· tell the command manager to simulate the agws module
· a script tcssimStopSetup3 to shutdown the simulation setup and bring the TCS environment back to normal mode.

This is the setup providing the highest degree of simulated TCS functionality.

2.6.7 Instruction Sequence

This section describes the steps to be performed to start-up a TCS simulation scenario. It is important to keep the sequence described below. NOTE: THESE INSTRUCTIONS MUST BE GIVEN TO A BOURNE SHELL OR EXECUTED AS A BOURNE SHELL SCRIPT!

1. If the environment where TCS should run does not yet exist, create it (see [3], section 2.4 for instructions on how to create an environment).
2. Define the shell environment variable CCSSTATE to SIMULATION
3. Define the shell environment variables used for setup file handling INS_ROOT, INS_USER and INS_SETUPPATH as described in section 2.6.2.1.
4. Define the shell environment variables TCS_ENVNAME and TCS_DBPOINT as described in section 2.6.2.
5. Execute the appropriate start-up script tcssimStartSetupN, N=1,2,3 or use the tcssimSimControl panel
6. Start the user processes.
7. Perform the tests...
8. Shutdown the simulation setup by running the appropriate shutdown script tcssimStopSetupN, N=1,2,3 or use the tcssimSimControl panel

2.6.8 Commands

This section gives a list of the public TCS commands supported by the TCS simulation package, and a description of what they are doing in simulation mode. See the Reference chapter, section 3.2 for a general description of these commands.

In the tables below the entries in column "Effect" mean:

normal action: the corresponding process is the real one and runs in normal mode (or in simulation mode, but executing this command as in normal operation).
DB update: the referenced database items are updated with simulated values.
default reply: the corresponding process is simulated by the command manager and the command causes just the return of a default reply, normally "OK".
Table 7: Telescope Commands in Simulation Mode
Command
Effect
GETINS
normal action
GETINSD
normal action
SETINSD
normal action
CLRSTP
normal action
OFFSAD
DB update coordinate items
OFFSADG
DB update coordinate items
OFFSAA
DB update coordinate items
OFFSXY
DB update coordinate items
OFFSROT
DB update coordinate items
OBJROT
DB update coordinate items
PRSALAZ
normal action, DB update coordinate items
PRSCOOR
normal action, DB update coordinate items
PRSNAME
normal action, DB coordinate items NOT UPDATED
SAVCSTP
normal action
SAVRSTP
normal action
SETADC
normal action
SETAV
normal action
SETLAM
normal action
SETRLIM
DB update item REMLIMIT
SETUP
normal action, DB update item
STOPTRK
normal action
STARTAG
default reply "OK"
BOX2GS
default reply "OK"
STOPAG
default reply "OK"
PRGS
default reply "OK"
STARTAO
default reply "OK"
STOPAO
default reply "OK"
FGETAO
default reply "OK"
OFFSFM2
default reply "OK"
ONECAL
default reply "OK"
SEQAO
default reply "OK"
CYCLAO
default reply "OK"
OFFSFAD
default reply "OK"
SETBAFF
default reply "OK"
STRTCHP
default reply "OK"
STOPCHP
default reply "OK"
DMSMODE
default reply "OK"
WSMODE
default reply "OK"
FFIN
default reply "OK"
FFOUT
default reply "OK"
SHCLOSE(*)
default reply "OK"
SHOPEN(*)
default reply "OK"
SHSTAT(*)
default reply "OK"

Table 8: Adapter Commands in Simulation Mode
Command
Effect
M4IN (*)
default reply "OK"
M4OUT (*)
default reply "OK"
PRCNT
default reply "OK"
PRPARK
default reply "OK"
ROTFIX
default reply "OK"
ROTTRK
default reply "OK"
(*) available only for Nasmyth adapters, i.e. these commands are rejected for the Cassegrain adapter.

(*) available only for Nasmyth adapters, i.e. these commands are rejected for the Cassegrain adapter.

2.6.9 PANELS

Several panels to communicate with the TCS are delivered as part of the simulation package:

The Simulation Control Panel to select, start, stop and check simulation setups.
The TCS Operator Panel to send the commands to switch the TCS global state.
An example of a Telescope User Panel, i.e. a panel providing all user commands currently available for telescope control.
An example of an Adapter User Panel, i.e. a panel providing all user commands currently available for adapter control.
The Data Monitor Panel displays the position and time data which can also be acquired by the Data Query Library.

2.6.9.1 Simulation Control Panel

A panel is provided to control the execution of simulation setup's and to start other TCS panels. The name of this panel if tcssimSimControl. In detail it allows to:

· select a simulation setup
· select terminal mode (for setup 2 and 3 only), i.e. if each TCS process shall be run in an individual xterm window or not. This is mainly for debugging purposes and allows the user to analyse the output produced by the TCS processes.
· start, check and stop the selected setup
· call the TCS Operator Panel
· call an example TCS User Panel
· call an example Adapter User Panel

The Simulation Control Panel is started by just entering:

$ tcssimSimControl &

from a shell. Since all other panels provided with the package can be started from here, the Simulation Control Panel should serve as the main entry to the TCS simulation control and monitoring.

First select a setup type with the radio button. If you want to have the output of each process in an individual xterm window then enable the "xterm" check-box.

After these selections start the setup with the START button and check if all processes are active, by using the PING button.

Now you can pop-up further panels: the TCS operator panel, an example of a Telescope User Panel and an example of an Adapter User Panel.

Stop the setup with the STOP button.

The START, STOP and PING actions require some time and during this time the panel is blocked and does not provide any feedback. Please wait for the completion of the command (about one minute) for the panel to become active again. Depending on the selected options, a feedback is given when operations are completed as an xterm or as an TCL text panel. The xterm closes automatically when the operations are completed, but the TCL text panel must be closed by hand selecting the File/EXIT menu. Please, do not use the Close option in the window frame, since this will leave the main panel in an inconsistent state.

These are known limitations and will be solved in a next release.

2.6.9.2 TCS Operator Panel

The TCS operator panel allows to switch the TCS global state by sending operator level commands to the mode switching module, which dispatches appropriate state transition commands to the other modules.

The panel is started by entering

$ tcssimTcsControl &

The following state transitions are supported by buttons:

COLD-START: initialize and go to STAND-BY state
START: go to ON-LINE state
STOP: go back to STAND-BY state
SHUT-DOWN: stop and go to OFF state

The following mode switching commands are supported by button:

CHANGE FOCUS: Changes the current focus station (one of Nasmyth A, Nasmyth B, Cassegrain). TCS must be in STANDBY
SELECT INS: Changes the current instrument and, if necessary, move to the corresponding focus station. TCS must be in STANDBY.

Further, the panel displays the current TCS global state in the form of:

TCS State: Global TCS state, maintained by mode switching
TCS SubState: Global TCS substate, maintained by mode switching
Tracking state: Flag (NO/YES) to identify if TCS is tracking, maintained by the tracking software
Focus: Current focus station, maintained by mode switching

In the lower part, the Data Monitor shows those positions and times which are also provided by the TCS data query library.

At the very bottom there is a scroll-list which receives the replies to all commands sent from the panel.

2.6.9.3 Telescope User Panel

This panel provides an example for a user having the full TCS, i.e having the telescope beam. It supports many (but not all) of the commands available for the current TCS version.

The panel is started by entering

$ tcssimUser [tif] &

from a shell, where [tif] is an optional argument, specifying the tif instance to be connected to. The default is tifNA. The panel expects the TCS simulation already running in the environment specified by TCS_ENVNAME (see section 2.6.2) or in the environment specified by RTAPENV if TCS_ENVNAME is not defined.

The panel consists of combinations of entry fields for command parameters and push buttons which send the corresponding command to the selected tif instance.

In the lower part the push button "Data Monitor" pops-up the Data Monitor panel which shows those positions and times which are also provided by the TCS data query library.

At the very bottom there is a scroll-list which receives the replies to all commands sent from the panel to the selected tif instance.

2.6.9.4 Adapter User Panel

This panel is for use of only an adapter. It supports all adapter commands available for the current TCS version.

The panel is started by entering

$ tcssimAdapter [tif] &

from a shell, where [tif] is an optional argument, specifying the tif instance to be connected to. The default is tifNA. The panel expects the TCS simulation already running in the environment specified by TCS_ENVNAME (see section 2.6.2) or in the environment specified by RTAPENV if TCS_ENVNAME is not defined.

The panel consists of combinations of entry fields for command parameters and push buttons which send the corresponding command to the selected tif instance.

At the very bottom there is a scroll-list which receives the replies to all commands sent from the panel to the selected tif instance.

2.6.9.5 Data Monitoring Panel

The Data Monitoring Panel shows the telescope position in various coordinates as well as the related UTC and LST. It is a display panel only which provides no action. The panel is imported as a class in the TCS Operator panel (see 2.6.9.3) and can be called from the Telescope User panel (see 2.6.9.4).

The panel is started by entering

$ tcssimDataMonitor &

from a shell. The panel expects the TCS database branch in the environment specified by TCS_ENVNAME (see section 2.5.2) or in the environment specified by RTAPENV if TCS_ENVNAME is not defined and under the point specified by TCS_DBPOINT, defaulted by ":Appl_data:TCS:".

2.7 STAR CATALOG INTERFACE

The Star Catalog Interface is based on an external package, called catlib, implementing a set of three libraries with the same functionalities, but supporting different programming languages:

· Astrocatalog - C - library
· AstroCatalog - C++ library
· Tcl/Tk library.

The current implementation of "catlib" provides access to the "guide star catalog" ("gsc@eso"), but only for a limited set of functions:

· Open the Catalog.
· Get the description of the catalog's record.
· Get set of stars in a circular region of space.
· Search for the star closest to a given coordinate.
· Close catalog.

The description on how to use the "catlib" functions is in document ref. [10]. This document also describes a number of functions that are not yet implemented. They will be included in a future release.


The VLT Star Catalog Interface (the module is called "catif") provides a function, called catifErrAdd, to interface the errors generated by "catlib" to the VLT error system.

For the time being the "catlib" routines do not provide the user a detailed error handling, but just the indication whether the routine was successful or not and in that case they provide a simple description of the error.

catif also provides a set of errors which are VLT standard compliant: see paragraph (5.3.1) or use the error editor utility in "Read Only" mode (they should be reviewed as soon as the star catalog library improves).

NOTE: Programs using catifErrAdd must be linked with C++ library.




Quadralay Corporation
http://www.webworks.com
Voice: (512) 719-3399
Fax: (512) 719-3606
sales@webworks.com
TOC PREV NEXT INDEX