|
|
Experimental Physics and
| ||||||||||||||||
|
|
I have developped the Stream Device driver to talk to a lot of serial/GPIB/... devices. I also have a protocol file for the Danfysik 8000 PS. You probably need a driver interface for your serial board to Stream Device (Stream Device itself is hardware independent). Pete Owens from Diamond has written one. Look at www.delta.uni-dortmund.de/controls. Pete's tty driver is in the download area under unsupported. I have attached the protocol file and the template I used at DELTA. Try this as a starting point. Dirk. Gournay Jean-Francois wrote: Hello all,
# Danfysik Netzgeraet fuer Solenoiden
outTerminator = CR;
inTerminator = LF CR;
ReplyTimeout=2000;
ReadTimeout=500;
command { out "%s"; }
info { out "%s"; in "%39c"; }
reset { out "RS"; }
current { out "AD 8"; in "%d"; } # 1E-3 A
current.set { out "WA %05d"; } # 1E-3 A
current.rb { out "RA"; in "%d"; } # 1E-4 A
ExtraInput = ignore;
switch { out "S1"; in "%{!|.}"; }
switch.set { out "%{F|N}"; }
interlock.sum { in "%*9c%{.|!}"; }
interlock.overcurrent { in "%*10c%{.|!}"; }
interlock.overload { in "%*11c%{.|!}"; }
interlock.regmodule { in "%*12c%{.|!}"; }
interlock.preregul { in "%*13c%{.|!}"; }
interlock.phase { in "%*14c%{.|!}"; }
interlock.mpswater { in "%*15c%{.|!}"; }
interlock.earth { in "%*16c%{.|!}"; }
interlock.fuse { in "%*17c%{.|!}"; }
interlock.mpstemp { in "%*18c%{.|!}"; }
interlock.panicbutton { in "%*19c%{.|!}"; }
interlock.magnetwater { in "%*20c%{.|!}"; }
interlock.magnettemp { in "%*21c%{.|!}"; }
interlock.mpsready { in "%*22c%{!|.}"; }
# Macros: NAME BUS DESC SCAN_PERIOD
record (ai, "$(NAME)-i")
{
field (DESC, "$(DESC) current")
field (DTYP, "stream")
field (INP, "@Danfysik-8000 current $(BUS)")
field (SCAN, "$(SCAN_PERIOD)")
field (LINR, "LINEAR")
field (EGU, "A")
field (LOPR, "0")
field (HOPR, "99.999")
field (PREC, "3")
field (EGUF, "100")
field (EGUL, "0")
field (ESLO, "1e-3")
field (FLNK, "$(NAME)-i:comp")
field (PRIO, "HIGH")
}
record (ao, "$(NAME)-i:set")
{
field (DESC, "$(DESC) current")
field (DTYP, "stream")
field (OUT, "@Danfysik-8000 current.set $(BUS)")
field (LINR, "LINEAR")
field (EGU, "A")
field (LOPR, "0")
field (HOPR, "99.999")
field (PREC, "3")
field (DRVL, "0")
field (DRVH, "99.999")
field (EGUF, "100")
field (EGUL, "0")
field (ESLO, "1e-3")
}
record (ai, "$(NAME)-i:rb")
{
field (DESC, "$(DESC) current")
field (DTYP, "stream")
field (INP, "@Danfysik-8000 current.rb $(BUS)")
field (SCAN, "$(SCAN_PERIOD)")
field (LINR, "LINEAR")
field (EGU, "A")
field (LOPR, "0")
field (HOPR, "99.999")
field (PREC, "3")
field (EGUF, "100")
field (EGUL, "0")
field (ESLO, "1e-4")
field (PRIO, "HIGH")
}
record (bo, "$(NAME):reset") {
field (DESC, "$(DESC) reset")
field (DTYP, "stream")
field (OUT, "@Danfysik-8000 reset $(BUS)")
field (SEVR, "NO_ALARM")
}
record (bo, "$(NAME)-sw:set") {
field (DESC, "$(DESC) switch")
field (DTYP, "stream")
field (OUT, "@Danfysik-8000 switch.set $(BUS)")
field (ZNAM, "OFF")
field (ONAM, "ON")
}
record (bi, "$(NAME)-sw")
{
field (DESC, "$(DESC) switch")
field (SCAN, "$(SCAN_PERIOD)")
field (DTYP, "stream")
field (INP, "@Danfysik-8000 switch $(BUS)")
field (ZNAM, "OFF")
field (ONAM, "ON")
field (PRIO, "HIGH")
}
record (bi, "$(NAME)-ilock")
{
field (DESC, "$(DESC) switch")
field (SCAN, "I/O Intr")
field (DTYP, "stream")
field (INP, "@Danfysik-8000 interlock.sum $(BUS)")
field (ZNAM, "OK")
field (ONAM, "ERROR")
field (PRIO, "HIGH")
}
record (bi, "$(NAME)-ilock-water")
{
field (DESC, "$(DESC) switch")
field (SCAN, "I/O Intr")
field (DTYP, "stream")
field (INP, "@Danfysik-8000 interlock.magnetwater $(BUS)")
field (ZNAM, "OK")
field (ONAM, "ERROR")
field (PRIO, "HIGH")
}
record (bi, "$(NAME)-ilock-fuse")
{
field (DESC, "$(DESC) switch")
field (SCAN, "I/O Intr")
field (DTYP, "stream")
field (INP, "@Danfysik-8000 interlock.fuse $(BUS)")
field (ZNAM, "OK")
field (ONAM, "ERROR")
field (PRIO, "HIGH")
}
record (bi, "$(NAME)-ilock-earth")
{
field (DESC, "$(DESC) switch")
field (SCAN, "I/O Intr")
field (DTYP, "stream")
field (INP, "@Danfysik-8000 interlock.earth $(BUS)")
field (ZNAM, "OK")
field (ONAM, "ERROR")
field (PRIO, "HIGH")
}
record (bi, "$(NAME)-ilock-overload")
{
field (DESC, "$(DESC) switch")
field (SCAN, "I/O Intr")
field (DTYP, "stream")
field (INP, "@Danfysik-8000 interlock.overload $(BUS)")
field (ZNAM, "OK")
field (ONAM, "ERROR")
field (PRIO, "HIGH")
}
record (bi, "$(NAME)-ilock-temp")
{
field (DESC, "$(DESC) switch")
field (SCAN, "I/O Intr")
field (DTYP, "stream")
field (INP, "@Danfysik-8000 interlock.magnettemp $(BUS)")
field (ZNAM, "OK")
field (ONAM, "ERROR")
field (PRIO, "HIGH")
}
record (bi, "$(NAME)-ilock-ready")
{
field (DESC, "$(DESC) switch")
field (SCAN, "I/O Intr")
field (DTYP, "stream")
field (INP, "@Danfysik-8000 interlock.mpsready $(BUS)")
field (ZNAM, "NO")
field (ONAM, "YES")
field (PRIO, "HIGH")
}
# status records
record (ao, "$(NAME)-i:setup") {
field (EGU, "A")
}
record (calc, "$(NAME)-setup:comp")
{
field (DESC, "compare value and setup")
field (INPA, "$(NAME)-i")
field (INPB, "$(NAME)-i:setup")
# Max. allowed absolute and relative setup<->read difference
field (INPC, "0.2")
field (INPD, "0.01")
field (CALC, "ABS(A-B)<C || ABS(A-B)/(ABS(A)+0.001)<D")
field (LOW, "0" )
field (LSV, "MAJOR")
}
record (calc, "$(NAME)-i:comp")
{
field (DESC, "$(DESC) compare")
field (INPA, "$(NAME)-i")
field (INPB, "$(NAME)-i:set")
# Max. allowed absolute and relative set<->read difference
field (INPC, "0.2")
field (INPD, "0.01")
field (CALC, "ABS(A-B)<C || ABS(A-B)/(ABS(A)+0.001)<D")
field (LOW, "0" )
field (LSV, "MAJOR")
}
#initialization
record (ai, "$(NAME)-i:init")
{
field (DESC, "$(DESC) current")
field (DTYP, "stream")
field (INP, "@Danfysik-8000 current.rb $(BUS)")
field (PINI, "YES")
field (LINR, "LINEAR")
field (EGU, "A")
field (LOPR, "0")
field (HOPR, "99.999")
field (PREC, "3")
field (EGUF, "100")
field (EGUL, "0")
field (ESLO, "1e-4")
field (PRIO, "HIGH")
field (FLNK, "$(NAME)-i:copy")
}
record (ao, "$(NAME)-i:copy")
{
field (DESC, "$(DESC) current")
field (DOL, "$(NAME)-i:init MS")
field (OUT, "$(NAME)-i:set PP")
field (OMSL, "closed_loop")
field (IVOA, "Don't drive outputs")
field (EGU, "A")
field (HOPR, "99.999")
field (PREC, "3")
field (FLNK, "$(NAME)-sw:init")
}
record (bi, "$(NAME)-sw:init")
{
field (DESC, "$(DESC) switch")
field (DTYP, "stream")
field (INP, "@Danfysik-8000 switch $(BUS)")
field (ZNAM, "OFF")
field (ONAM, "ON")
field (PRIO, "HIGH")
field (FLNK, "$(NAME)-sw:copy")
}
record (bo, "$(NAME)-sw:copy")
{
field (DESC, "$(DESC) switch")
field (DOL, "$(NAME)-sw:init MS")
field (OUT, "$(NAME)-sw:set PP")
field (OMSL, "closed_loop")
field (IVOA, "Don't drive outputs")
field (ZNAM, "OFF")
field (ONAM, "ON")
}
# debug records
record (stringout, "$(NAME):command") {
field (DESC, "- $(DESC) debug -")
field (DTYP, "stream")
field (OUT, "@Danfysik-8000 command $(BUS)")
}
record (stringout, "$(NAME):info") {
field (DESC, "- $(DESC) debug -")
field (DTYP, "stream")
field (OUT, "@Danfysik-8000 info $(BUS)")
}
| ||||||||||||||||
| ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Talk
·
Base
·
Modules
·
Extensions
·
· Distributions · Download · Documents · Links · Licensing · |