Instructions for Running ISR DAQ

13 September 2000

These instructions are available on the web at :

<http://home.fnal.gov/~leer/DAQ_Documentation/Documentation_Homepage.htm>

Contents

I. Introduction

II\. Getting Started

A.  Starting Visual C++

B.  Starting the DAQ Program

III\. Taking a Set of Data

A.  Initializing the Sensors

B.  The Run Settings Menu

IV\. While the Program is Running

V. Known Bugs

VI\. Trouble Shooting Guide

Instructions for Running ISR DAQ

# Introduction

This is the instruction set for running the EMU Alignment DAQ at the
CERN ISR. The present version of the program uses 2 COM ports to control
two lines of DCOPS sensors and 1 COM port to control the HP Data
Acquisition Unit.

Important Files :

Location of Datafiles : D:\\Data

Location of Logfiles : D:\\Log

Location of Archived Data : D:\\Archive

## Getting Started

###  A. Starting Visual C++

I did not leave a final compiled version of the this program on the
computer. You will have to run the program from Visual VC++. Start
Visual C++ by clicking on the icon which looks like
![](media/image1.png) located on the toolbar next to the Windows Start
button.

Once the program opens. Select the **File** Menu, go down the menu to
**Recent Workspaces**, let the next menu pop out and then select the DAQ
program -- it will probably look like **C:\\Windows\\Desktop\\dual
testDAQ v1\\testDAQ**.

Note: It may be labeled **C:\\Windows\\Desktop\\dual testDAQ
v12\\testDAQ**

The copy I have at FNAL is in the folder marked v1. Either way, try
selecting

whatever is first on the Recent Workspaces menu. I think I moved old
versions

of the program off the desktop or at least clearly relabed them, so
don't worry !

If there is a problem, see Problem #1 or #2 in the TroubleShooting
section:

#### Starting the DAQ Program

Look on the Visual C++ and click the button which looks like
![](media/image2.png){width="0.17708333333333334in"
height="0.23055555555555557in"}. It is located toward the upper right
section of the screen near the end of the toolbar buttons and menus.
Alternately, you can try and execute the program by holding down the
CTRL key and pressing F5.

Once the program begins you should see the following screen :

![](media/image3.jpeg){width="2.501388888888889in"
height="1.9770833333333333in"}

Since some of the buttons are inactive (light gray), you are allowed
only two options -- to Initialize the system and to End Run (exit the
program).

## Taking a Set of Data 

**A. Initializing the Sensors**

The DCOPS sensors must be initialized and the correct data and log files
must be created. To do this, simply click the **Initialize** button.

You should see a status response in the Command Processor Window as the
program queries each of the sensor lines and creates the datafiles. You
will also see the information in the Run Information box (lower left
corner of the window) update with the number of Axial Sensors and number
of SLM Sensors.

If everything goes well, you should see something similar to:

![](media/image4.jpeg){width="2.8715277777777777in" height="2.275in"}

Notice the number of Axial and SLM Sensors is displayed on the lower
right corner of the screen. If this is not the number of sensors you
expected, click **End Run** to exit the program. Look at Problem #3 in
the TroubleShooting section below and try to try and figure out the
error.

If the screen suddenly disappears after a displaying a few lines of
text, the program has probably crashed (very unlikely). See Problem #4
in Section VI (TroubleShooting).

Now click on the **Start** button to go to the Run Settings Menu :

![](media/image5.jpeg){width="2.9972222222222222in"
height="2.8555555555555556in"}

B.  **The Run Settings Menu**

Data taking is arranged in the following manner:

![](media/image6.png){width="5.072222222222222in"
height="1.1729166666666666in"}

An event is defined as a reading of the one or both sensors lines. A
cluster is defined as a collection of events separated by n seconds
(which the user selects).

**Note:** Choosing to make 'Bi-Directional' measurements automatically
doubles the number of Events entered in the 'Multiple Events Interval'
Menu since each measurement must be taken twice -- once with Laser 302
and once with Laser 303.

The following diagram details the options available to the user in this
menu. Clicking on the **OK** button accepts the selections and starts
the run.

![](media/image7.wmf)

Most clusters taken during the July/August ISR test (and Integrated
Runs) were done with 4 Events per cluster, a 30 sec Warmup on the Lasers
(LDM), using both the Axial and SLM lines with the SLM line in
Bi-Directional mode, and 300 sec between measurements.

## While the Program is Running

After entering all the required information on the Settings Menu and
clicking the **OK**, the DAQ begins to take data. You can take a look at
the progress being made by looking at the bottom of the window :

![](media/image8.jpeg){width="2.8340277777777776in"
height="0.9236111111111112in"}

In this section, you can see which event is being read (right Run Info
box) or the time until the next set of measurements or cluster will
begin. The Progress bars (on the left) show the total number of events
and clusters in the Run as well as where in the run the DAQ is.

Between clusters, the Timer on the left will count down the time until
the next set of events in next cluster will begin. When the time
expires, the Laser is turned on and measurements begin. While the Timer
is counting down, however, you can click on the **Pause** button to
freeze the timer. Click on the **Resume** button to continue the
countdown or the **End Run** button to exit the program.

If the window fails to update, the program may have hung up or there
might be a problem with the refresh on the window. See Section V (Bugs)
B and C as well as Problem #5 in the Section VI (Troubleshooting) to
decide the nature of the problem.

## Known Bugs 

###### Random Errors from DCOPS causing hangup in DAQ

Random errors in the DCOPS data stream have on a very few occasions
caused the DAQ to hang up. This is probably due to errors returned from
the DSP which interfere with the DAQ's ability to distinguish the return
prompt from the sensors. The problem does not occur very often. To kill
the program, see the Troubleshooting section, Problem 5.

###### Window Refresh during long runs

If the DAQ is set to run for a large number of events (\>70), the main
window may not refresh properly and appear stuck. The Events and Readout
will work fine (you should here periodic clicking of HP Unit), except
you may no longer be able to view the progress of the Run in the Main
Window. Again, data will be taken without a problem. You may, however,
be able to see the timer counting down when the computer is pausing
between measurements.

###### Poor tasking of I/O processes during running 

The large volume of serial data being streamed makes it very difficult
to track I/O very efficiently. Running an FTP or telnet client during
data taking will slow the program down considerably.

###### Interference with Screen Saver 

Again related to Window refresh problem -- they screen saver should be
disabled to prevent the DAQ window from being swiped over with white
swatches.

###### Format Errors

There are some format errors (all systematic) in the DAQ output files.
There is a C++ program to correct these errors as well as random errors
n the DSP stream. The format errors are not significant.

## Trouble Shooting Guide

**Problem 1**: You don't see **C:\\Windows\\Desktop\\dual testDAQ
v1\\testDAQ** on the menu.

Solution :

I am not 100% sure on the path name, the important thing is to choose
the menu item which is the closest to the top has **\...\\dual testDAQ
v1\\testDAQ** in it.

**Problem 2**: You don't see, can't find, or there are no menu choices
on the **Recent Workspaces** menu.

Solution :

There is another way to load our DAQ into Visual C++. Look on the
desktop for a folder similar to ![](media/image9.png){width="0.44375in"
height="0.4097222222222222in"}. Double Click on the folder to open it
and view the files inside. Find the file Testdaq.dsw (it looks like this
:![](media/image10.wmf) ) and double click on it . Visual C++ should
start right up with our DAQ loaded.

**Problem 3**: The DAQ Program never makes it to the second menu after
pressing the **Initialize** button..

Solution : The problem is caused by a null response from the sensors or
the HP unit. You can look on the Command Processor window and check
which sensor line was being queried as the program stalled. If the
program is hung up, it will probably not allow you to click on the **End
Run** button to exit. You will have to press the **Ctrl**, **Alt**, and
**Delete** keys simultaneously [one time]{.underline} -- Be careful,
pressing these keys twice will restart the computer. A few seconds after
you press the three keys simultaneously, a small window will pop up
asking you if you would like to 'end the task' or 'wait' -- click on the
**End Task** button. After another moment, the Main DAQ window will
disappear and you can troubleshoot the problem and start the DAQ program
again as in Step II B above.

After killing the Main DAQ window as described above, try and
troubleshoot the sensors in the following manner:

1.  Check the power.

2.  Check that cables running from the DCOPS sensors run into the
    converter card

3.  Check the COM cables running from the converter cards to the
    computer are connected in this manner :

    a.  Com 1 -- SLM line

    b.  Com 2 -- HP unit (connection via 25 pin adapter)

    c.  Com 3 -- Axial line

4.  Try and click one of the reset buttons on one of the DCOPS boards
    (the small black button near the EPROMS chip)

5.  You will have to check if the DCOPS sensors' DSPs are hung up with
    hyperterm.

Look on the windows desktop for the hyperterm icon and double click on
it.

![](media/image11.wmf){width="0.375in" height="0.40625in"}

You will see :

![](media/image12.jpeg){width="2.9993055555555554in"
height="2.377083333333333in"}

Hit the **Enter** key ... if you see something similar as above with the
0001-\> and a blinking cursor after it, this DCOPS string is online (the
0001-\> prompt will be 000X-\> where X is the number of DCOPS in the
string). If you do not get the prompt described, the cursor seems
'stuck', or the white portion of the window is blank, then the Com port
is hung up or the hyperterm program is not checking a Com port with an
active sensor string. To make sure the problem is not with the DCOPS
Sensor string, again press the reset button on one of the DCOPS board.
Hopefully you will see a change in the Hyperterm window.

To check another Com port (or the other sensor string), click on the
**File** menu, then select **Properties**. You will see a window pop-up
which looks like this :

![](media/image13.jpeg){width="2.547222222222222in"
height="2.873611111111111in"}

Use the pull down menu labeled 'Connect Using' to select another Com
port.

The Com port with the HP unit connected to it returns only gibberish, so
you only want to use Hyperterm to troubleshoot DCOPS sensors.

6.  If none of this works, restart the computer !

**Problem 4**: The DAQ Program never makes it to the second menu after
pressing the **Initialize** button. The screen just disappears.

Solution: The program has crashed. This could be any number of things.
You are using the same program as the July/August runs and there were no
crashes reported, so odds are it is not a fatal programming error.

Check to make sure another program is not taking up one of the COM ports
(Hyperterm or another copy of the DAQ running in the background ?). To
see if another program is running in the background, click on the
Windows desktop and then press the **Ctrl**, **Alt**, and **Delete**
keys simultaneously [one time]{.underline} -- Be careful, pressing these
keys twice will restart the computer. A few seconds after you press the
three keys simultaneously, a small window will pop up with a list of
applications currently running. If you see something which should not be
there, click on the name of the program and then the button marked **End
Task**. Otherwise click the **Cancel** button.

**Problem 5**: The DAQ has hung up during the middle of a run and will
not respond.

Solution: Be sure this is not really one of the described bugs in the
software (Section V B) !!! If it is really hung, you will have to kill
the program and start it again. To kill the program, press the **Ctrl**,
**Alt**, and **Delete** keys simultaneously [one time]{.underline} -- Be
careful, pressing these keys twice will restart the computer. A few
seconds after you press the three keys simultaneously, a small window
will pop up asking you if you would like to 'end the task' or 'wait' --
click on the **End Task** button. After another moment, the Main DAQ
window will disappear and you can troubleshoot the problem and start the
DAQ program again as in Step II B above. I recommend trying to use the
Hyperterm program to look at the sensor strings after such a hangup --
it may be the case that you will not see a prompt from the DCOPS. Try to
hit the Return key a couple times and get the prompt back. See
troubleshooting Problem 3 for more information regarding non-responsive
sensors.