Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017 Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
<== Date ==> <== Thread ==>

Subject: Stream device question
From: "Luchini, Kristi L." <luchini@slac.stanford.edu>
To: "'tech-talk@aps.anl.gov'" <tech-talk@aps.anl.gov>
Date: Mon, 6 Mar 2017 22:09:01 +0000
Hello,

I have an hpi 6032 Digital Area Monitor, which only provides 1-way communication. The device sends out a packet of ata
Every second that should look like this:

                      000001 0064 0000 0032 00 00
The data from left to right is read as 6-groups of hex digits.
The profile looks as follows:

Terminator  = CR LF;
RReadTimeout = 200;
ReplyTimeout = 800;
PollPeriod = 800;

read {
  in                                                                   # only 1-way communication
  "%(A)x"                                                       # gamma dose rate
  "%(\$1GammaTripLevel.A)x"            # high trip level
  "%(\$1GammaTripLowLevel.A)x"    # low trip level
  "%(\$1GammaFailCounter.A)x"        # fail count down
  "%(\$1GammaDoseStatus.A)x"         # status byte
  "%(\$1GammaHVStatus.A)x";           # second status byte
}
The first data (left most hex digit) I can read, the others pvs' don't process.  I copied a profile from elsewhere that used this device, and the read was setup the same
With the exception only the 1st 3rd and 6th data elements were read (from left to right), so a "%*x" was used to skip those data points.  However, the file was for a different model
And still only the 1st data point was processed in the db. I have been able to read the 1st and 2nd data points, but the rest won't follow, so I must be doing something wrong in the db or the profile. 

I  know the device is working because if I connect up a serial port to my laptop and view the data, it looks fine.    Are there any suggestions as I am fairly new to using stream device.

Regards,
  Kristi

record(calcout, "$(BL)GammaAct"){ 
  field(DESC, "gamma dose rate")
  field(DTYP, "stream")
# SDIS is for alarm propogation only
  field(SDIS, "$(BL)GammaCommLink CP MS")
  field(OUT,  "@gamma.proto read($(BL)) $(PORT)")
  field(SCAN, "I/O Intr")
# .A-.F is filled in by gamma.proto
  field(CALC, "A<8388608 ? 0.01*A : 0.01*(8388608-A)")
  field(EGU,  "mR/hr")
  field(PREC, "2")
  field(FLNK, "$(BL)GammaActSec")
}
record(calcout, "$(BL)GammaTripLevel"){ 
  field(DESC, "high trip level")
# SDIS is for alarm propogation only
  field(SDIS, "$(BL)GammaCommLink CP MS")
# .A is filled in by gamma.proto
  field(CALC, "0.01*A")
  field(EGU,  "mR/hr")
  field(HIGH, "10.0")
  field(HSV,  "MAJOR")
  field(PREC, "2")
}
record(calcout, "$(BL)GammaTripLowLevel"){ 
  field(DESC, "low trip level ")
  field(OUT,  "@gamma.proto readTripLL($(BL)) $(PORT)")
# SDIS is for alarm propogation only
  field(SDIS, "$(BL)GammaCommLink CP MS")
  field(CALC, "(0.01*A)-B")
# .A is filled in by gamma.proto
  field(INPB, "$(BL)GammaOffset") 
  field(EGU,  "mR/hr")
}
record(calcout,"$(BL)GammaFailCounter") {
  field(DESC, "Fail Counter")
# SDIS is for alarm propogation only
  field(SDIS, "$(BL)GammaCommLink CP MS")
# .A is filled in by gamma.proto
  field(CALC, "A")
  field(EGU,  "sec")
}
record(calcout, "$(BL)GammaDoseStatus"){ 
  field(DESC, "gamma dose fail status")
# SDIS is for alarm propogation only
  field(SDIS, "$(BL)GammaCommLink CP MS")
# .A is filled in by gamma.proto
  field(CALC, "A&2?1:0")
  field(HIHI, "0.5")
  field(HHSV, "MAJOR")
  field(FLNK, "$(BL)GammaTripCalc") 
}
record(calcout, "$(BL)GammaHVStatus"){
  field(DESC, "gamma HV fail status")
# SDIS is for alarm propogation only
  field(SDIS, "$(BL)GammaCheckIO CP MS")
# .A is filled in by gamma.proto
  field(CALC, "A&1?1:0")
  field(FLNK,  "$(BL)GammaGammaAlarmSeverity")
}

I've also tried setting each record with SCAN Intr I/O and the  OUT field the command in the profile and only the readRate works, which is the first hex ditgit, the others pvs never process.
readRate     { in "%(A)x %*x %*x %*x %*x %*x"; }
readTrip     { in "%*x %(A)x %*x %*x %*x %*x"; }
readTripLL   { in "%*x %*x %(A)x %*x %*x %*x"; }
readFailCnt  { in "%*x %*x %*x %(A)x %*x %*x"; }
readStat     { in "%*x %*x %*x %*x %(A)x %*x;" }
readHVStat   { in "%*x %*x %*x %*x %*x %(A)x;" }

debug {
  ExtraInput = Ignore;
  in "%39c";
}


Replies:
Re: Stream device question Michael Davidsaver

Navigate by Date:
Prev: Re: Question related to PV record J. Lewis Muir
Next: Re: Stream device question Michael Davidsaver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
Navigate by Thread:
Prev: Re: Question related to PV record Vandana Yadav
Next: Re: Stream device question Michael Davidsaver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
ANJ, 06 Mar 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·