Search on site:  
 
 
Creating Code / Configuring Server / Client Use
Case Command (guide)
Update code from remote. git pull --rebase
Save changes + upload remote. git add -A;
git commit -m "details";
git push origin master;
Force local to match remote. git fetch origin;
git reset --hard origin/master;
Discard local changes + update cleanly. git reset --hard;
git pull --rebase;
Go back to old version. git log;
git reset --hard 0ad5a7a6;
Check current state. git status;
Restore one file from remote. git fetch origin;
git restore --source=origin/master file;
Case Command
Start manually scpi_server on EPC001 Connect to PI unit hosting scpi_server:
ssh user@PiServer.cern.ch

Configure MCP23017 Launch scpi_server:
cd /home/cern/bin/python/scripts; python3 scpi_server/scpi_utilities/gpio_control.py 11 1; python3 -m scpi_server.main

Note: GPIO11 to 1 to get MCP23017 operational.
Set batch of commands Select your case:
HOST=localhost;
HOST=raspberry-pi-10.cern.ch;

Set all MCP:1:I/O to output mode
for pin in {0..15}; do echo "SET MCP:1:${pin}:MODE OUTPUT"; sleep 0.2; done | nc -q 1 "${HOST}" 5000

Set all MCP:1:x to LOW state
for pin in {0..15}; do echo "SET MCP:1:${pin}:STATE LOW"; sleep 0.2; done | nc -q 1 "${HOST}" 5000

Send all DAC:1:x same waveform
for dac in {1..4}; do for ch in {1..4}; do echo "SET DAC:${dac}:CH:${ch} SINE 0 20 0.1"; sleep 0.2; done; done | nc -q 1 "${HOST}" 5000