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  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 
<== Date ==> <== Thread ==>

Subject: RE: I have some question.. in .proto and .db files
From: <peter.owens@stfc.ac.uk>
To: <pmjzzang78@gmail.com>, <tech-talk@aps.anl.gov>
Date: Wed, 6 Jan 2016 12:14:04 +0000

1.       “I/O Intr” means the protocol will attempt to parse all the input from the device and trigger record processing when it matches. It is usually used for devices that send data without this being requested. In this case it is used to extract multiple values from a single reply.

2.       The problem is that the record “BL5C:NOZZLE:GetCryoSolAllSta” and protocol “GetCryoSolAllSta” is designed to process using “I/O Intr” (as above) but instead it is “Passive” and is processed due to a forward link.

 

What happens is this:

BL5C:NOZZLE:GetRemoteAllSta is processed on the .2 second scan.

The protocol sends the command:

!53ALL

and your device replies with:

?531000010100

The protocol parses this and extracts the value from the first digit (ie “1”=”Remote”).

The protocols for ALL the other records with field(SCAN, "I/O Intr") also attempt to parse this input eg:

GetHC1SolAllSta extracts the value from the third digit and so on.

 

Then the forward link is causes the record BL5C:NOZZLE:GetCryoSolAllSta to process.

The protocol does not send a command but simply waits for input.

The device doesn’t send anything because it hasn’t been asked.

After the specified timeout – 1200 ms it gives up.

 

Pete

 

 

From: tech-talk-bounces@aps.anl.gov [mailto:tech-talk-bounces@aps.anl.gov] On Behalf Of mujin park
Sent: 04 January 2016 01:13
To: tech-talk@aps.anl.gov
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..

 


Replies:
Re: I have some question.. in .proto and .db files Martin L. Smith
References:
I have some question.. in .proto and .db files mujin park

Navigate by Date:
Prev: EPICS Qt Channel Access Client Programming Abdalla Ahmad
Next: Re: I have some question.. in .proto and .db files Martin L. Smith
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 
Navigate by Thread:
Prev: Re: I have some question.. in .proto and .db files Kasemir, Kay
Next: Re: I have some question.. in .proto and .db files Martin L. Smith
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 
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 ·