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: "Martin L. Smith" <[email protected]>
To: <[email protected]>, <[email protected]>
Date: Wed, 6 Jan 2016 07:18:43 -0600
Because you are sending a command which sends you multiple bits back and you
are trying to extract those bits from the stream, I would suggest that you
try changing things around a bit. Looks like the record calling the protocol
wants only the first bit, the next record following FLNK appears to be looking
for the next 4 bits ... etc.

However your protocol file looks like you only want 1 bit per record for 10
records. I would change the mbbi records to bi records instead to start with.

Send the command once from the first record looking for bit zero, in this case
GetRemoteAllSta and also change your INP field to look like:
field(INP,  "@devNozzleExchange.proto GetRemoteAllSta($(P),$(D)) $(PORT) $(A)")
This way you pass in the record substitutions as arguments to the protocol which
you will only need to do once. Then FLNK the records in the correct bit order.
Also for the other records using the same return data they will not need to call
the protocol at all.

Then in your protocol file do something like this to parse the data coming back
from your command all at once:
GetRemoteAllSta{
    out "!53ALL";
    in  "?53%1d",	# This will put bit zero in calling record
        "%(\$1\$2:GetCryoSolAllSta)1d", # Next bit
	"%(\$1\$2:GetHC1SolAllSta)1d",	# Next bit and so on
	"%(\$1\$2:GetShutterSolAllSta)1d", # until all return data in
	"%(\$1\$2:GetCryoOnSensorAllSta)1d", # the stream is used
	"%(\$1\$2:GetCryoOffSensorAllSta)1d",
	"%(\$1\$2:GetHC1OnSensorAllSta)1d",
	"%(\$1\$2:GetHC1OffSensorAllSta)1d",
	"%(\$1\$2:GetCryoBackAllSta)1d",
	"%(\$1\$2:GetHC1BackAllSta)1d";
    ExtranInput = Ignore;
}

I think that this is probably what you are looking for.

Marty


On 01/06/2016 06:14 AM, [email protected] wrote:
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:*[email protected] [mailto:[email protected]] *On
Behalf Of *mujin park
*Sent:* 04 January 2016 01:13
*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 <http://192.100.100.20:4016> write 8
!53ALL\r\n
2016/01/04 10:05:09.163 192.100.100.20:4016 <http://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 <http://192.100.100.20:4016> write 8
!53ALL\r\n
2016/01/04 10:05:10.414 192.100.100.20:4016 <http://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 <http://192.100.100.20:4016> write 8
!53ALL\r\n
2016/01/04 10:05:11.666 192.100.100.20:4016 <http://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 peter.owens
References:
I have some question.. in .proto and .db files mujin park
RE: I have some question.. in .proto and .db files peter.owens

Navigate by Date:
Prev: RE: I have some question.. in .proto and .db files peter.owens
Next: Re: mrfioc2 loading error at vxWorks 6.9 Konrad, Martin
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: RE: I have some question.. in .proto and .db files peter.owens
Next: RE: I have some question.. in .proto and .db files peter.owens
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 ·