oscillate.c SICS-232
You can now run the oscillating collimator for a specified number of cycles. A MOTEND event is now sent when the oscillator stops. Also temporarily set status to eEager to allow changing the motor accesscode parameter while something else is running, (eg a counter) motor.c finishDriving is no longer static so we can call it from the oscilator and generate a MOTEND event. west4100.c Return 'success' from wrapper on "controlsensor" and "sensorlist" queries so we can test and capture their values in scripts. Makefile Compile the quokka beamstopaction object site_ansto.c Add the MakeActionObject command. Currently only makes the hardcoded beamstopaction object obpar.c Report object name and parameter on an illegal attempt to set a parameter hmm_configuration_common_1.tcl Add oscillating collimator control flag for Wombat. If true we use hmm to start the histogram server instead of hmc. TODO remove hmc and always use hmm. hipd/config/motors/motor_configuration.tcl Don't load anticollider config twice. Fix oct limits wombat_configuration.tcl Environment configuration must be loaded before running server_init. hrpd/config/hmm/hmm_configuration.tcl Fix default time-bin to match 10Hz frame frequency hrpd/config/motors/motor_configuration.tcl Added dummy motor for testing. reflectometer/config/hmm/detector.tcl Fill in dhv1 configuration parameters. sans/config/hmm/detector.tcl Enable detector voltage control sans/config/hmm/hmm_configuration.tcl SICS-227 set default resolution to 192x192 sans/config/motors/motor_configuration.tcl Added dummy motor for testing quokka parameters.tcl Fix L2mm calculation, Fix SICS-228 users cannot set rotapdeg beamstopaction.[ch] NEW: Implements an action command to drive the quokka beamstops up and down. r2670 | ffr | 2008-08-07 13:17:29 +1000 (Thu, 07 Aug 2008) | 53 lines
This commit is contained in:
committed by
Douglas Clowes
parent
dd984f6327
commit
d7cea6914c
2
motor.c
2
motor.c
@@ -251,7 +251,7 @@ static int checkPosition(pMotor self, SConnection *pCon)
|
||||
return HWIdle;
|
||||
}
|
||||
/*--------------------------------------------------------------------*/
|
||||
static void finishDriving(pMotor self, SConnection *pCon)
|
||||
void finishDriving(pMotor self, SConnection *pCon)
|
||||
{
|
||||
MotCallback sCall;
|
||||
MotorGetSoftPosition(self,pCon,&sCall.fVal);
|
||||
|
||||
2
motor.h
2
motor.h
@@ -69,5 +69,7 @@ typedef struct {
|
||||
int argc, char *argv[]);
|
||||
pMotor FindMotor(SicsInterp *pSics, char *name);
|
||||
|
||||
/* Made available to oscillate.c to generate MOTEND event. Ferdi */
|
||||
void finishDriving(pMotor self, SConnection *pCon);
|
||||
#endif
|
||||
|
||||
|
||||
2
obpar.c
2
obpar.c
@@ -184,7 +184,7 @@
|
||||
eStat = GetStatus();
|
||||
if(!((eStat == eEager) || (eStat == eBatch)) )
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: Cannot change parameter while running");
|
||||
sprintf(pBueffel,"ERROR: Cannot change %s.%s parameter while running", obname, name);
|
||||
SCWrite(pCon, pBueffel,eError);
|
||||
return 0;
|
||||
}
|
||||
|
||||
26
oscillate.c
26
oscillate.c
@@ -13,18 +13,24 @@
|
||||
#include "task.h"
|
||||
#include "commandlog.h"
|
||||
#include "oscillate.h"
|
||||
#include "status.h"
|
||||
|
||||
#define ABS(x) (x < 0 ? -(x) : (x))
|
||||
|
||||
/*================== real work =========================================*/
|
||||
static void StopOscillation(pOscillator self){
|
||||
int savedStatus;
|
||||
|
||||
assert(self != NULL);
|
||||
if(self->taskID > 0){
|
||||
self->pMot->pDriver->Halt(self->pMot->pDriver);
|
||||
self->stopFlag = 1;
|
||||
self->taskID = -1;
|
||||
}
|
||||
savedStatus = GetStatus(); /* fool status check in ObParSet (avoid "Cannot change parameter while running" message */
|
||||
SetStatus(eEager);
|
||||
MotorSetPar(self->pMot,self->pCon,"accesscode",usUser);
|
||||
SetStatus(savedStatus);
|
||||
if(self->debug > 0){
|
||||
WriteToCommandLog("oscillator>> ","Stopping");
|
||||
}
|
||||
@@ -61,6 +67,7 @@ static int OscillationTask(void *data){
|
||||
|
||||
assert(self);
|
||||
if(self->stopFlag == 1){
|
||||
finishDriving(self->pMot, self->pCon);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -96,10 +103,16 @@ static int OscillationTask(void *data){
|
||||
case HWBusy:
|
||||
break;
|
||||
case HWIdle:
|
||||
if (self->cycles > 0 && self->currcycle == self->cycles) {
|
||||
StopOscillation(self);
|
||||
return 1;
|
||||
}
|
||||
pos = getNextPos(self);
|
||||
status = MotorRun(self->pMot,self->pCon,pos);
|
||||
if(status == OKOK){
|
||||
self->pMot->pDrivInt->iErrorCount = 0;
|
||||
if (self->cycles > 0)
|
||||
(self->currcycle)++;
|
||||
}
|
||||
if(self->debug > 0){
|
||||
snprintf(message,131,"Started oscillation to %f, ret code = %d",
|
||||
@@ -112,7 +125,7 @@ static int OscillationTask(void *data){
|
||||
/*--------------------------------------------------------------------*/
|
||||
static int StartOscillation(pOscillator self, SConnection *pCon){
|
||||
float fval;
|
||||
int status;
|
||||
int status, savedStatus;
|
||||
char error[80], pBueffel[255];
|
||||
|
||||
assert(self);
|
||||
@@ -128,7 +141,10 @@ static int StartOscillation(pOscillator self, SConnection *pCon){
|
||||
self->lowerLimit += .5;
|
||||
MotorGetPar(self->pMot,"softupperlim",&self->upperLimit);
|
||||
self->upperLimit -= .5;
|
||||
savedStatus = GetStatus(); /* fool status check in ObParSet (avoid "Cannot change parameter while running" message */
|
||||
SetStatus(eEager);
|
||||
MotorSetPar(self->pMot,self->pCon,"accesscode",(float)usInternal);
|
||||
SetStatus(savedStatus);
|
||||
self->nextTargetFlag = 0;
|
||||
self->errorCount = 0;
|
||||
self->stopFlag = 0;
|
||||
@@ -208,6 +224,8 @@ int MakeOscillator(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
memset(pNew,0,sizeof(Oscillator));
|
||||
pNew->pDes = CreateDescriptor("Oscillator");
|
||||
pNew->pMot = pMot;
|
||||
pNew->cycles = 0;
|
||||
pNew->currcycle = 0;
|
||||
pNew->pCon = SCCreateDummyConnection(pSics);
|
||||
if(!pNew->pDes || !pNew->pCon){
|
||||
SCWrite(pCon,"ERROR: out of memory creating oscillator",eError);
|
||||
@@ -244,6 +262,12 @@ int OscillatorWrapper(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
}
|
||||
|
||||
strtolower(argv[1]);
|
||||
if (argc == 3) {
|
||||
self->cycles = 2 * atoi(argv[2]);
|
||||
} else {
|
||||
self->cycles = 0;
|
||||
}
|
||||
self->currcycle=0;
|
||||
if(strcmp(argv[1],"start") == 0){
|
||||
return StartOscillation(self,pCon);
|
||||
} else if(strcmp(argv[1],"stop") == 0) {
|
||||
|
||||
@@ -23,6 +23,8 @@ typedef struct {
|
||||
SConnection *pCon;
|
||||
int errorCount;
|
||||
int debug;
|
||||
int cycles;
|
||||
int currcycle;
|
||||
} Oscillator, *pOscillator;
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
|
||||
@@ -90,7 +90,8 @@ OBJ= site_ansto.o anstoutil.o\
|
||||
../psi/tcpdornier.o \
|
||||
anstohttp.o \
|
||||
hmcontrol_ansto.o\
|
||||
lssmonitor.o
|
||||
lssmonitor.o \
|
||||
beamstopaction.o
|
||||
|
||||
all: ../matrix/libmatrix.a $(COREOBJ:%=../%) $(EXTRA:%=../%) libansto.a libhardsup
|
||||
$(CC) -g -o SICServer $(COREOBJ:%=../%) $(EXTRA:%=../%) $(SUBLIBS) $(PSI_SLIBS:%=../%) $(PSI_LIBS) $(GHTTP_LIBS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# $Revision: 1.36 $
|
||||
# $Date: 2008-07-14 05:15:58 $
|
||||
# $Revision: 1.37 $
|
||||
# $Date: 2008-08-07 03:17:28 $
|
||||
# Author: Ferdi Franceschini
|
||||
# Based on the examples in the hs_test.tcl sample configuration by Mark Lesha.
|
||||
# http://gumtree.ansto.gov.au:9080/nbicms/bragg-systems/histogram-server/hs_test.tcl/view
|
||||
@@ -20,6 +20,10 @@ namespace eval histogram_memory {
|
||||
variable ic_count_methods
|
||||
variable preset_mult
|
||||
variable monitor_controlled
|
||||
variable oscmd_controlled
|
||||
|
||||
set monitor_controlled "false"
|
||||
set oscmd_controlled "false"
|
||||
|
||||
# Instrument Specific Config variables
|
||||
|
||||
@@ -1660,6 +1664,7 @@ proc ::histogram_memory::post_count {} {}
|
||||
proc ::histogram_memory::start {{blocking "noblock"}} {
|
||||
variable histmem_simulation
|
||||
variable monitor_controlled
|
||||
variable oscmd_controlled
|
||||
|
||||
if [ catch {
|
||||
set options [list block noblock]
|
||||
@@ -1673,8 +1678,12 @@ proc ::histogram_memory::post_count {} {}
|
||||
} else {
|
||||
bm setmode timer
|
||||
bm setpreset 32000000
|
||||
if {$oscmd_controlled == "true"} {
|
||||
hmm count
|
||||
} else {
|
||||
hmc start 1000000000 timer pause 1
|
||||
}
|
||||
}
|
||||
set reply [SplitReply [hmm configure daq]]
|
||||
if {$histmem_simulation==false && $reply != "Started"} {
|
||||
error "ERROR: Histogram server failed to start"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
# 2008/05/16 05:25:24
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
# Last revision by: ffr
|
||||
source $cfPath(anticollider)/anticollider.tcl
|
||||
|
||||
# START MOTOR CONFIGURATION
|
||||
|
||||
@@ -389,7 +388,7 @@ Motor oct $motor_driver_type [params \
|
||||
axis G\
|
||||
units degrees\
|
||||
hardlowerlim -2\
|
||||
hardupperlim 6\
|
||||
hardupperlim 2\
|
||||
maxSpeed 0.5\
|
||||
maxAccel 0.1\
|
||||
maxDecel 0.1\
|
||||
@@ -398,7 +397,7 @@ Motor oct $motor_driver_type [params \
|
||||
absEncHome $oct_Home\
|
||||
cntsPerX -465]
|
||||
oct softlowerlim -2
|
||||
oct softupperlim 6
|
||||
oct softupperlim 2
|
||||
oct home 0
|
||||
oct speed 0.5
|
||||
oct precision 0.01
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# $Revision: 1.24 $
|
||||
# $Date: 2008-07-18 04:33:39 $
|
||||
# $Revision: 1.25 $
|
||||
# $Date: 2008-08-07 03:17:28 $
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
# Last revision by: $Author: ffr $
|
||||
|
||||
@@ -43,9 +43,8 @@ restore
|
||||
|
||||
catch {
|
||||
::anticollider::init
|
||||
# ::environment::temperature::add_ls340
|
||||
server_init
|
||||
#::environment::temperature::add_ls340
|
||||
|
||||
|
||||
if [file exists ../extraconfig.tcl] {
|
||||
fileeval ../extraconfig.tcl
|
||||
|
||||
@@ -13,7 +13,7 @@ proc ::histogram_memory::init_OAT_TABLE {} {
|
||||
OAT_TABLE Y -setdata BMIN -0.5
|
||||
OAT_TABLE Y -setdata BMAX 511.5
|
||||
|
||||
OAT_TABLE -set X { 127.5 126.5 } NXC 128 Y { -0.5 3.5 } NYC 128 T { 0 20000 } NTC 1
|
||||
OAT_TABLE -set X { 127.5 126.5 } NXC 128 Y { -0.5 3.5 } NYC 128 T { 0 100000 } NTC 1
|
||||
} message ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error $message
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# $Revision: 1.28 $
|
||||
# $Date: 2008-06-05 06:24:32 $
|
||||
# $Revision: 1.29 $
|
||||
# $Date: 2008-08-07 03:17:28 $
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
# Last revision by: $Author: dcl $
|
||||
# Last revision by: $Author: ffr $
|
||||
source $cfPath(anticollider)/anticollider.tcl
|
||||
|
||||
# START MOTOR CONFIGURATION
|
||||
@@ -114,6 +114,27 @@ set move_count 10
|
||||
#:TP at HOME
|
||||
#
|
||||
|
||||
# Dummy Sample Omega, rotate, useful for testing scans
|
||||
Motor dummy_motor asim [params \
|
||||
asyncqueue mc2\
|
||||
axis E\
|
||||
units degrees\
|
||||
hardlowerlim -169\
|
||||
hardupperlim 167\
|
||||
maxSpeed 4\
|
||||
maxAccel 1\
|
||||
maxDecel 1\
|
||||
stepsPerX 12500\
|
||||
absEnc 1\
|
||||
absEncHome $som_Home\
|
||||
cntsPerX 4096]
|
||||
setHomeandRange -motor dummy_motor -home 0 -lowrange 169 -uprange 167
|
||||
dummy_motor speed 1
|
||||
dummy_motor movecount $move_count
|
||||
dummy_motor precision 0.01
|
||||
dummy_motor part sample
|
||||
dummy_motor long_name dummy_motor
|
||||
|
||||
# Monochromator phi, Tilt 1, upper
|
||||
Motor mphi $motor_driver_type [params \
|
||||
asyncqueue mc1\
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# $Revision: 1.31 $
|
||||
# $Date: 2008-07-18 04:33:39 $
|
||||
# $Revision: 1.32 $
|
||||
# $Date: 2008-08-07 03:17:28 $
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
# Last revision by: $Author: ffr $
|
||||
|
||||
@@ -40,8 +40,8 @@ source gumxml.tcl
|
||||
# AN ERROR IF THERE IS NO ../log/status.tcl FILE.
|
||||
restore
|
||||
catch {
|
||||
# ::environment::temperature::add_ls340
|
||||
server_init
|
||||
#::environment::temperature::add_ls340
|
||||
|
||||
if [file exists ../extraconfig.tcl] {
|
||||
fileeval ../extraconfig.tcl
|
||||
|
||||
@@ -5,14 +5,16 @@ set sim_mode [SplitReply [detector_simulation]]
|
||||
if {$::sim_mode == "true"} {
|
||||
EvFactory new dhv1 sim
|
||||
} else {
|
||||
clientput "Detector Voltage control not yet available"
|
||||
# makeasyncqueue acq NHQ200 xxxxxxxxxxxxxx yyyy
|
||||
# evfactory new dhv1 nhqvps acq
|
||||
# dhv1 lowerlimit xxx
|
||||
# dhv1 upperlimit xxx
|
||||
# dhv1 tolerance xxx
|
||||
# dhv1 max xxx
|
||||
# dhv1 rate xxx
|
||||
# dhv1 lock
|
||||
# clientput "Detector Voltage control not yet available"
|
||||
makeasyncqueue acq NHQ200 137.157.202.151 4001
|
||||
evfactory new dhv1 nhq200 acq 1
|
||||
dhv1 tolerance 5
|
||||
dhv1 rate 25
|
||||
dhv1 upper 3350
|
||||
#dhv1 lock
|
||||
evfactory new dhv2 nhq200 acq 2
|
||||
dhv2 tolerance 5
|
||||
dhv2 rate 25
|
||||
dhv2 upper 1500
|
||||
#dhv2 lock
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,6 @@ if {$::sim_mode == "true"} {
|
||||
dhv1 tolerance 19
|
||||
dhv1 max 2400
|
||||
dhv1 rate 10
|
||||
dhv1 lock
|
||||
# dhv1 lock
|
||||
}
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@ proc ::histogram_memory::init_OAT_TABLE {} {
|
||||
if [ catch {
|
||||
# We don't need a MAX_CHAN parameter for time because the time channel
|
||||
# is scaled by calling the ::histogram_memory::clock_scale function
|
||||
OAT_TABLE X -setdata MAX_CHAN 128
|
||||
OAT_TABLE Y -setdata MAX_CHAN 128
|
||||
OAT_TABLE X -setdata MAX_CHAN 192
|
||||
OAT_TABLE Y -setdata MAX_CHAN 192
|
||||
OAT_TABLE X -setdata BMIN -0.5
|
||||
OAT_TABLE X -setdata BMAX 127.5
|
||||
OAT_TABLE X -setdata BMAX 191.5
|
||||
OAT_TABLE Y -setdata BMIN -0.5
|
||||
OAT_TABLE Y -setdata BMAX 127.5
|
||||
OAT_TABLE Y -setdata BMAX 191.5
|
||||
|
||||
OAT_TABLE -set X { 127.5 126.5 } NXC 128 Y { -0.5 0.5 } NYC 127 T { 0 20000 } NTC 1
|
||||
OAT_TABLE -set X { 191.5 190.5 } NXC 192 Y { -0.5 0.5 } NYC 192 T { 0 20000 } NTC 1
|
||||
} message ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error $message
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# $Revision: 1.20 $
|
||||
# $Date: 2008-07-18 02:39:35 $
|
||||
# $Revision: 1.21 $
|
||||
# $Date: 2008-08-07 03:17:28 $
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
# Last revision by: $Author: ffr $
|
||||
|
||||
@@ -200,6 +200,29 @@ set move_count 100
|
||||
#:TP at HOME
|
||||
#
|
||||
|
||||
# Dummy translation motor, useful for testing scans
|
||||
Motor dummy_motor asim [params \
|
||||
asyncqueue mc1\
|
||||
host mc1-quokka\
|
||||
port pmc1-quokka\
|
||||
axis C\
|
||||
units mm\
|
||||
hardlowerlim -500\
|
||||
hardupperlim 500\
|
||||
maxSpeed 1\
|
||||
maxAccel 5\
|
||||
maxDecel 5\
|
||||
stepsPerX [expr 25000.0/5.0]\
|
||||
absEnc 1\
|
||||
absEncHome $samx_Home\
|
||||
cntsPerX [expr 8192.0/5.0]]
|
||||
dummy_motor part instrument
|
||||
dummy_motor long_name dummy_motor
|
||||
dummy_motor softlowerlim -500
|
||||
dummy_motor softupperlim 500
|
||||
dummy_motor home 0
|
||||
|
||||
|
||||
# Sample tilt along beam [-20,+20] degrees
|
||||
Motor samchi $motor_driver_type [params \
|
||||
asyncqueue mc1\
|
||||
|
||||
@@ -105,7 +105,7 @@ sicslist setatt L1mm depends EndFacePosYmm,SApPosYmm,EApPosYmm
|
||||
set detpy [SplitReply [DetPosYmm]]
|
||||
set detpyos [SplitReply [DetPosYOffsetmm]]
|
||||
set sapy [SplitReply [SamplePosYmm]]
|
||||
return [sicsmsgfmt [expr {$detpyos + $detpyos - $sapy}]]
|
||||
return [sicsmsgfmt [expr {$detpy + $detpyos - $sapy}]]
|
||||
}
|
||||
sicslist setatt L2mm long_name L2mm
|
||||
sicslist setatt L2mm klass derived_parameter
|
||||
@@ -159,7 +159,7 @@ foreach {pname motor units} {
|
||||
sicslist setatt $pname klass derived_parameter
|
||||
# sicslist setatt $pname depends $motor
|
||||
# TODO SICS-198 add feedback support to getset macro generator
|
||||
VarMake ${pname}_status text mugger
|
||||
VarMake ${pname}_status text user
|
||||
${pname}_status "IDLE"
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ foreach {pname motor units} {
|
||||
sicslist setatt $pname klass derived_parameter
|
||||
# sicslist setatt $pname depends $motor
|
||||
# TODO SICS-198 add feedback support to getset macro generator
|
||||
VarMake ${pname}_status text mugger
|
||||
VarMake ${pname}_status text user
|
||||
${pname}_status "IDLE"
|
||||
}
|
||||
################################################################################
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include "safetyplc.h"
|
||||
#include "lssmonitor.h"
|
||||
#include "beamstopaction.h"
|
||||
|
||||
/*@observer@*//*@null@*/ pCounterDriver CreateMonCounter(/*@observer@*/SConnection *pCon, /*@observer@*/char *name, char *params);
|
||||
|
||||
@@ -81,6 +82,7 @@ static void AddCommands(SicsInterp *pInter)
|
||||
AddCommand(pInter,"MakeMultiChan",AsyncQueueFactory,NULL,NULL);
|
||||
AddCommand(pInter,"MakeSafetyPLC",SafetyPLCFactory,NULL,NULL);
|
||||
AddCommand(pInter,"MakeLSSMonitor",LSSFactory,NULL,NULL);
|
||||
AddCommand(pInter,"MakeActionObject",ActionObjectFactory,NULL,NULL);
|
||||
}
|
||||
/*---------------------------------------------------------------------*/
|
||||
static void RemoveCommands(SicsInterp *pSics){
|
||||
|
||||
@@ -241,38 +241,38 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
|
||||
iRet = EVCList(self,pCon);
|
||||
|
||||
sprintf(pBueffel,"%s.NumSensors = %d\n",self->pName,1);
|
||||
sprintf(pBueffel,"%s.NumSensors = %d",self->pName,1);
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
sprintf(pBueffel,"%s.ControlSensor = %s\n",self->pName,"SensorA");
|
||||
sprintf(pBueffel,"%s.ControlSensor = %s",self->pName,"SensorA");
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
|
||||
sprintf(pBueffel,"%s.ModbusAddress = %d\n",self->pName,GetAddressWEST4100(self->pDriv));
|
||||
sprintf(pBueffel,"%s.ModbusAddress = %d",self->pName,GetAddressWEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
sprintf(pBueffel,"%s.TransactionNumber = %d\n",self->pName,GetTransactWEST4100(self->pDriv));
|
||||
sprintf(pBueffel,"%s.TransactionNumber = %d",self->pName,GetTransactWEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
sprintf(pBueffel,"%s.ProcessValue = %d\n",self->pName,GetProcessValueWEST4100(self->pDriv));
|
||||
sprintf(pBueffel,"%s.ProcessValue = %d",self->pName,GetProcessValueWEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
sprintf(pBueffel,"%s.Setpoint = %d\n",self->pName,GetSetpointWEST4100(self->pDriv));
|
||||
sprintf(pBueffel,"%s.Setpoint = %d",self->pName,GetSetpointWEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
sprintf(pBueffel,"%s.WorkingSetpoint = %d\n",self->pName,GetWorkingSetpointWEST4100(self->pDriv));
|
||||
sprintf(pBueffel,"%s.WorkingSetpoint = %d",self->pName,GetWorkingSetpointWEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
sprintf(pBueffel,"%s.Alarm1 = %d\n",self->pName,GetAlarm1WEST4100(self->pDriv));
|
||||
sprintf(pBueffel,"%s.Alarm1 = %d",self->pName,GetAlarm1WEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
sprintf(pBueffel,"%s.Alarm2 = %d\n",self->pName,GetAlarm2WEST4100(self->pDriv));
|
||||
sprintf(pBueffel,"%s.Alarm2 = %d",self->pName,GetAlarm2WEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
sprintf(pBueffel,"%s.PowerLimit = %d\n",self->pName,GetPowerLimitWEST4100(self->pDriv));
|
||||
sprintf(pBueffel,"%s.PowerLimit = %d",self->pName,GetPowerLimitWEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
sprintf(pBueffel,"%s.RampRate = %d\n",self->pName,GetRampRateWEST4100(self->pDriv));
|
||||
sprintf(pBueffel,"%s.RampRate = %d",self->pName,GetRampRateWEST4100(self->pDriv));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
|
||||
return iRet;
|
||||
@@ -300,8 +300,9 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
// Set or Get
|
||||
strtolower(argv[1]);
|
||||
if( (strcmp(argv[1],"controlsensor") == 0) || (strcmp(argv[1],"sensorlist") == 0)){
|
||||
sprintf(pBueffel,"%s.%s = %s\n",self->pName,argv[1],"sensorA");
|
||||
sprintf(pBueffel,"%s.%s = %s",self->pName,argv[1],"sensorA");
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
return 1;
|
||||
}
|
||||
else if((strcmp(argv[1],"setpoint") == 0) || (strcmp(argv[1],"alarm1") == 0)
|
||||
|| (strcmp(argv[1],"powerlimit") == 0) || (strcmp(argv[1],"alarm2") == 0)
|
||||
@@ -322,7 +323,7 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
else /* get case */
|
||||
{
|
||||
iRet = WEST4100GetPar(self,argv[1],&fVal);
|
||||
sprintf(pBueffel,"%s.%s = %f\n",self->pName,argv[1],fVal);
|
||||
sprintf(pBueffel,"%s.%s = %f",self->pName,argv[1],fVal);
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
return 1;
|
||||
}
|
||||
@@ -337,7 +338,7 @@ int GetWorkingSetpointWEST4100(pEVDriver self);
|
||||
else /* get case */
|
||||
{
|
||||
iRet = WEST4100Query(self->pDriv,atoi(argv[2]),&fValue);
|
||||
sprintf(pBueffel,"%s.%s %s = %d\n",self->pName,argv[1],argv[2],fValue);
|
||||
sprintf(pBueffel,"%s.%s %s = %d",self->pName,argv[1],argv[2],fValue);
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user