#!/usr/local/bin/perl5 # # for CTS! 6.12.2007 #mainM: Main magnet current #buckM: Bucking magnet current #abstanD: distance between the two magnets (in mm) #$abstanD = 120.75; #$mainM=`doocsget -c PITZ.CA/MAGNETS/MAIN/SETPOINT`; #$buckM = 3.07 * $mainM * exp(-0.014 * $abstanD); #system `doocsput -c PITZ.CA/MAGNETS/Bucking/SETPOINT -t 2 -d $buckM` $mainM=`doocsget -c PITZ.CA/MAGNETS/MAIN2/SETPOINT`; $buckM = 0.074847 * $mainM; system `doocsput -c PITZ.CA/MAGNETS/BUCKING2/SETPOINT -t 2 -d $buckM`;