TOC PREV NEXT INDEX

Put your logo here!


7 INSTALLATION GUIDE

This section describes how to build the LCU Common Software if executables and libraries are not already available. It then describes step by step the boot script file that loads the software on the target and test procedures that can be run to test the installation.

7.1 Installation requirements

7.1.1 Hardware Requirements

Required hardware as defined in 1.2.
Additional CD-rom drive to load the CD.
Required disk space:
· install lcc3 from CD: 13 MBytes
· install lcc3 from CD and compile sources: 20 MBytes
CPU memory:
· LCU Common Software loaded and initialised, with boot script default parameters, a small database loaded (20 points, 300 attributes of mixed types) and two command interpreters spawned uses about 1.5 MBytes.

7.1.2 Software Requirements

Required software as defined in 1.2.
Tasks using LCC functions (in particular Message System) require a stack size of minimum 30 kBytes to run without problems.

7.2 Building the Software

7.2.1 Delivery

The LCU Common Software is delivered in Unix tar format on CD. The tar file expands into four main directories:
./LCC/lcc3/lcu LCU Common Software (LCU part: lcc)
./LCC/lcc3/ws LCU Common Software (WS part: lccdb, lccdt, lccit)
./Drivers/lcustat LCU status panel
./Drivers/lcuwd LCU watchdog trigger

./lcc3,./lcustat and ./lcuwd follow the standard ESO organisation

In addition to the standard sub-directories, ./lcc3/lcu also contains the following sub-directories:
./lcc3/lcu/CDT Command Definition Table for LCC processes
./lcc3/lcu/CIT Command Interpreter Table for LCC processes

In addition to the standard sub-directories, ./lcc3/ws also contains the following sub-directories:
./lcc3/ws/ERRORS LCC errors definition file
./lcc3/ws/ALARMS LCC alarms definition file

7.2.2 Build Procedure

The software build procedure is defined in the VLT Common Software Installation Manuall, [5].

7.3 VxWorks Environment Configuration

Set up your environment with the tool vccEnv as described in [6]. This tool creates the $VLTDATA/ENVIRONMENTS/<lcuEnv> directory and installs the required files, including the database and boot script. It gives you also the possibility to customize your environment. Do not edit the bootScript file manually!! See also the description of the module lcuboot in [6].

7.3.1 Description

The boot script (bootScript) performs the following actions:
· download LCU Common Software,
· load local database,
· load all files and tables required by the LCU Common Software (device table),
· start and initialize LCU Common Software,
· start lccServer and rdbServer Command Interpreters,
· install all drivers and I/O devices,
· run user script to download, start and initialize application software (userScript),
· perform self-test.

7.3.2 Required Database

vccEnv installs the database branches required by LCC in dbl format, see [3], and creates the database.

7.3.3 Customizable Parameters

7.3.3.1 Environment Variables

Below follows a description of important environment variables.

VLTROOT Path of the VLTROOT directory on the boot host.
Example: /vlt/JAN2006
INTROOT Path of the INTROOT directory on the boot host. The LCU will search for CIT and CDT files in
INTROOT if defined. If the files are not found in INTROOT or if INTROOT is not defined it
will search in the VLTROOT directory.
BOOTHOME Path of the LCU environment directory.
BOOTDB Path of the LCU database
LOGFILE Name of the LCU logfile (full path)
BINPATH Search path for loading binaries and LCU boot files (*.boot).
Additionally the following environment variables also exists: BOOTROOT, MODROOT, CPU, LOCALENV, LOCALTCPPORT, HOSTENV, HOSTTCPPORT, LOCALHOST, LOCALIPADDRESS, LOCALIPADDR, HOSTNAME, HOSTIPADDR, BOOTPATH and CONFIGPATH.

7.3.3.2 NFS Configuration
Files are accessed through NFS by the LCU boards during system loading and initialisation and for database loading/unloading and backup/restore operations.
By default, all exported file systems of the boot server host are mounted by VxWorks boot procedure. The NFS configuration section of the boot script allows to mount file systems from other hosts on the LCU.
7.3.3.3 Customizing the LCU Common Software
All parameters have a default value that should fit most configurations.
lccEventQueueSize Size of message queue for events and alarms to be dispatched to target processes
by low priority lccEvent task (number of messages).
Default: 200
lccLogQueueSize Size of message queue for log and error messages to be processed by low
priority lccLogger task (number of messages).
Default: 200
lccErrorBufferSize Size of buffer for error messages (size in bytes). Error messages are discarded
when buffer overflows.
Default: 15000
lccEvtDiscardDN Maximum number of identical events/alarms taken into account in a certain
interval of time. A value of zero means that all events/alarms are processed.
Default: 0
lccEvtDiscardDT Interval of time during which a certain amount of identical events/alarms are
taken into account. A value of zero means that all events/alarms are processed.
Default: 0
lccLogDiscardDN Maximum number of identical errors taken into account in a certain interval
of time. A value of zero means that all errors are processed.
Default: 10
lccLogDiscardDT Interval of time during which a certain amount of identical errors are taken
into account. A value of zero means that all errors are processed.
Default: 2
lccMsgQueueSize Size of input message queue for processes registered in the Message System
(number of messages).
Default: 200
lccMapNameNumber Maximum number of names (point, aliases and attributes) defined in the database.
Default: 6000 This value is sufficient for about 30 motors and 3
serial devices. It is the total count for database including motei DB points. A too
small number may generate errors of "Loc:dbLoadRecursive", "Loc:lccInitAll"
and "Loc:mapGetDirect" lccERR_INTERNAL types at LCU boot time without
actually giving the error lccERR_MAP_MAXIMUM.
lccSamplingTimer Timer to be used for sampling rates faster than one VxWorks tick (1 to 4).
Default: 2
lccSleepTimer Timer to be used for timerSleep function (1 to 4).
Default: 1
lccDevicePollTime Interval for testing hardware device probe addresses (seconds).
Default: 10
lccDeviceTimeOut Time-out for replies from device control processes (seconds).
Default: 20
lccHwWdTimeout Timeout for the hardware watchdog timer (seconds). Valid values are 0 and
between 5 and 13. Value 0 disables the watchdog.
Default: 13
lccCmdStackSize Default stack size for task spawned by a command. If set to zero then the
default stack size of 50000 will be used. The size should not be less than 15000.
Be careful not to get stack overflow. Check with checkStack().
lccReadDbSignal If a database attribute corresponds to an input signal, then a call to dbReadDirect
will actually not only read the database valu but also the actual hardware signal
if this variable is set to 1 (default value). Any other value disables this
functionality.

If you need to change any of these parameters, copy the file $VLTROOT/vw/bin/<CPU_ARCH>/lcc.boot to your environment, $VLTDATA/ENVIRONMENTS/<lcuEnv> and edit the file. If you put the file lcc.boot in $INTROOT/vw/bin, the modifications will affect all LCU environments using this introot, if you put the file in $VLTDATA/ENVIRONMENTS/<lcuEnv> , it will only affect this environment.

7.3.4 Header File for Database Unloading

When a database is unloaded by the LCC software, the header written at the beginning of each Point Configuration File is taken from the file dbHeader found in the boot directory ($VLTDATA/ENVIRONMENTS/<lcuEnv>).

7.3.5 Installation Verification

In order to verify the installation, start the Engineering User Interface and attempt to send commands to the LCU, e.g.
· LCCGVER: get LCC version,
· LCCGST: get LCU status,
· ERRFRST: get errors logged during boot.

7.3.6 Unix Environment Configuration

7.3.6.1 Files
Files are searched by LCC software either under the $VLTDATA, that contains data and the $VLTROOT area, that contains released software, or under $INTROOT where software under development is integrated. For each user, what is in the integration area he refers has precedence to what has been already released.
Under both $VLTROOT and $INTROOT there is the same subdirectory structure and the files in the user's $INTROOT/xxx take precedence on those (with the same name) in $VLTROOT.
The following subdirectories and files structure is required to run LCC:
xxxROOT/
:
|-----------CDT/
| |---lccServer.cdt
| |---rdbServer.cdt
| |---msgServer.cdt
| |---.........
|
|--------ERRORS/
| |---lcc_ERRORS
| |---.........
|
|--------ALARMS/
| |---lcc_ALARMS
| |---.........
|
|------------vw/
| |---------CIT/
| | |---lccServer.cit
| | |---rdbServer.cit
:

VLTDATA/
|--ENVIRONMENTS/
| |---lbu --->/ +-----------+
| | |--PROCESSES-->| lccServer |
| | | | rdbServer |
| | | | msgServer |
| | | | ......... |
| | | +-----------+
| | |--bootScript
| | |--dbl/
| | |--DB/
| | |--devicesFile
| | |--logFile
| | |--rebootFile
| | .
| |
| |---laltaz->/ +-----------+
| | |--PROCESSES-->| lccServer |
| | | | rdbServer |
| | | | msgServer |
| | | | ......... |
| | | +-----------+
| | |--bootScript
| | |--dbl/
| | |--DB/
| | |--devicesFile
| | |--logFile
| | |--rebootFile
| | .
| |-....
| :
:

Command Definition Tables:
There is one file for each process. All files are stored under a fixed directory (CDT).
ENVIRONMENTS directory contains one directory for each environment. The file PROCESSES lists all the processes belonging to that environment (one process name per line).
Remark: blank lines are not allowed in the environment file and all lines must be terminated by a new-line character.
Error Definition Files:
There is one file for each software module: xxx_ERRORS. All files are stored under a fixed directory (ERRORS).
Alarm Definition Files:
There is one file for each software module, xxx_ALARMS. The file is stored under a fixed directory (ALARMS).
7.3.6.2 Environment Variables
In order to run the Engineering User Interface on a workstation, the following Environment Variables MUST be defined:
· INTROOT and VLTROOT Path name of the VLT integration and release areas (where Command Definition Tables, Alarm and Error Definition files are searched).
VLTROOT is mandatory but INTROOT is optional.
· VLTDATA Path name of the VLT data area.
· path Shell path variable must contain the path of $VLTROOT/bin.

8 ERROR MESSAGES AND RECOVERY

Each error returned by the LCU Common Software is described below, with the content of the run time parameters described between brackets, with possible corrective action.
lccERR_ACK Acknowledge message not received or invalid error count in acknowledge message [error].
Check Q Server or remote environment.
lccERR_ATTRIBUTE Invalid attribute name [name].
Check name.
lccERR_ATTR_TYPE Type given in database write operation does not match actual database attribute type [given type, expected type].
Check database parameter type.
lccERR_BAD_PARAM_NB Invalid number of parameters in command [command, expected number of parameters, actual number of parameters].
Check commands and tables.
lccERR_BAD_PARAM_RANGE Parameter value in command not in the correct range.
Check commands and tables.
lccERR_BAD_PARAM_REP Too many values for repetition factor of a parameter in command.
Check command and tables.
lccERR_BAD_PARAM_TYPE Prarmeter in command is of the wrong type.
Check command and tables.
lccERR_BAD_PARAM_VAL Invalid parameter value in command [command, parameter].
Check commands and tables.
lccERR_BAD_PRIORITY Invalid VxWorks priority in Command Interpreter Table or scheduled process [priority]. Valid VxWorks priority range from 0 to 255.
Modify priority.
lccERR_BAD_RT_OPTIONS Invalid VxWorks scheduling options in Command Interpreter Table or scheduled process [options].
Modify options.
lccERR_BAD_STACK_SIZE Invalid VxWorks stack size in Command Interpreter Table or scheduled command [size].
Modify stack size.
lccERR_BUF_SIZE Buffer is too small to contain requested database values [required size, buffer size].
Increase size of buffer.
lccERR_CMD_SPAWN Attempt to spawn a process already running.
No action.
lccERR_CMD_SYNTAX Syntax error in command [command, invalid parameter].
Check commands and tables.
lccERR_DB_BLOCK_COUNT One or more database attribute accesses failed during dbMultiRead or dbMultiWrite.
Check specification of list for multiple access.
lccERR_DB_CONVERT Not possible to convert value in database backup file during restore.
Check syntax of database backup file.
lccERR_DB_HIERARCHY Error while loading child database item [name]. Error generated recursively for each point level when a database loading generated an error.
No corrective action.
lccERR_DB_READ Failed to read from database.
lccERR_DB_SYNTAX Syntax error in database definition file [error, line number].
Check database definition file.
lccERR_DB_WRITE Failed to write to database.
lccERR_DE_TYPE Type given in database write operation does not match actual database parameter data type [given type, expected type].
Check database parameter data type.
lccERR_DEVICE Error reply or no reply from device control process [number of devices, device names].
Check device control process.
lccERR_DIRADDRESS Database direct address is not valid [invalid field, invalid value].
Use valid direct address. Re-compute all direct address when the LOADED state is exited.
lccERR_DRIVER A call to a driver function returned an error.
Check the error code and the command.
lccERR_DUPLICATE Another definition with the same name already exist [item type, name].
Use another name.
lccERR_ENV_NAME Invalid environment name or unknown environment [name].
Check name, or Q Server environment table definition in boot script, or environment is up.
lccERR_EVENT Error returned under the following conditions:
. attribute configured for abnormal event but not previously configured for
events [attribute];
. attribute configured for abnormal event with alarm number given for
limits that were not configured [attribute];
. attribute requested for abnormal events but not configured [attribute].
Check the attribute configuration.
lccERR_EVENTS_EXIST Request of events or alarms is possible only when no events or alarms have been requested yet.
Use evtAddXXX operation to add of events or alarms.
lccERR_FILE File access error [file, context].
Check file access rights, network and file content.
lccERR_FILE_CDT Syntax error in Command Definition Table [file name].
Check Command Definition Table.
lccERR_FILE_CIT Syntax error in Command Interpreter Table [file name].
Check Command Interpreter Table.
lccERR_FORMAT Invalid DISPLAY_FORMAT field in Command Definition table: format specification does not match reply parameters description.
lccERR_FULL A message queue (for events, logging or error messages) is full [context].
Increase the corresponding parameter in the boot script.
lccERR_IN_USE A functionality that can be used only once at a time (e.g. sampling or event request by remote process) is already in use [context].
Check with current user.
lccERR_INTERNAL Unexpected error in LCU Common Software [error context].
Send a problem report to ESO.
lccERR_INV_ACTION Operation not allowed in current LCU state [current state].
No corrective action.
ccERR_INV_FIELD Wrong number of fields or invalid field name for a database access operation.
Check number of fields or field names for the accessed attribute.
lccERR_INV_NAME Syntax error in database item or signal symbolic name [type of error, name].
Use a valid symbolic name.
lccERR_INV_RECEL Wrong number of records for a database access operation [given number, expected number].
Check number of records for the accessed attribute.
lccERR_INV_XREF During database unloading or backup operation a database cross-reference value does not correspond to a valid point or attribute. The backup or unload is not interrupted; the faulty cross-reference value is unloaded as `[]'.
lccERR_IO_ADDRESS Invalid direct address of signal [address value]. Possible error when a database is reloaded and direct address of signal has not been re-computed.
Re-compute all direct address when the LOADED state is exited.
lccERR_LENGTH Invalid length of an item name [name, maximum length].
Use valid name length.
lccERR_LOCK Attribute cannot be accessed because attribute or parent point is locked [attribute name].
Check with other users or unlock attribute or point before accessing the attribute.
lccERR_LOG_ENV Request from invalid environment.
lccERR_MAP_MAXIMUM Maximum number of names allowed in the database has been reached [name of item].
Increase the corresponding parameter in the boot script.
lccERR_MEMORY Dynamic memory allocation error [variable name, requested size].
Verify dynamic memory management of applications.
lccERR_MISSING_PARAM_VAL Missing parameter value in command [command, parameter]
Check commands and tables.
lccERR_MSG_CMD Invalid command received by msgServer process [command].
Check sent commands.
lccERR_MSG_PARSE Invalid runstring for msgScheduleProcess.
Check runstring.
lccERR_MSG_SIZE Message body is limited to (msgMAXLEN - sizeof(msgHEADER) - sizeof(msgOBITUARY)) [size].
Use smaller message body.
lccERR_MSG_TYPE Type of message is not a valid type [type].
Check message.
lccERR_MULTI Operation is allowed only for single database parameter and given address matches more than one parameter [name].
Modify address to match only one parameter.
lccERR_NO_EVENTS Operation evtAddXXX (on change, periodic events or alarms) is not allowed if no previous request operation was issued [requesting process].
Events and alarms must be requested before new events can be added.
lccERR_NO_IMAGE Missing attributes for image and status of a signal in the database [signal name].
Add attributes in database.
lccERR_NOT_FOUND An item (process name, attribute name, etc) is not defined [item type, not found name].
Use an existing name.
lccERR_NOT_REGISTERED Only processes registered in the Message System can send and receive command.
Register process before sending and receiving messages.
lccERR_ORDER Value given to limits for parameter monitoring are not in increasing order [lowLow value, low value, high value, highHigh value].
Modify the value of the limits.
lccERR_PARAMETER Invalid parameter to a function call [parameter name, invalid value].
Use a valid value.
lccERR_POINT Invalid point name [name].
Check name.
lccERR_PROC_NAME Process name is invalid or does not match any existing process [name].
Check process name.
lccERR_Q_EMPTY No matching message is found in the queue.
No corrective action.
lccERR_QSERVER A Q Server system call returned an unexpected error [called function, error number].
Check the returned error number, eventually reboot the LCU.
lccERR_RANGE Signal value is out of range [context, value].
Use valid signal values.
lccERR_REMOTE Operation not allowed on remote database [attribute name].
No corrective action.
lccERR_SEM An internal mutual exclusion semaphore remains locked for long duration [semaphore identifier].
Send a problem report to ESO.
lccERR_SEND_MESSAGE Timer module cannot send message for timerSendMessage request [context].
Check parameters of timerSendMessage operation.
lccERR_SIGNAL Invalid signal type for I/O operation [signal, expected type].
Use only valid I/O operations for signal.
lccERR_SIMULATION An operation is not allowed in simulation mode [context].
No corrective action.
lccERR_TIMEOUT Time-out expired for a function with time-out parameter [duration].
Check reason of time-out.
lccERR_TIME Times cannot be substracted (time2 > time1).
lccERR_TIMS_CONVERT Input string can't be converted to time.
lccERR_UNKNOWN_CMD Received command not found in Command Interpreter Table or Command Definition Table [table, command].
Check commands and tables.
lccERR_VXWORKS A VxWorks system call returned an unexpected error [called function, errno].
Check the returned errno.

APPENDIXES



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