From 50dbadc811f1405c29136979cf036d0d0b91f91f Mon Sep 17 00:00:00 2001 From: Ferdi Franceschini Date: Wed, 8 May 2013 07:15:55 +1000 Subject: [PATCH] Set both fermi choppers to phase mode. You can set both speed and phase delay in phase mode. --- .../instrument/pelican/config/chopper/fermimot.tcl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/site_ansto/instrument/pelican/config/chopper/fermimot.tcl b/site_ansto/instrument/pelican/config/chopper/fermimot.tcl index 7036c031..3bd47189 100644 --- a/site_ansto/instrument/pelican/config/chopper/fermimot.tcl +++ b/site_ansto/instrument/pelican/config/chopper/fermimot.tcl @@ -2,7 +2,7 @@ # Speed (RPM) {veto {KpCW KpCCW} {KiCW KiCCW} {KthCW KthCCW} # NOTE: You can use the motor direction register value to lookup the gains because motdir=0 is CW and motdir=1 is CCW # TEST -global SCode Ecode +global SCode ECode fcRPM fcPHASE array set SCode { OKOK 1 HWIdle 2 @@ -21,6 +21,8 @@ array set ECode { MOTFAIL 0 MOTOK 1 } +set fcRPM 0 +set fcPHASE 1 proc handle_exception {status message args} { switch $status { @@ -575,6 +577,7 @@ namespace eval ::chopper { proc mkFSpeedMot {fmot hdbroot chnode addr lowlim uplim} { + clientput [info level 0] Motor $fmot tclmot [subst {\ getpos "::chopper::imot_SGetpos $hdbroot $chnode $addr"\ run "::chopper::imot_SRun $hdbroot $chnode $addr"\ @@ -607,6 +610,7 @@ proc mkFSpeedMot {fmot hdbroot chnode addr lowlim uplim} { } proc mkFPhaseMot {fmot hdbroot chnode addr lowlim uplim} { + clientput [info level 0] Motor $fmot tclmot [subst {\ getpos "::chopper::imot_PhGetPos $hdbroot $chnode $addr"\ run "::chopper::imot_PhRun $hdbroot $chnode $addr"\ @@ -671,3 +675,6 @@ proc mkFermiMotors { master maddr {slave "EMPTY"} {saddr "EMPTY"} } { } mkFermiMotors mch 2 sch 3 + +mchs mode $fcPHASE +schs mode $fcPHASE