From 3c916c9a7dd403bebc5a2246609bcbe4c225e446 Mon Sep 17 00:00:00 2001
From: cvs
Date: Thu, 25 Oct 2001 13:57:59 +0000
Subject: [PATCH] - Fixed a bug fix with Fixed motor in TAS code - Made AMOR
write HDF-5 data in chunks - Added driver for a PSI-DSP magnet controller as
used at SLS - Added code for directly accessing RS232 controllers connected
to a terminal server, thereby bypassing the SerPortServer - A rounding
problem in the PSD histogram memory was resolved.
---
Makefile | 16 +-
amor.dic | 7 +-
amortest.tcl | 5 +-
danu.dat | 2 +-
doc/manager/hwini.htm | 23 +-
doc/manager/managerman | 1 +
doc/manager/special.htm | 2 +
doc/user/samenv.htm | 36 ++
evcontroller.c | 17 +
histsim.c | 8 +-
hkl.c | 3 +-
napi.c | 302 ++++++++++-------
napi.h | 297 +++++++----------
network.c | 108 +++++-
network.h | 27 +-
nextrics.c | 378 ++++++++++++---------
nxamor.c | 177 ++++++++--
nxdict.c | 285 ++++------------
ofac.c | 3 +
rs232controller.c | 619 +++++++++++++++++++++++++++++++++++
rs232controller.h | 52 +++
rs232controller.w | 120 +++++++
scan.c | 2 +-
sicsstatus.tcl | 41 ++-
sinqhm/SinqHM_srv_filler.c | 31 +-
sinqhm/SinqHM_srv_routines.c | 3 -
sinqhmdriv.c | 30 +-
slsmagnet.c | 388 ++++++++++++++++++++++
tasdrive.c | 6 +
tasutil.c | 11 +-
test.tcl | 3 +
trics.dic | 2 +-
32 files changed, 2247 insertions(+), 758 deletions(-)
create mode 100644 rs232controller.c
create mode 100644 rs232controller.h
create mode 100644 rs232controller.w
create mode 100644 slsmagnet.c
diff --git a/Makefile b/Makefile
index a1870b52..8cd90ede 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@ SOBJ = network.o ifile.o conman.o SCinter.o splitter.o passwd.o \
macro.o ofac.o obpar.o obdes.o drive.o status.o intserv.o \
devexec.o mumo.o mumoconf.o selector.o selvar.o fupa.o lld.o \
lld_blob.o buffer.o strrepl.o ruli.o lin2ang.o fomerge.o\
- script.o o2t.o alias.o napi.o nxdata.o stringdict.o sdynar.o\
+ script.o o2t.o alias.o napi45.o nxdata.o stringdict.o sdynar.o\
histmem.o histdriv.o histsim.o sinqhmdriv.o interface.o callback.o \
event.o emon.o evcontroller.o evdriver.o simev.o perfmon.o \
danu.o itc4driv.o itc4.o nxdict.o nxsans.o varlog.o stptok.o nread.o \
@@ -48,7 +48,7 @@ SOBJ = network.o ifile.o conman.o SCinter.o splitter.o passwd.o \
circular.o el755driv.o maximize.o sicscron.o tecsdriv.o sanscook.o \
tasinit.o tasutil.o t_rlp.o t_conv.o d_sign.o d_mod.o \
tasdrive.o tasscan.o synchronize.o definealias.o swmotor.o t_update.o \
- hmcontrol.o userscan.o
+ hmcontrol.o userscan.o slsmagnet.o rs232controller.o
MOTOROBJ = motor.o el734driv.o simdriv.o el734dc.o pipiezo.o pimotor.o
COUNTEROBJ = countdriv.o simcter.o counter.o
@@ -62,14 +62,16 @@ VELOOBJ = velo.o velosim.o velodorn.o velodornier.o
#------------- for Digital Unix
BINTARGET=bin
-HDFROOT=/data/koenneck
+HDFROOT=/data/lnslib
CC=cc
EXTRA=
-CFLAGS = -I$(HDFROOT)/include -Ihardsup -I. -std1 -g -warnprotos -c
-#CFLAGS = -I$(HDFROOT)/include -DFORTIFY -Ihardsup -g -std1 -warnprotos -c
+CFLAGS = -I$(HDFROOT)/include -Ihardsup -DHDF4 -DHDF5 -I. -std1 \
+ -g -warnprotos -c
+#CFLAGS = -I$(HDFROOT)/include -DFORTIFY -DHDF4 -DHDF5 -Ihardsup -g \
+# -std1 -warnprotos -c
LIBS = -L$(HDFROOT)/lib -Lhardsup -lhlib -Lmatrix -lmatrix -Ltecs \
- -ltecsl -ltcl8.0 -lfor -lmfhdf -ldf $(HDFROOT)/lib/libjpeg.a \
- -lz -lm -ll -lc
+ -ltecsl -ltcl8.0 -lfor $(HDFROOT)/lib/libhdf5.a \
+ -lmfhdf -ldf $(HDFROOT)/lib/libjpeg.a -lz -lm -ll -lc
#------- for cygnus
#HDFROOT=../HDF411
diff --git a/amor.dic b/amor.dic
index e2a0c37d..4ca96224 100644
--- a/amor.dic
+++ b/amor.dic
@@ -15,6 +15,7 @@ timebin=512
detxsize=255
detysize=255
scanlength = 10
+chunk =
#---------- NXentry level
etitle=/entry1,NXentry/SDS title -type DFNT_CHAR -rank 1 -dim {132}
estart=/entry1,NXentry/SDS start_time -type DFNT_CHAR -rank 1 -dim {132}
@@ -181,10 +182,12 @@ dettime=/entry1,NXentry/reflectometer,NXinstrument/TOF,NXdetector/SDS time_binni
-attr {units,ms}
spinup=/entry1,NXentry/reflectometer,NXinstrument/TOF,NXdetector/SDS spinup \
-type DFNT_INT32 -rank 3 -dim {$(detxsize),$(detysize),$(timebin)} \
- -LZW -attr {signal,1}
+ -LZW $(chunk) -attr {signal,1}
+detchunk=/entry1,NXentry/reflectometer,NXinstrument/TOF,NXdetector/SDS \
+ chunksize -type DFNT_INT32 -rank 1 -dim {3}
spinup2d=/entry1,NXentry/reflectometer,NXinstrument/TOF,NXdetector/SDS spinup \
-type DFNT_INT32 -rank 2 -dim {$(detxsize),$(detysize)} \
- -LZW -attr {signal,1}
+ -LZW $(chunk) -attr {signal,1}
spindown=/entry1,NXentry/reflectometer,NXinstrument/TOF,NXdetector/SDS spindown \
-type DFNT_INT32 -rank 3 -dim {$(detxsize),$(detysize),$(timebin)} \
-LZW -attr {signal,1}
diff --git a/amortest.tcl b/amortest.tcl
index 82785625..d233208e 100644
--- a/amortest.tcl
+++ b/amortest.tcl
@@ -185,7 +185,8 @@ Motor COX SIM -100. 100. .1 2. # counter x
ClientPut "Motors initialized"
#======================== histogram memory
-MakeHM hm SinqHM
+#MakeHM hm SinqHM
+MakeHM hm SIM
hm configure HistMode PSD
hm configure OverFlowMode Ceil
hm configure Rank 1
@@ -203,7 +204,7 @@ hm configure HMComputer psds03.psi.ch
hm configure HMPort 2400
hm configure Counter counter
hm configure init 0
-hm genbin 0. 33 5
+hm genbin 0. 33 1024
hm init
ClientPut "Histogram Memory Initialized"
diff --git a/danu.dat b/danu.dat
index dbd081e4..265dcb48 100644
--- a/danu.dat
+++ b/danu.dat
@@ -1,3 +1,3 @@
- 24
+ 103
NEVER, EVER modify or delete this file
You'll risk eternal damnation and a reincarnation as a cockroach!|n
\ No newline at end of file
diff --git a/doc/manager/hwini.htm b/doc/manager/hwini.htm
index cb950bd0..08010e30 100644
--- a/doc/manager/hwini.htm
+++ b/doc/manager/hwini.htm
@@ -213,10 +213,31 @@ After this, the parameter can be modified by a command like:
drive vname newvalue
-
+
+RS232 Controller Direct Access
+
+RS232 controllers connected to a terminal server can be directly accessed
+by SICS through the TCP/IP network, bypassing the SerPortServer
+program. See the description of this facility
+for more details. Such a controller can be configured into the system
+through the command:
+
+MakeRS232Controller name terminalserver port
+
+For example:
+
+MakeRS232Controller hugo psts213 3004
+
+name is the SICS name for the controller, terminalserver is the name
+of the terminal server the device is connected to and port is the port
+number at which the terminal server publishes the RS232 channel to
+which the device is connected. This is usally the port number plus 3000.
+
+
To be expanded. Please note, that environment devices such as temperature
controllers are dynamically configured into the system at run time.
Therefore the necessary commands are described in the user documentation.
+