Installating the MIDAS Data Acquisition software

If you have not already done so obtain the 1394 Application package using the link on http://npg.dl.ac.uk/MIDAS/download/DataAcqApplications.html

Download the file and unzip it.
Extract to C:
This will create the file C:\.eg-defaults.tcl and the directories C:\.midas and C:\MIDAS

Install MIDAS Data Acquisition software

This has mostly been done before the zip archive was created.
The following tasks need to be done

a) Create a directory c:\temp

b) Use Notepad to edit c:\windows\system32\drivers\etc\hosts and add egmsg as an alias for localhost

c) Copy the file #.exe from C:\MIDAS\Win32\bin to C:\windows\system32 This does nothing more than create the command line program # which is a comment (do nothing)

d) Copy the files in C:\MIDAS\Win32\Desktop to C:\documents and settings\[id]\Desktop
Where [id] is the User ID you logged into Windows with.

Start the software services

Note - when using WindowsXP SP2 you may have to permit the following services to run as you start them. Normally this needs only to be done once. This will also be true if using any third party fd
At each step allow the services to start before going on to the next step.
The desktop icon is a shortcut to a cmd file which is executed. This will create a Windows Command Prompt Window and launch the service tasks in most cases with High priority.
You may iconise (miminise) the window but do not close it unless you really wish to terminate the services. On the other hand closing the window is the easiest way to terminate the service tasks.

(1) Start the MessageLogger and ShObjManager deamons by double click on the MIDAS icon labelled common on the desktop.
The output will be as follows.

C:\MIDAS\Win32\StartUp>echo off
MIDAS Message Logger: Starting the RPC interface
MIDAS Message Logger: Created RPC Program 28000240 Version 1 on UDP port 10240.
MIDAS Message Logger: Message Logger using directory c:\midas\log
MIDAS Message Logger: Entering server loop
ShObjManager installed
startup complete
This starts the service programs MessageLogger.exe and ShObjManager.exe Unix/Linux treats Shared Memory as persistent. So if a program creates a Shared Memory object it will exist until deleted or the system is rebooted. Windows, however, will delete any Shared Memory objects created by a program when that program terminates. The Data Acquisition software uses Shared Memory to hold global data and parameters used by the DA system and these are required to persist for the duration of the session. The ShObjManager is used to actually create any Shared Memory areas needed by the DA software components and hence these will exist while the ShObjManager is running and after the program "creating" them (such as netint) has terminated.

(2) Start the Memory Spectrum Server by double clicking on the MIDAS icon labelled ShMEMsas on the desktop.
The output will be as follows.

C:\MIDAS\Win32\StartUp>echo off
Message logger contacted.
Spectrum Access Server Installed
startup complete
This starts the service program ShMemSAS.exe which will be the owner of all histograms created (in Shared memory) by the DA program. If the service task is terminated all histograms will be lost (unless you have prevously saved them to disc).

(3) Start the DA Server by double clicking on the MIDAS icon labelled DAserver on the desktop
The output will be as follows.

C:\MIDAS\Win32\StartUp>echo off
Register Server "daq" installed on port 10221
startup complete
This starts the service program RegisterServer.exe which is used to pass commands between the MIDAS GUI and the Data Acquisition program.

After the VXI crate is powered up and connected

(4) Start the VXI Register Server by double clicking on the MIDAS icon labelled VXIserver on the desktop
The output will similar to what follows. In detail the output is dependent on the VXI cards discovered in the crate.
This uses the configuration file c:\MIDAS\config\VXI\localhost
It is expected that you have the RM in slot 0; the Slot 1 module in Slot 1; a VRE in slot 2; a CsI module in slot 3 and a Master Trigger module in slot 4

C:\MIDAS\Win32\StartUp>echo off
NetVar definitions complete
Starting resourceManager session
Using resource vxi0::memacc
VXI card in slot 1 allocated addresses 0x0000c040 and 0x0000c040
VXI card in slot 2 allocated addresses 0x0000c080 and 0xa2000000
VXI card in slot 3 allocated addresses 0x0000c0c0 and 0x40220000
VXI card in slot 4 allocated addresses 0x0000c100 and 0xa0000000
VXI card in slot 5 not found
VXI card in slot 6 not found
VXI card in slot 7 not found
VXI card in slot 8 not found
VXI card in slot 9 not found
VXI card in slot 10 not found
VXI card in slot 11 not found
VXI card in slot 12 not found
VXI card in slot 1 is a SlotOne module
VXI card in slot 2 is a VRE(STR8080) module
VXI card in slot 3 is a Trigger MK2 module
VXI card in slot 4 is a CsI module
ERS: registers added - now updating and initialising
ERS: database updated and registers initialised
Register Server "vxi1" installed on port 10220
"Now defining Generic registers...
claimed localhost (vxi1), default port : capability = 4189115d00000000
defined NetVar_MyHostName
written attributes to NetVar_MyHostName
defined NetVar_MyVXICrate
written attributes to NetVar_MyVXICrate
defined NetVar_ServerType
written attributes to NetVar_ServerType
defined NetVar_ServerOS
written attributes to NetVar_ServerOS
defined NetVar_Inspection_DI1
written attributes to NetVar_Inspection_DI1
defined NetVar_Inspection_DI2
written attributes to NetVar_Inspection_DI2
defined NetVar_Inspection_DI3
written attributes to NetVar_Inspection_DI3
defined NetVar_Inspection_DI4
written attributes to NetVar_Inspection_DI4
defined NetVar_Inspection_AI1
written attributes to NetVar_Inspection_AI1
defined NetVar_Inspection_AI2
written attributes to NetVar_Inspection_AI2
defined NetVar_Inspection_VI
written attributes to NetVar_Inspection_VI
defined NetVar_Inspection_PAR1
written attributes to NetVar_Inspection_PAR1
defined NetVar_Inspection_PAR2
written attributes to NetVar_Inspection_PAR2
defined NetVar_HasBeenReset
written attributes to NetVar_HasBeenReset
defined NetVar_HasBeenRestored
written attributes to NetVar_HasBeenRestored
defined NetVar_HasBeenSetup
written attributes to NetVar_HasBeenSetup
defined VXI.TraceMode
written attributes to VXI.TraceMode
defined VXI.ContinueRegardless
written attributes to VXI.ContinueRegardless
freed localhost vxi1
Generic register definitions complete
Defined Error Message
startup complete

This starts the another copy of the service program RegisterServer.exe which is used to manage the contents of the VXI crate.
Check for unexpected error messages and wait until the "startup complete" message before continuing.

(5) If required start the TapeServer by double clicking on the MIDAS icon labelled TapeServer on the desktop
The output is dependent on the configuration file used - c:\MIDAS\TapeServer\Win\TS_configuration


C:\MIDAS\Win32\StartUp>echo off
MIDAS Tape Server: Message logger contacted.
MIDAS Tape Server: MIDAS Tape Server Build March 29 2004
MIDAS Tape Server: Using default startup
MIDAS Tape Server: Configuration: UDP port = 10205, SHM object=SHM_10205.
MIDAS Tape Server: File mapped object SHM_10205 of size 1330368 created
MIDAS Tape Server: Shared memory ID is 94
MIDAS Tape Server: Shared memory segment located at address 900000.
MIDAS Tape Server: Configuration file used - c:\MIDAS\TapeServer\Win\TS_configuration
MIDAS Tape Server: Stats task TSstats
MIDAS Tape Server: Using device dlt tape0 TSdriver
MIDAS Tape Server: Using device file file0 TSdriver
MIDAS Tape Server: Using device sink null0 TSdriver
MIDAS Tape Server: Data link TSlinkTCP
MIDAS Tape Server: Message reporting level = 0x180fff8
MIDAS Tape Server: Message logging level = 0xfff8
MIDAS Tape Server: Tape Server Options = 0x0
MIDAS Tape Server: File device path base = c:\MIDAS\TapeData
MIDAS Tape Server: Data buffer size = 32768
MIDAS Tape Server: Tape block size = 32768
MIDAS Tape Server: File mapped object SHM_110205 of size 2098728 created
MIDAS Tape Server: Shared memory ID is e8
MIDAS Tape Server: Shared memory segment located at address a50000.
MIDAS Tape Server: Capabilities restored.
MIDAS Tape Server: Master global area initialised.
MIDAS Tape Server: Stats task using TSstats 10205 (null)
MIDAS Tape Server: Stats task has pid 1292
MIDAS Tape Server: Driver process for tape0 using TSdriver 0 10205 (null)
MIDAS Tape Statistics: Message logger contacted.
MIDAS Tape Statistics: MIDAS Tape Statistics Build April 14 2004
MIDAS Tape Statistics: Started with args 10205 (null)
MIDAS Tape Statistics: Configuration: SHM key=10205
MIDAS Tape Statistics: File mapped object SHM_10205 accessed
MIDAS Tape Statistics: Shared memory ID is 88
MIDAS Tape Statistics: Shared memory segment located at address 8f0000.
MIDAS Tape Server: Created event TSDriverEvent0
MIDAS Tape Server: Driver process for tape0 has pid 1924
MIDAS Tape Server: Driver process for file0 using TSdriver 1 10205 (null)
MIDAS Tape Driver (1924): Message logger contacted.
MIDAS Tape Driver (1924): MIDAS Tape Driver Build April 14 2004
MIDAS Tape Server: Created event TSDriverEvent1
MIDAS Tape Driver (1924): Started with args 0 10205 (null)
MIDAS Tape Driver (1924): Configuration: driver=0, key=10205.
MIDAS Tape Driver (1924): File mapped object SHM_10205 accessed
MIDAS Tape Driver (1924): Shared memory ID is 88
MIDAS Tape Driver (1924): Shared memory segment located at address 900000.
MIDAS Tape Driver (1924): Using device tape0 of type dlt.
MIDAS Tape Server: Driver process for file0 has pid 996
MIDAS Tape Server: Driver process for null0 using TSdriver 2 10205 (null)
MIDAS Tape Server: Created event TSDriverEvent2
MIDAS Tape Driver (996): Message logger contacted.
MIDAS Tape Driver (996): MIDAS Tape Driver Build April 14 2004
MIDAS Tape Server: Driver process for null0 has pid 1120
MIDAS Tape Driver (996): Started with args 1 10205 (null)
MIDAS Tape Driver (996): Configuration: driver=1, key=10205.
MIDAS Tape Driver (996): File mapped object SHM_10205 accessed
MIDAS Tape Driver (996): Shared memory ID is 88
MIDAS Tape Driver (996): Shared memory segment located at address 900000.
MIDAS Tape Driver (996): Using device file0 of type file.
MIDAS Tape Server: Link task 0 using TSlinkTCP 10205       (null)
MIDAS Tape Driver (1120): Message logger contacted.
MIDAS Tape Driver (1120): MIDAS Tape Driver Build April 14 2004
MIDAS Tape Server: Link task has pid 1004
MIDAS Tape Driver (1120): Started with args 2 10205 (null)
MIDAS Tape Driver (1120): Configuration: driver=2, key=10205.
MIDAS Tape Driver (1120): File mapped object SHM_10205 accessed
MIDAS Tape Driver (1120): Shared memory ID is 88
MIDAS Tape Driver (1120): Shared memory segment located at address 900000.
MIDAS Tape Driver (1120): Using device null0 of type sink.
MIDAS Tape Server: Starting the RPC interface
MIDAS Tape Server: Created RPC Program 28000205 Version 4 on UDP port 10205.
MIDAS Tape Server: Entering server loop
MIDAS Data Link (1004): Message logger contacted.
MIDAS Data Link (1004): MIDAS Tape Data Link Build April 14 2004
MIDAS Tape Server: MIDAS Tape Server now available on UDP port 10205.
MIDAS Data Link (1004): Started with args 10205 (null)
MIDAS Data Link (1004): Configuration: SHM key=10205, TCP port = 10305
MIDAS Data Link (1004): File mapped object SHM_10205 accessed
MIDAS Data Link (1004): Shared memory ID is 94
MIDAS Data Link (1004): Shared memory segment located at address 980000.
MIDAS Data Link (1004): Starting the network interface
MIDAS Data Link (1004): TCP socket receive buffer was 8192 - now 131072
MIDAS Data Link (1004): MIDAS Data Link thread 0 using TCP port 10305.
MIDAS Data Link (1004): Entering server loop
MIDAS Data Link (1004): thread 0 listening on port 10305
MIDAS Tape Driver (1924): Opened event TSDriverEvent0
MIDAS Tape Driver (996): Opened event TSDriverEvent1
MIDAS Tape Driver (1120): Opened event TSDriverEvent2
startup complete

(6) Start the Data Acquisition program by double clicking on the MIDAS icon labelled 1394 DataAcq on the desktop

The output will similar to what follows.


C:\MIDAS\Win32\StartUp>echo off

1394 Data Acquisition Program Release 1 starting

Creating NetVars
Output buffer length = 32736; format option = 3; transfer option = 3
NetVars created and initialised
Statistics thread created
Installing signal handlers
Done
Data Acquisition using tape server localhost on port 0
Setting Transfer Block Size 32768
Setting Transfer Mode 3
Setting Overlap Mode 1
Setting nice 0
TCP transfer library version 3.9T
Threads enabled
TCP socket send buffer was 8192 - now 4194304
TCP socket receive buffer was 8192 - now 4194304
TCP socket created OK - now connecting to localhost
Connected to localhost port 16680
1394 Data Acquisition now all ready to start

This starts the program 1394execV1.exe at normal priority.

Message like those following will appear in the Tape Server window
MIDAS Data Link (1004): thread 0 accepted connection from 127.0.0.1, port 1085
MIDAS Data Link (1004): buffer size changed to 32768

(7) Start the GUI by double clicking on the MIDAS icon labelled MIDAS on the desktop

This is configured to run the VXI/1394 data acquisition session and to connect to an experiment which has already been created.
In principle you could now start the Experiment Control; Click on Setup and select "setup everything".
Create histograms for the CsI module using "Software Histograms" from the main menu.
And click on GO.

For further information regards Setup and Trouble Shooting go to Setup

return to MIDAS home page