MIDAS software download and installation
Installation of the VXI support package for VxWorks
Last updated Jan 23 2002
Download of VxWorks - The following instructions assume that you are familiar with VxWorks and are just an indication of the statements specific to the MIDAS installation. It is NOT expected that someone who has never used VxWorks before would be able to perform a software installation without additional assistance.
The NVRAM of the processors of all the VxWorks systems will need to be edited to contain the correct addresses and refer to the correct files.
generic VxWorks start up script
All VxWorks systems use the file /MIDAS/boot/startup.cmd
#--------- Start of sample generic startup.cmd (/MIDAS/boot/startup.cmd)
tyBackspaceSet 0x7f
hostAdd "nnsa", "193.62.115.16"
hostAdd "egmsg", "193.62.115.16" /* currently nnsa */
server = "nnsa"
nfsMount server, "/data_acq/MIDAS", "/MIDAS"
iam "VxWorks"
thishost = malloc (11)
gethostname thishost, 10
nfsAuthUnixSet thishost, 14052, 14003, 0 /* id=VxWorks, gp=eurogam */
NetVar_MyHostName = calloc(80,1)
strcpy (NetVar_MyHostName, thishost)
NetVar_ServerOS = calloc(80,1)
strcpy (NetVar_ServerOS, "VxWorks")
myPrompt = malloc (15)
strcpy (myPrompt, thishost)
shellPromptSet (strcat (myPrompt, " -> "))
#--------- End of sample generic startup.cmd
This will need to be edited for the local server. Change nnsa; the IP address
of the server (do not change string egmsg); uid and gid for VxWorks.
VXI crate software (loaded into Resource Manager)
For each VXI crate a directory of the form /MIDAS/boot/xxx will be needed.
This contains the VxWorks system specific startup script file. In this example xxx is n1vxi1.
#--------- Start of sample system specific startup.cmd
< /MIDAS/boot/startup.cmd
# define name which will be used in the apparatus file for this VXI crate
NetVar_MyVXICrate = calloc(80,1)
strcpy (NetVar_MyVXICrate, "vxi1")
cd "/MIDAS/obj"
ld < rdwr.o
ld < message.o
# Note - loading order is important
ld < resourceManager.o
ld < register-server.o
# histindex needs to be before both spectrum server and VXI
ld < histindex.o
# must be after histindex
< /MIDAS/config/VXI/GroupDefn
# spectrum server needs to be after register-server
ld < rmansas.o
ld < registers.o
ld < ersconfig.o
ld < generic.o
ld < VME.o
ld < VXI.o
< /MIDAS/config/VXI/NetVarDefn
# for testing new modules
#TestMode=1
#TestModeInit
# for general testing
#ContinueRegardless=1
msgInitialise /* install the message logging task */
#TestSlot = 11 /* fills out the crate with module in slot */
resourceManager /* VXI auto configuration */
taskDelay 100
ersInstall NetVar_MyVXICrate, "/MIDAS/config/VXI/n1vxi1" /* start the register server */
taskDelay 1000 /* again a pause is needed to allow the previous command to execute */
ersconfig "/MIDAS/config/VXI/NetVarRegDefn" /* define NetVar registers */
taskDelay 100 /* again a pause is needed ... */
sasInstall 0x100 /* starting the spectrum server moved after register server for new sas */
msgDefineMessage(0,0,9,0,"#message#VXI crate reboot complete#action#source VXIrestart.tcl vxi1")
pwd
#--------- End of sample system specific startup.cmd
This startup expects 4 configuration files
BgoBallBase = 81 GeBase = 51 CloverBase = 21 ClusterBase = 1 SaphirBase = 101 IcareBase = 10 NWallBase = 161 CsIBase = 191 QDC6414VBase = 111 ESSBase = 128 ECCBase = 160 HRGe8xBase = 160 GOCCEBase = 175Sample /MIDAS/config/VXI/GroupDefn
strcpy (NetVar_ServerType = calloc(80,1), "VXI") strcpy (NetVar_ServerOS = calloc(80,1), "VxWorks") # variables for holding inspection line application strcpy (NetVar_Inspection_D1 = calloc(80,1), "Disconnected ") strcpy (NetVar_Inspection_D2 = calloc(80,1), "Disconnected ") strcpy (NetVar_Inspection_D3 = calloc(80,1), "Disconnected ") strcpy (NetVar_Inspection_D4 = calloc(80,1), "Disconnected ") strcpy (NetVar_Inspection_A1 = calloc(80,1), "Disconnected ") strcpy (NetVar_Inspection_A2 = calloc(80,1), "Disconnected ") strcpy (NetVar_Inspection_V = calloc(80,1), "Disconnected ") strcpy (NetVar_Inspection_PAR1 = calloc(80,1), "Disconnected ") strcpy (NetVar_Inspection_PAR2 = calloc(80,1), "Disconnected ") # variable to indicate that a software reset has been performed after reboot NetVar_HasBeenReset = 0 # variable to indicate that a parameter restore has been performed after reboot NetVar_HasBeenRestored = 0 # variable to indicate that a software setup has been performed after reboot NetVar_HasBeenSetup = 0Sample /MIDAS/config/VXI/NetVarRegDefn
ersdefine NetVar_MyHostName generic erswta NetVar_MyHostName -n NetVar_MyHostName -t string ersdefine NetVar_MyVXICrate generic erswta NetVar_MyVXICrate -n NetVar_MyVXICrate -t string ersdefine NetVar_ServerType generic erswta NetVar_ServerType -n NetVar_ServerType -t string ersdefine NetVar_ServerOS generic erswta NetVar_ServerOS -n NetVar_ServerOS -t string ersdefine NetVar_Inspection_DI1 generic erswta NetVar_Inspection_DI1 -n NetVar_Inspection_D1 -t string ersdefine NetVar_Inspection_DI2 generic erswta NetVar_Inspection_DI2 -n NetVar_Inspection_D2 -t string ersdefine NetVar_Inspection_DI3 generic erswta NetVar_Inspection_DI3 -n NetVar_Inspection_D3 -t string ersdefine NetVar_Inspection_DI4 generic erswta NetVar_Inspection_DI4 -n NetVar_Inspection_D4 -t string ersdefine NetVar_Inspection_AI1 generic erswta NetVar_Inspection_AI1 -n NetVar_Inspection_A1 -t string ersdefine NetVar_Inspection_AI2 generic erswta NetVar_Inspection_AI2 -n NetVar_Inspection_A2 -t string ersdefine NetVar_Inspection_VI generic erswta NetVar_Inspection_VI -n NetVar_Inspection_V -t string ersdefine NetVar_Inspection_PAR1 generic erswta NetVar_Inspection_PAR1 -n NetVar_Inspection_PAR1 -t string ersdefine NetVar_Inspection_PAR2 generic erswta NetVar_Inspection_PAR2 -n NetVar_Inspection_PAR2 -t string ersdefine NetVar_HasBeenReset generic erswta NetVar_HasBeenReset -n NetVar_HasBeenReset -t int ersdefine NetVar_HasBeenRestored generic erswta NetVar_HasBeenRestored -n NetVar_HasBeenRestored -t int ersdefine NetVar_HasBeenSetup generic erswta NetVar_HasBeenSetup -n NetVar_HasBeenSetup -t int ersdefine VXI.TraceMode generic erswta VXI.TraceMode -n TraceMode -t int ersdefine VXI.ContinueRegardless generic erswta VXI.ContinueRegardless -n ContinueRegardless -t intSample /MIDAS/config/VXI/n1vxi1
module RM1 slot 0 module TDR32V0 slot 6 module ECC#0 slot 4 detector ECC0 channel 1 detector ECC1 channel 2
((name vxi2) (host n1vxi2) (role VXI) (type register) (ipaddress 123456) (port 10220)) ((name vxi2) (host n1vxi2) (role rmhist) (type spectrum) (ipaddress 123456) (port 10230))Samples of all these files can be found in the /MIDAS/Samples/ directory which is obtained if you download the Samples package.