Skip to content

Commit

Permalink
Merge pull request #73 from OSU-CMS/DEV
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
mlj5j authored May 23, 2023
2 parents fba7ea3 + f35cd61 commit ca0438e
Show file tree
Hide file tree
Showing 12 changed files with 104 additions and 216 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Gui/siteSettings.py
Gui/siteConfig.py
9 changes: 0 additions & 9 deletions Configuration/DAQ.py

This file was deleted.

51 changes: 0 additions & 51 deletions FWCore/DAQ.py

This file was deleted.

Empty file removed FWCore/__init__.py
Empty file.
32 changes: 0 additions & 32 deletions FWCore/test.py

This file was deleted.

11 changes: 0 additions & 11 deletions Gui/CMSminiDAQ_wrap.py

This file was deleted.

32 changes: 0 additions & 32 deletions Gui/GUIutils/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,32 +127,27 @@ def __init__(self,DBhostname,DBIP,DBName):
"v4-13":"QUAD_ELE_CROC_v4-6.bit",
"v4-14":"QUAD_ELE_CROC_v4-6.bit",
},
# "RD53B" : {"v4.0.6":"IT_L12K4SCC_ELE_CROC.bit"}
}

ModuleLaneMap = {
"TFPX Quad": {"0":"4","1":"2","2":"7","3":"5"},
#"TFPX Quad": {"0":"4","2":"7","3":"5"},
"TEPX Quad": {"0":"0","1":"1","2":"2","3":"3"},
"TBPX Quad": {"0":"4","1":"5","2":"6","3":"7"},
"SingleSCC": {"0":"0"},
"Yellow Module (Purdue)" : {"0":"6","1":"5","3":"7"},
"CROC SCC": {"0":"15"},
#"CROC 1x2" : {"2":"13"},
"CROC 1x2" : {"0":"12","2":"13"},
"TFPX CROC Quad" : {"0":"12","1":"13","2":"14"},
}

BoxSize = {
"SingleSCC" : 1,
"TFPX Quad" : 4,
#"TFPX Quad" : 3,
"TEPX Quad" : 4,
"TBPX Quad" : 4,
"Yellow Module (Purdue)": 3,
"CROC SCC" : 1,
"CROC 1x2" : 2,
#"CROC 1x2" : 1,
"TFPX CROC Quad" : 3,
}

Expand All @@ -175,33 +170,6 @@ def __init__(self,DBhostname,DBIP,DBName):
}


ModuleCurrentMap = {
"SingleSCC" : 0.6,
"TFPX Quad" : 6.5,
"TEPX Quad" : 6,
"TBPX Quad" : 6.5,
"Yellow Module (Purdue)": 6.5,
"CROC 1x2" : 4.8,
"TFPX CROC Quad" : 6.5,
"CROC SCC" : 0.6,
}

ModuleVoltageMapSLDO = {
"SingleSCC" : 1.8,
"TFPX Quad" : 2.98,
"TEPX Quad" : 2.0,
"TBPX Quad" : 2.98,
"Yellow Module (Purdue)": 2.8,
"CROC 1x2" : 2.5,
"TFPX CROC Quad" : 2.98,
"CROC SCC" : 1.8,
}

ModuleVoltageMap = {
"SingleSCC" : 1.3,
"CROC SCC" : 1.3,
}


ConfigFiles = {
'Latency' : '/Configuration/Defaults/CMSIT.xml',
Expand Down
47 changes: 0 additions & 47 deletions Gui/acfGui.py

This file was deleted.

13 changes: 0 additions & 13 deletions Gui/durp.py

This file was deleted.

93 changes: 93 additions & 0 deletions Gui/siteConfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
######################################################################
# To be edited by expert as default setting for Hardware configuration
######################################################################

# Set gpib debug mode to True if you want to see SCPI commands sent to HV and LV devices:
GPIB_DebugMode = False


## The following block sets defaults that are to be used in the simplified (non-expert) mode. ##
## This mode is currently under development, so these values don't currently do anything ##

# default FC7 boardName
defaultFC7 = "fc7.board.1"
# default IP address of IP address
defaultFC7IP = '192.168.1.80'
# default FMC board number
defaultFMC = '0'
# default mode for LV powering (Direct,SLDO,etc)
defaultPowerMode = "SLDO"
#default DBServerIP
defaultDBServerIP = '127.0.0.1'
#default DBName
defaultDBName = 'SampleDB'
##################################


## The following block assigns ports to devices when the "connect all devices" button is clicked ##

# default USB port for HV power supply
defaultUSBPortHV = ["ASRL/dev/ttyUSBHV::INSTR"]
# default model for HV power supply
defaultHVModel = ["Keithley 2410 (RS232)"]
# default USB port for LV power supply
defaultUSBPortLV = ["ASRL/dev/ttyUSBLV::INSTR"]
# default model for LV power supply
defaultLVModel = ["KeySight E3633 (RS232)"]
#default BaudRate for Arduino sensor
defaultSensorBaudRate = 9600
#################################


#setting default HV current compliance in mA
defaultHVCurrentCompliance = 0.00001

#setting HV bias voltage in V
defaultHVsetting = -60

## Configuring the current settings for each module type. These values are in Amps.
ModuleCurrentMap = {
"SingleSCC" : 0.6,
"TFPX Quad" : 6.5,
"TEPX Quad" : 6,
"TBPX Quad" : 6.5,
"Yellow Module (Purdue)": 6.5,
"CROC 1x2" : 4.0,
"TFPX CROC Quad" : 6.5,
"CROC SCC" : 2.0,
}

## Configuring the voltage limit for each module type when operating in SLDO mode. These values are in Volts.
ModuleVoltageMapSLDO = {
"SingleSCC" : 1.8,
"TFPX Quad" : 2.98,
"TEPX Quad" : 2.0,
"TBPX Quad" : 2.98,
"Yellow Module (Purdue)": 2.8,
"CROC 1x2" : 2.0,
"TFPX CROC Quad" : 2.98,
"CROC SCC" : 1.8,
}

## Configuring the voltage settings for each module type. These values are in Volts.
ModuleVoltageMap = {
"SingleSCC" : 1.3,
"CROC SCC" : 1.6,
}

#setting the sequence of threshold tuning targets:
defaultTargetThr = ['2000','1500','1200','1000','800']

##### The following settings are for SLDO scans developed for Purdue.#####
##### Do not modify these settings unless you know what you are doing.####
#default settings for SLDO scan.
defaultSLDOscanVoltage = 0.0
defaultSLDOscanMaxCurrent = 0.0


### Setting for Peltier Controller
usePeltier = True
defaultPeltierPort = '/dev/ttyUSBPeltier'
defaultPeltierBaud = 9600
defaultPeltierSetTemp = 20
defaultPeltierWarningTemp = 40
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ git pull --recurse-submodules

2. Get the latest docker image:
```
docker pull majoyce2/ph2_acf_gui:version4.13
docker pull majoyce2/ph2_acf_gui:latest
```

3. Specify device ports:
In run_Docker.sh you need to update the devices in the "docker run" line of the script. Change any "--device=tty*" to reflect the ports you will be using.
In run_Docker.sh you need to update the devices in the "mydevicelist" to reflect the ports you will be using.

4. Start the docker container:
```
source run_Docker.sh
bash run_Docker.sh
```

5. That's it! At this point the GUI should be open and ready to use.
Expand Down
24 changes: 6 additions & 18 deletions run_Docker.sh
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
#!/bin/bash
SOCK=/tmp/.X11-unix; XAUTH=/tmp/.docker.xauth; xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -; chmod 777 $XAUTH;

#### This block is in development ##########
output=$(python3 -m serial.tools.list_ports -q)
IFS=$'\n' ports=($output)
devices=""

for port in "${ports[@]}"; do
if [ ! -z "$port" ]; then
devices+="--device=$port "
fi

done
devices=$(echo $devices | xargs)
#############################################
## More stuff in development #############
## Change the ports in 'mydevicelist' to those which you wish to use with the GUI#############
mydevices=""
#mydevicelist=("/dev/ttyUSBLV" "/dev/ttyUSBHV" "/dev/ttyUSBPeltier" "/dev/ttyACM0")
mydevicelist=("/dev/ttyACM0" "/dev/ttyUSBHV")
mydevicelist=("/dev/ttyUSBLV" "/dev/ttyUSBHV" "/dev/ttyUSBPeltier" "/dev/ttyACM0")

for mydevice in "${mydevicelist[@]}"; do
mydevices+="--device=$mydevice "
mydevices+=" "
echo "device loaded $mydevices"
done
mydevices=$(echo $mydevices | xargs)
echo $mydevices | xargs
############################################
################################################################################################

#docker run --rm -ti -v $PWD:$PWD -v ${PWD}/Ph2_ACF/test:/home/cmsTkUser/Ph2_ACF_GUI/Ph2_ACF/test -v ${PWD}/data:/home/cmsTkUser/Ph2_ACF_GUI/data $devices -w $PWD -e DISPLAY=$DISPLAY -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH -e XAUTHORITY=$XAUTH --net host local/testimage
#docker run --rm -ti -v $PWD:$PWD -v ${PWD}/Ph2_ACF/test:/home/cmsTkUser/Ph2_ACF_GUI/Ph2_ACF/test -v ${PWD}/data:/home/cmsTkUser/Ph2_ACF_GUI/data --device=/dev/ttyUSBHV --device=/dev/ttyUSBLV --device=/dev/ttyUSBPeltier --device=/dev/ttyACM0 -w $PWD -e DISPLAY=$DISPLAY -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH -e XAUTHORITY=$XAUTH --net host local/testimage
docker run --rm -ti -v $PWD:$PWD -v ${PWD}/Ph2_ACF/test:/home/cmsTkUser/Ph2_ACF_GUI/Ph2_ACF/test -v ${PWD}/data:/home/cmsTkUser/Ph2_ACF_GUI/data --device=/dev/ttyUSBHV --device=/dev/ttyUSBLV --device=/dev/ttyUSBPeltier --device=/dev/ttyACM0 -w $PWD -e DISPLAY=$DISPLAY -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH -e XAUTHORITY=$XAUTH --net host majoyce2/ph2_acf_gui:version4.13
#docker run --rm -ti -v $PWD:$PWD -v ${PWD}/Ph2_ACF/test:/home/cmsTkUser/Ph2_ACF_GUI/Ph2_ACF/test -v ${PWD}/data:/home/cmsTkUser/Ph2_ACF_GUI/data $mydevices -w $PWD -e DISPLAY=$DISPLAY -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH -e XAUTHORITY=$XAUTH --net host majoyce2/ph2_acf_gui:version4.13
docker run --rm -ti $mydevices -v $PWD:$PWD -v ${PWD}/Ph2_ACF/test:/home/cmsTkUser/Ph2_ACF_GUI/Ph2_ACF/test -v ${PWD}/Gui/siteConfig.py:/home/cmsTkUser/Ph2_ACF_GUI/Gui/siteSettings.py:ro -v ${PWD}/data:/home/cmsTkUser/Ph2_ACF_GUI/data -w $PWD -e DISPLAY=$DISPLAY -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH -e XAUTHORITY=$XAUTH --net host majoyce2/ph2_acf_gui:latest
#docker run --rm -ti $mydevices -v $PWD:$PWD -v ${PWD}/Ph2_ACF/test:/home/cmsTkUser/Ph2_ACF_GUI/Ph2_ACF/test -v ${PWD}/Gui/siteConfig.py:/home/cmsTkUser/Ph2_ACF_GUI/Gui/siteSettings.py:ro -v ${PWD}/data:/home/cmsTkUser/Ph2_ACF_GUI/data -w $PWD -e DISPLAY=$DISPLAY -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH -e XAUTHORITY=$XAUTH --net host local/testimage

0 comments on commit ca0438e

Please sign in to comment.