EPICS Controls 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  <20162017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: I have some question.. in .proto and .db files
From: Mark Rivers <[email protected]>
To: "'mujin park'" <[email protected]>, "[email protected]" <[email protected]>
Date: Tue, 5 Jan 2016 00:27:54 +0000

Hi,

 

Ø  i saw  field(SCAN, "I/O Intr") in record .. .

Ø  what is mean?

In general SCAN=I/O Intr is used to have records that process automatically when device support gets a callback from the driver.   It can be used either for devices that send information asynchronously (without sending a command to ask for the data), or for drivers that rapidly poll the device and then only process the record when something changes. 

 

You are using the streamDevice support, which has a specific use for SCAN=I/O Intr when you need to read multiple values from a single device response.  How to do this is explained here:

http://epics.web.psi.ch/software/streamdevice/doc/tipsandtricks.html#readmany

 

Ø  i will read data in device status ...

Ø  But device is  no reply...like this

 

Ø  2016/01/04 10:05:10.379 192.100.100.20:4016 write 8
!53ALL\r\n
2016/01/04 10:05:10.414 192.100.100.20:4016 read 15
?531000010100\r\n
2016/01/04 10:05:11.624 MX1_9 BL5C:NOZZLE:GetCryoSolAllSta: No reply from device within 1200 ms

 

This is from your database and protocol files.  You are processing the GetRemoteAllSta and then forward linking to a number of other records.

 

Ø  record(bi, "$(P)$(D):GetRemoteAllSta")
{
    field(DESC, "Local/Remote All Status")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto GetRemoteAllSta $(PORT) $(A)")
    field(ZNAM, "Local")
    field(ONAM, "Remote")
    field(SCAN, ".2 second")
    field(FLNK, "$(P)$(D):GetCryoSolAllSta")
}
 record(mbbi, "$(P)$(D):GetCryoSolAllSta")
{
    field(DESC, "Cryo Solenoid All Status")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto GetCryoSolAllSta $(PORT) $(A)")
    field( ZRVL, "0") field( ZRST, "Off")
    field( ONVL, "1") field( ONST, "On")
    field( TWVL, "2") field( TWST, "Mid")
    field( THVL, "3") field( THST, "Failure")
    field(FLNK, "$(P)$(D):GetCryoOnSensorAllSta")
    #field(SCAN, "I/O Intr")
}
### Get All Status of Nozzle Exchanger start ###
GetRemoteAllSta{
    out "!53ALL";
    in  "?53%1d%*9d";
    ExtranInput = Ignore;
}
GetCryoSolAllSta{
    in  "?53%*1d%1d%*8d";
    ExtranInput = Ignore;
}

 

So the GetRemoteAllSta record and protocol send an !53ALL command and then a number of records need to retrieve their data from the response to that command.  The way you have done this is incorrect, because you are telling streamDevice to read from the device multiple times.  That won’t work, you only read from the device once and then parse that single response multiple times.

 

You need to remove your FLNK fields like the one in GetRemoteAllSta

 

    field(FLNK, "$(P)$(D):GetCryoOnSensorAllSta")

 

You need to uncomment lines like this one:
    field(SCAN, "I/O Intr")

All the records that need to process the response from !53ALL except the  GetRemoteAllSta record must have SCAN=I/O Intr, and you don’t want the FLNK fields.  This will cause each of these records to process whenever there is any input. 

 

Another way to do this is to use redirection as explained here:

http://epics.web.psi.ch/software/streamdevice/doc/formats.html#redirection

 

Note that you have several typos in your protocol file, you have ExtranInput = Ignore, but it should be ExtraInput = Ignore (you have an extra “n” character).

 

Mark

 

 

From: [email protected] [mailto:[email protected]] On Behalf Of mujin park
Sent: Sunday, January 03, 2016 7:13 PM
To: [email protected]
Subject: I have some question.. in .proto and .db files

 

Hello...

Happy New year.

1 question

i saw  field(SCAN, "I/O Intr") in record .. .

what is mean?

2 question

i will read data in device status ...

But device is  no reply...

like this

 

2016/01/04 10:05:09.128 192.100.100.20:4016 write 8
!53ALL\r\n
2016/01/04 10:05:09.163 192.100.100.20:4016 read 15
?531000010100\r\n
2016/01/04 10:05:10.276 MX2_13 BL5C:SCREENS:Measure: No reply from device within 2000 ms
2016/01/04 10:05:10.372 MX1_9 BL5C:NOZZLE:GetCryoSolAllSta: No reply from device within 1200 ms
2016/01/04 10:05:10.379 192.100.100.20:4016 write 8
!53ALL\r\n
2016/01/04 10:05:10.414 192.100.100.20:4016 read 15
?531000010100\r\n
2016/01/04 10:05:11.624 MX1_9 BL5C:NOZZLE:GetCryoSolAllSta: No reply from device within 1200 ms
2016/01/04 10:05:11.631 192.100.100.20:4016 write 8
!53ALL\r\n
2016/01/04 10:05:11.666 192.100.100.20:4016 read 15
?531000010100\r\n
2016/01/04 10:05:12.875 MX1_9 BL5C:NOZZLE:GetCryoSolAllSta: No reply from device within 1200 ms

db file...

# Reading
#
 
### Get All Status of Nozzle Exchanger start ###
 
record(bi, "$(P)$(D):GetRemoteAllSta")
{
    field(DESC, "Local/Remote All Status")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto GetRemoteAllSta $(PORT) $(A)")
    field(ZNAM, "Local")
    field(ONAM, "Remote")
    field(SCAN, ".2 second")
    field(FLNK, "$(P)$(D):GetCryoSolAllSta")
}
 
record(mbbi, "$(P)$(D):GetCryoSolAllSta")
{
    field(DESC, "Cryo Solenoid All Status")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto GetCryoSolAllSta $(PORT) $(A)")
    field( ZRVL, "0") field( ZRST, "Off")
    field( ONVL, "1") field( ONST, "On")
    field( TWVL, "2") field( TWST, "Mid")
    field( THVL, "3") field( THST, "Failure")
    field(FLNK, "$(P)$(D):GetCryoOnSensorAllSta")
    #field(SCAN, "I/O Intr")
}
record(mbbi, "$(P)$(D):GetHC1SolAllSta")
{
    field(DESC, "HC1 Solenoid All Status")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto GetHC1SolAllSta $(PORT) $(A)")
    field( ZRVL, "0") field( ZRST, "Off")
    field( ONVL, "1") field( ONST, "On")
    field( TWVL, "2") field( TWST, "Mid")
    field( THVL, "3") field( THST, "Failure")
    field(SCAN, "I/O Intr")
}
record(bi, "$(P)$(D):GetShutterSolAllSta")
{
    field(DESC, "Shutter  Solenoid All Status")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto GetShutterSolAllSta $(PORT) $(A)")
    field(ZNAM, "Off")
    field(ONAM, "On")
    field(SCAN, "I/O Intr")
}
record(mbbi, "$(P)$(D):GetCryoOnSensorAllSta")
{
    field(DESC, "Cryo Cylinder On Sensor All Status")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto GetCryoOnSensorAllSta $(PORT) $(A)")
    field( ZRVL, "0") field( ZRST, "Off")
    field( ONVL, "1") field( ONST, "On")
    field( TWVL, "2") field( TWST, "On Going")
    #field(SCAN, "I/O Intr")
}
 
record(mbbi, "$(P)$(D):GetCryoOffSensorAllSta")
{
    field(DESC, "Cryo Cylinder Off Sensor All Status")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto GetCryoOffSensorAllSta $(PORT) $(A)")
    field( ZRVL, "0") field( ZRST, "Off")
    field( ONVL, "1") field( ONST, "On")
    field( TWVL, "2") field( TWST, "Off Going")
    field(SCAN, "I/O Intr")
}
 
record(mbbi, "$(P)$(D):GetHC1OnSensorAllSta")
{
    field(DESC, "HC1 Cylinder On Sensor All Status")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto GetHC1OnSensorAllSta $(PORT) $(A)")
    field( ZRVL, "0") field( ZRST, "Off")
    field( ONVL, "1") field( ONST, "On")
    field( TWVL, "2") field( TWST, "On Going")
    field(SCAN, "I/O Intr")
}
 
record(mbbi, "$(P)$(D):GetHC1OffSensorAllSta")
{
    field(DESC, "HC1 Cylinder Off Sensor All Status")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto GetHC1OffSensorAllSta $(PORT) $(A)")
    field( ZRVL, "0") field( ZRST, "Off")
    field( ONVL, "1") field( ONST, "On")
    field( TWVL, "2") field( TWST, "Off Going")
    field(SCAN, "I/O Intr")
}
 
record(bi, "$(P)$(D):GetCryoBackAllSta")
{
    field(DESC, "Cryo Back All Status")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto GetCryoBackAllSta $(PORT) $(A)")
    field(ZNAM, "Back Off")
    field(ONAM, "Back On")
    field(SCAN, "I/O Intr")
}
record(bi, "$(P)$(D):GetHC1BackAllSta")
{
    field(DESC, "HC1 Back All Status")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto GetHC1BackAllSta $(PORT) $(A)")
    field(ZNAM, "Back Off")
    field(ONAM, "Back On")
    field(SCAN, "I/O Intr")
}
 
### Get All Status of Nozzle Exchanger end ###
 
 
 
record(bo,"$(P)$(D):SetCryoNozzleOn")
{
    field(DESC, "Cryo Nozzle ON")
    field(FLNK, "$(P)$(D):GetCryoNozzleOn PP")
#    field(DTYP, "stream")
#    field(OUT,  "@devNozzleExchange.proto SetCryoNozzleOn $(PORT) $(A)")
}
record(bi,"$(P)$(D):GetCryoNozzleOn")
{
    field(DESC, "Cryo Nozzle ON")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto SetCryoNozzleOn $(PORT) $(A)")
}
 
record(bo,"$(P)$(D):SetCryoNozzleOff")
{
    field(DESC, "Cryo Nozzle OFF")
    field(FLNK, "$(P)$(D):GetCryoNozzleOff PP")
#    field(DTYP, "stream")
#    field(OUT,  "@devNozzleExchange.proto SetCryoNozzleOff $(PORT) $(A)")
}
record(bi,"$(P)$(D):GetCryoNozzleOff")
{
    field(DESC, "Cryo Nozzle Off")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto SetCryoNozzleOff $(PORT) $(A)")
}
 
 
record(bo,"$(P)$(D):SetHC1NozzleOn")
{
    field(DESC, "HC1 Nozzle On")
    field(FLNK, "$(P)$(D):GetHC1NozzleOn PP")
#    field(DTYP, "stream")
#    field(OUT,  "@devNozzleExchange.proto SetHC1NozzleOn $(PORT) $(A)")
}
record(bi,"$(P)$(D):GetHC1NozzleOn")
{
    field(DESC, "HC1 Nozzle On")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto SetHC1NozzleOn $(PORT) $(A)")
}
 
record(bo,"$(P)$(D):SetHC1NozzleOff")
{
    field(DESC, "HC1 Nozzle Off")
    field(FLNK, "$(P)$(D):GetHC1NozzleOff PP")
#   field(DTYP, "stream")
#   field(OUT,  "@devNozzleExchange.proto SetHC1NozzleOff $(PORT) $(A)")
}
record(bi,"$(P)$(D):GetHC1NozzleOff")
{
    field(DESC, "HC1 Nozzle Off")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto SetHC1NozzleOff $(PORT) $(A)")
}
 
record(bo,"$(P)$(D):SetNozzleBackOn")
{
    field(DESC, "Nozzle Back On")
    field(FLNK, "$(P)$(D):GetNozzleBackOn PP")
#    field(DTYP, "stream")
#    field(OUT,  "@devNozzleExchange.proto SetNozzleBackOn $(PORT) $(A)")
}
record(mbbi,"$(P)$(D):GetNozzleBackOn")
{
    field(DESC, "Nozzle Back On")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto SetNozzleBackOn $(PORT) $(A)")
    field( ZRVL, "0") field( ZRST, "Error")
    field( ONVL, "1") field( ONST, "Cryo Back Ok")
    field( TWVL, "2") field( TWST, "HC1 Back Ok")
}
 
record(bo,"$(P)$(D):SetNozzleBackOff")
{
    field(DESC, "Nozzle Back Off")
    field(FLNK, "$(P)$(D):GetNozzleBackOff PP")
#    field(DTYP, "stream")
#    field(OUT,  "@devNozzleExchange.proto SetNozzleBackOff $(PORT) $(A)")
}
record(bi,"$(P)$(D):GetNozzleBackOff")
{
    field(DESC, "Nozzle Back Off")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto SetNozzleBackOff $(PORT) $(A)")
}
 
record(bo,"$(P)$(D):SetCryoNozzleAutoOn")
{
    field(DESC, "Cryo Nozzle Auto On")
    field(FLNK, "$(P)$(D):GetCryoNozzleAutoOn PP")
#    field(DTYP, "stream")
#    field(OUT,  "@devNozzleExchange.proto SetCryoNozzleAutoOn $(PORT) $(A)")
}
record(bi,"$(P)$(D):GetCryoNozzleAutoOn")
{
    field(DESC, "Cryo Nozzle Auto On")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto SetCryoNozzleAutoOn $(PORT) $(A)")
}
 
record(bo,"$(P)$(D):SetHC1NozzleAutoOn")
{
    field(DESC, "HC1 Nozzle Auto On")
    field(FLNK, "$(P)$(D):GetHC1NozzleAutoOn PP")
#    field(DTYP, "stream")
#    field(OUT,  "@devNozzleExchange.proto SetHC1NozzleAutoOn $(PORT) $(A)")
}
record(bi,"$(P)$(D):GetHC1NozzleAutoOn")
{
    field(DESC, "HC1 Nozzle Auto On")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto SetHC1NozzleAutoOn $(PORT) $(A)")
}
 
 
record(bo,"$(P)$(D):SetCryoShutterOn")
{
    field(DESC, "Cryo Shutter On")
    field(FLNK, "$(P)$(D):GetCryoShutterOn PP")
#    field(DTYP, "stream")
#    field(OUT,  "@devNozzleExchange.proto SetCryoShutterOn $(PORT) $(A)")
}
record(bi,"$(P)$(D):GetCryoShutterOn")
{
    field(DESC, "Cryo Shutter On")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto SetCryoShutterOn $(PORT) $(A)")
}
record(bo,"$(P)$(D):SetCryoShutterOff")
{
    field(DESC, "Cryo Shutter Off")
    field(FLNK, "$(P)$(D):GetCryoShutterOff PP")
#    field(DTYP, "stream")
#    field(OUT,  "@devNozzleExchange.proto SetCryoShutterOff $(PORT) $(A)")
}
record(bi,"$(P)$(D):GetCryoShutterOff")
{
    field(DESC, "Cryo Shutter Off")
    field(DTYP, "stream")
    field(INP,  "@devNozzleExchange.proto SetCryoShutterOff $(PORT) $(A)")
}
 
 
record(bo,"$(P)$(D):SetSystemReset")
{
    field(DESC, "System Reset")
#    field(FLNK, "$(P)$(D):GetSystemReset PP")
    field(DTYP, "stream")
    field(OUT,  "@devNozzleExchange.proto SetSystemReset $(PORT) $(A)")
}
#record(bi,"$(P)$(D):GetSystemReset")
#{
#    field(DESC, "System Reset")
#    field(DTYP, "stream")
#    field(INP,  "@devNozzleExchange.proto SetSystemReset $(PORT) $(A)")
#}
 
record(ao, "$(P)$(D):Mode")
{
    field(DESC, "Control Mode")
    field(PREC, "0")
}

proto file

@writetimeout { disconnect; }
@replytimeout { disconnect; }
@readtimeout  { disconnect; }
@mismatch     { disconnect; }
 
ReplyTimeout = 1200;
InTerminator = CR LF;
OutTerminator = CR LF;
 
#
# Measure current
#
 
GetRemoteSta {
    out "!50SWS";
    in "?50%1d";
    ExtraInput = Ignore;
}
GetCryoSolSta {
    out "!51SOL";
    in "?51%1d%*2d";
    ExtraInput = Ignore;
}
GetHC1SolSta {
    in "?51%*1d%1d%*1d";
    ExtraInput = Ignore;
}
GetShutterSolSta {
    in "?51%*2d%1d";
    ExtraInput = Ignore;
}
 
GetCryoOnSensorSta {
    out "!52POS";
    in "?52%1d%*5d";
    ExtraInput = Ignore;
}
GetCryoOffSensorSta {
    in "?52%*1d%1d%*4d";
    ExtraInput = Ignore;
}
GetHC1OnSensorSta {
    in "?52%*2d%1d%*3d";
    ExtraInput = Ignore;
}
 
GetHC1OffSensorSta {
    in "?52%*3d%1d%*2d";
    ExtraInput = Ignore;
}
GetCryoBackSta {
    in "?52%*4d%1d%*1d";
    ExtraInput = Ignore;
}
GetHC1BackSta {
    in "?52%*5d%1d";
    ExtraInput = Ignore;
}
### Get All Status of Nozzle Exchanger start ###
GetRemoteAllSta{
    out "!53ALL";
    in  "?53%1d%*9d";
    ExtranInput = Ignore;
}
GetCryoSolAllSta{
    in  "?53%*1d%1d%*8d";
    ExtranInput = Ignore;
}
GetHC1SolAllSta{
    in  "?53%*2d%1d%*7d";
    ExtranInput = Ignore;
}
GetShutterSolAllSta{
    in  "?53%*3d%1d%*6d";
    ExtranInput = Ignore;
}
GetCryoOnSensorAllSta {
    
    in "?53%*4d%1d%*5d";
    ExtraInput = Ignore;
}
GetCryoOffSensorAllSta {
    in "?53%*5d%1d%*4d";
    ExtraInput = Ignore;
}
GetHC1OnSensorAllSta {
    in "?53%*6d%1d%*3d";
    ExtraInput = Ignore;
}
 
GetHC1OffSensorAllSta {
    in "?53%*7d%1d%*2d";
    ExtraInput = Ignore;
}
GetCryoBackAllSta {
    in "?53%*8d%1d%*1d";
    ExtraInput = Ignore;
}
GetHC1BackAllSta {
    in "?53%*9d%1d";
    ExtraInput = Ignore;
}
### Get All Status of Nozzle Exchanger end ###
 
 
GetRobotBackOnSta{
    out "!55RBS";
    in "?55%1d%*1d";
    ExtraInput = Ignore;
}
GetRobotNozzleOffSta{
    in "?55%*1d%1d";
    ExtraInput = Ignore;
}
 
SetCryoNozzleOn {
    out "!10CON";
    in "%1d=%*2c";
    @mismatch     { in "Error=%1d";}
}
SetCryoNozzleOff {
    out "!11COF";
    in "%1d=%*2c";
    @mismatch     { in "Error=%1d";}
 
}  
SetHC1NozzleON {
    out "!13HON";
    in "%1d=%*2c";
    @mismatch     { in "Error=%1d";}
}  
SetHC1NozzleOff {
    out "!14HOF";
    in "%1d=%*2c";
    @mismatch     { in "Error=%1d";}
}   
SetNozzleBackOn {
    out "!15BON";
    in "%1d=%*2c";
    @mismatch     { in "Error=%1d";}
}   
SetNozzleBackOff {
    out "!16BOF";
    in "%1d=%*2c";
    @mismatch     { in "Error=%1d";}
}  
SetCryoNozzleAutoOn {
    out "!17ACN";
    in "%1d=%*2c";
    @mismatch     { in "Error=%1d";}
}
SetHC1NozzleAutoOn {
    out "!18AHN";
    in "%1d=%*2c";
    @mismatch     { in "Error=%1d";}
}
SetCryoShutterOn {
    out "!19CSO";
    in "%1d=%*2c";
    @mismatch     { in "Error=%1d";}
}
SetCryoShutterOff {
    out "!20CSF";
    in "%1d=%*2c";
    @mismatch     { in "Error=%1d";}
}
 
SetSystemReset {
    out "!21RST";
#    in "%1d=%*2c";
#    @mismatch     { in "Error=%1d";}
}  

I want to know why not ?

Please help me..

 


References:
I have some question.. in .proto and .db files mujin park

Navigate by Date:
Prev: AreaDetector ADAndor - iXon Ultra 888 Dunning, Michael
Next: RE: AreaDetector ADAndor - iXon Ultra 888 Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: I have some question.. in .proto and .db files mujin park
Next: Re: I have some question.. in .proto and .db files Kasemir, Kay
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·