Skip to content
Snippets Groups Projects
Commit 472cd37f authored by Mario's avatar Mario
Browse files

Renamed a variable for clarity

parent 58203038
Branches
Tags
No related merge requests found
Pipeline #2367901 passed
......@@ -88,7 +88,7 @@ Help:
#### DCS related
- `-o:` **Turns on the output of the `channels_to_be_used`** specified in `lr_powersupply.json` before running the sequence of scans. **Turns the output off again** after running all the scans.
- `-o:` **Turns on the output of the `channels_to_be_used_by_the_scanoperator`** specified in `lr_powersupply.json` before running the sequence of scans. **Turns the output off again** after running all the scans.
- `-d:` Monitor the PS and store **real-time DCS data in InfluxDB**.
......@@ -176,7 +176,7 @@ Most of the items are self-explanatory. Here are the ones that may require some
#### Powersupply configuration file (lr_powersupply.json)
Contains the actual information to establish communication with the PS as well as the definition of the channels. Amongst all the channels you have defined, select the ones you want to use in "channels_to_be_used". The SO will ignore any channel not appearing there.
Contains the actual information to establish communication with the PS as well as the definition of the channels. Amongst all the channels you have defined, select the ones you want to use in "channels_to_be_used_by_the_scanoperator". The SO will ignore any channel not appearing there.
- **`.devices`**: Write here the PS / PSs you want to use. A list of supported "`hw-model`" and "`protocol`" is available in [labRemote's README.md](https://gitlab.cern.ch/berkeleylab/labRemote#python-bindings). To find the port your PS is connected to, look at the output of `ls -l /dev/serial/by-id/`.
......
......@@ -173,10 +173,10 @@ if [[ $dcsMonitor == 1 ]]
then
chn=""
nChannels="$(jq -j '.channels_to_be_used | length' $PSCFG)"
nChannels="$(jq -j '.channels_to_be_used_by_the_scanoperator | length' $PSCFG)"
for (( i=0; i<$nChannels; i++ ))
do
chName="$(jq -j ".channels_to_be_used[$i].name" $PSCFG)"
chName="$(jq -j ".channels_to_be_used_by_the_scanoperator[$i].name" $PSCFG)"
chn+="$chName,"
done
chn="${chn::-1}"
......@@ -490,10 +490,10 @@ fi
if [ $dcsOnOff == 1 ] ;then
echo -e "\n[ info ][so] Turning ON the PS..."
nChannels="$(jq -j '.channels_to_be_used | length' $PSCFG)"
nChannels="$(jq -j '.channels_to_be_used_by_the_scanoperator | length' $PSCFG)"
for (( i=0; i<$nChannels; i++ ))
do
chn="$(jq -j ".channels_to_be_used[$i].name" $PSCFG)"
chn="$(jq -j ".channels_to_be_used_by_the_scanoperator[$i].name" $PSCFG)"
python3 $SOBASE/libDCS/qaqc.py -e $PSCFG -c $chn -d $INFLUXDBDCSCFG power-on
if [ $? -ne 0 ]; then exit 1; fi
done
......@@ -558,10 +558,10 @@ done
if [ $dcsOnOff == 1 ]; then
echo -e "\n[ info ][so] Turning OFF the PS..."
nChannels="$(jq -j '.channels_to_be_used | length' $PSCFG)"
nChannels="$(jq -j '.channels_to_be_used_by_the_scanoperator | length' $PSCFG)"
for (( i=0; i<$nChannels; i++ ))
do
chn="$(jq -j ".channels_to_be_used[$i].name" $PSCFG)"
chn="$(jq -j ".channels_to_be_used_by_the_scanoperator[$i].name" $PSCFG)"
python3 $SOBASE/libDCS/qaqc.py -e $PSCFG -c $chn -d $INFLUXDBDCSCFG power-off
if [ $? -ne 0 ]; then exit 1; fi
done
......
{
"LR_lib_path": "/path/to/labRemote/build/lib",
"channels_to_be_used": [
"channels_to_be_used_by_the_scanoperator": [
{
"name": "LV"
}
......
#!/bin/bash
chn=""
nChannels="$(jq -j '.channels_to_be_used | length' $PSCFG)"
nChannels="$(jq -j '.channels_to_be_used_by_the_scanoperator | length' $PSCFG)"
for (( i=0; i<$nChannels; i++ ))
do
chName="$(jq -j ".channels_to_be_used[$i].name" $PSCFG)"
chName="$(jq -j ".channels_to_be_used_by_the_scanoperator[$i].name" $PSCFG)"
chn+="$chName,"
done
chn=${chn::-1}
......
......@@ -119,10 +119,10 @@ if [[ $dcsMonitor == 1 ]] ;then
echo "[ info ][sl] Getting single [V, I] measurement"
chn=""
nChannels="$(jq -j '.channels_to_be_used | length' $PSCFG)"
nChannels="$(jq -j '.channels_to_be_used_by_the_scanoperator | length' $PSCFG)"
for (( i=0; i<$nChannels; i++ ))
do
chName="$(jq -j ".channels_to_be_used[$i].name" $PSCFG)"
chName="$(jq -j ".channels_to_be_used_by_the_scanoperator[$i].name" $PSCFG)"
chn+="$chName,"
done
chn="${chn::-1}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment