Checking EPD QTC -> DSM

Since we moved many of the QTCs around, we need to move the QT adapter cards in the back so that the QTCs are connected to the DSMs.  All East QTCs should go to EP001, all west QTCs should go to EP002.

There are 2 QTCs that are still lined up with an adapter car: EQ1 0x1A and EQ2 0x1A

Eleanor sent some instructions, which can be found at: drupal.star.bnl.gov/STAR/system/files/EleanorIns03222023.txt

First, one needs to be ready to run remotely (if not in the control room).  Follow the instructions at: drupal.star.bnl.gov/STAR/blog/rjreed/Running-EPD-Remotely

My annotated instructions below:
a) Power on EQ1 (as well as L01, etc...) or whatever EQ one is looking at.  Needs the BBC crate as well.
b) Login to startrg.starp.bnl.gov by ssh -A staruser@startrg.starp.bnl.gov
c) telnet eq1.trg.bnl.local
Caution!!!  Up arrow doesn't work.  CTRL+X will reboot and that takes a long time to come back.  It doesn't like delete. 
d) Launch Run Control
e) Start a run with 0 events
f) Wait until configuration is complete. The TRG box on the Run Control GUI should be yellow,
g) In the eq1 window use "m" to write the value 0x10 to address 0x10fc4030

The "m" means modify.  With 0x10fc4030 we are addressing the 4th daughter card in the board in the 0x10 slot.  (Which is a QTC in this case, though not connected to the DSM right now.)  These are 4-byte addresses, so the actual command should be:

m 0x10fc4030,4

Then one should see all 0s.  Then to put in the ramp command, type 10 and hit enter.  It will go to the next address, which we don't want to do anything with.  So type . and hit Enter to exit.

To check, one should type:
m 0x10fc4030,4

Then it should be 000010
Exit by typing . and hitting Enter again.  Now we are ready for the next part of Eleanor's instructions.

h) Back to the Run Control GUI. Issue however many triggers you want.
i) Stop Run
j) Look at the data file. You should see lots of data in one channel of EP001. Please make a note of which channel has the data.

This means to go to the run log, and look at the L0 trigger pdf that is being generated.  (Under daq info in the Run summary.)  Go to EPD L0 Input.  Right now there are a lot of "red" high boxes, because the QTCs are not connected to the DSMs and float high.  An example is:


j) In the eq1 window use "m" to write the value 0x0 to address 0x10fc4030. This turns off that ramp and you are done with this QTC.

so:
m 0x10fc4030,4
0
.

then check with:
m 0x10fc4030,4

Should only display 0s.  Then . to exit.

Then one can check the next board.  In the case of EQ1, that would then be:
m 0x18fc4030,4

The distribution of the boards within the crate can be found at: drupal.star.bnl.gov/STAR/system/files/userfiles/1108/VME_09112022.png

To exit, one must use the command:
logout

Remember to turn off the VME crates if no one is sitting in the Control Room!!

The details of what we are supposed to do from Eleanor's email are:

EQ2:
The board on the far left hand side is a QT-BOC card (Back-of-Crate). It receives 1 10-pin cable from the RCF board on the far right-hand side. The QT-BOC distributes the RHIC clock and Run/Stop signals to the QTB's along the P3 backplane. It should NOT be moved.
The 5 boards next to it are indeed QT-Adapter cards. Yes, you should just move them around so that they are now behind current QTC positions. Things to note:
- each QT-Adapter has a 10-pin cable connecting it to the RCF board. If you move a QT-Adapter to another crate (e.g.EQ4) then the 10-pin cable should also be moved to connect to the RCF card in the new crate. Please make a note of which RCF connector you use in the new crate.
- each QT-Adapter has a 34-pin TNF output cable that connects to either EP001 (East) or EP002 (West). That mapping needs to be maintained. So if a QT-Adapter was behind an East QTC in the past then after everything is moved around it should STILL be behind an East QTC. It does not need to be the same East QTC as before, it just needs to be East. 
- each QT-Adapter has a mechanical switch that affects how the clock signals are distributed on a QTC. All of those switches should be set the same way. They are most likely correct because all of these boards have been used in the past. But since you will be pulling the boards out to move them around it seems like a nice opportunity to check.
- Yes, you can essentially ignore all the large flat ribbons that are plugged directly into the backplane; they did connect QTB's to the DSM tree, and they are no longer in use. Unplugging them, rolling them up a little out of the way and then leaving them is just fine; there is no need to remove them.
 
EQ4: 
The card in the back labelled "STAR DSMI" should actually be a QT-BOC card. I think we ran out of QT-BOC faceplates, but there were extra "DSMI" panels, so one of those was used instead. If you look at the PCB itself you should see a very empty card. There should be a few chips next to the 10-pin connector and then over by the backplane connector there should be another little cluster of chips. That should be it. Somewhere in the screenprint on the board it probably says "QT BOC", or something like that. If this is what you see then you have the correct card. Please could you:
a) Remove the little plate that says "STAR DSMI"; it should just pop out. You can reverse it and plug it back in so that the ejector tab is complete. If that doesn't work then it is probably best to just leave the plate out. That will cause less confusion.
b) Move this card so it is in the far left-hand slot, just like it is in EQ2, and should be in EQ1 and EQ3.
If that card labelled "STAR DSMI" on the faceplate is NOT a QT-BOC card then EQ4 has a problem. In that case please take a photo of the card and send it to us. We will need to get that sorted out,

EQ4: drupal.star.bnl.gov/STAR/system/files/PXL_20230317_140912382%281%29.jpg
EQ2: drupal.star.bnl.gov/STAR/system/files/PXL_20230317_140803342%282%29.jpg