I will test your case, but have you considered using a mbbiDirect record
with a %b format? (Assuming the digits can be 0 or 1)
Also if the device sends data automatically without being asked, SCAN
"I/O Intr" should work better than "5 second".
record(mbbiDirect,"Va")
{
field(SCAN,"I/O Intr")
field(DTYP,"stream")
field(INP, "@devLeak.proto get $(Port) $(Addr)")
}
get { in "a:%b"; }
In that case the bits will show up in Va.B0 ... Va.B7. Of course you can
put them into individual records if required:
record(bi, "Va1")
{
field(INP, "Va.B0 CP")
field(ZNAM, "OK")
field(ONAM, "Alarm")
field(OSV, "MAJOR")
}
...
On 12.09.2018 02:53, [email protected] wrote:
The data uploaded by the underlying device is a:00000000; if Va1 is
alarmed, the uploaded data is a:00000001
----- 原始邮件 -----
发件人:Dirk Zimoch <[email protected]>
收件人:<[email protected]>, rivers <[email protected]>,
kasemirk <[email protected]>, tech-talk <[email protected]>
主题:Re: No reply from device using asyn+streamdevice
日期:2018年09月11日 16点00分
Hello Debbie,
It would be helpful to know the data your device is sending.
Dirk
On 11.09.2018 09:49, [email protected] wrote:
> Hi everyone,
> An IOC will have a device connected via Asyn+StreamDevice. The equipment
> is self-developed. The protocol is very simple,and the data is
> automatically uploaded. IOC compilation has no problems. But only one PV
> variable has a return value.
>
> The protocol file is as follows:
> Terminator = CR;
> get {
> in
>
"%*c:%(\$8.VAL)c%(\$7.VAL)c%(\$6.VAL)c%(\$5.VAL)c%(\$4.VAL)c%(\$3.VAL)c%(\$2.VAL)c%c";
>
> }
>
>
> The db file is as follows:
>
> record(stringin,"Va1")
> {
> field(SCAN,"5 second")
> field(DTYP,"stream")
> field(INP, "@devLeak.proto get(a,Va8,Va7,Va6,Va5,Va4,Va3,Va2)
> $(Port) $(Addr)")
> }
>
> record(stringin,"Va2")
> {
> }
>
> record(stringin,"Va3")
> {
> }
>
> record(stringin,"Va4")
> {
> }
>
> record(stringin,"Va5")
> {
> }
>
> record(stringin,"Va6")
> {
> }
>
> record(stringin,"Va7")
> {
> }
>
> record(stringin,"Va8")
> {
> }
>
> During the test, only Va1 has a return value, but sometimes the return
> value of Va1 is reflected in Va3. Test record is as follows:
> [root@localhost devLeak]# camonitor Va1
> Va1 2018-09-11 08:58:08.420435 0
> Va1 2018-09-11 09:46:39.943368 ***
disconnected
> CA.Client.Exception...............................................
> Warning: "Virtual circuit disconnect"
> Context: "localhost:5064"
> Source File: ../cac.cpp line 1214
> Current Time: Tue Sep 11 2018 09:46:39.943325761
> ..................................................................
> Va1 2018-09-11 09:47:16.571558 0
> Va1 2018-09-11 09:52:26.576883 1
> Va1 2018-09-11 10:12:26.598784 0
>
>
>
--------------------------------------------------------------------------------------------------
>
>
> [root@localhost devLeak]# camonitor Va3
> Va3 2018-09-11 08:58:23.420664 0
> Va3 2018-09-11 09:02:03.424510 1
> Va3 2018-09-11 09:02:33.425080 0
> Va3 2018-09-11 09:46:39.943488 ***
disconnected
> CA.Client.Exception...............................................
> Warning: "Virtual circuit disconnect"
> Context: "localhost:5064"
> Source File: ../cac.cpp line 1214
> Current Time: Tue Sep 11 2018 09:46:39.943456337
> ..................................................................
> Va3 <undefined> UDF INVALID
> Va3 2018-09-11 09:47:16.571506 0
>
>
--------------------------------------------------------------------------------------------------
>
>
> [root@localhost devLeak]# camoitor Va6
> bash: camoitor: command not found
> [root@localhost devLeak]# camonitor Va6
> Va6 2018-09-11 08:58:48.421098 0
> Va6 2018-09-11 09:46:39.943463 ***
disconnected
> CA.Client.Exception...............................................
> Warning: "Virtual circuit disconnect"
> Context: "localhost:5064"
> Source File: ../cac.cpp line 1214
> Current Time: Tue Sep 11 2018 09:46:39.943431255
> ..................................................................
> Va6 2018-09-11 09:47:21.571481 0
>
>
> Since there are no compilation errors or warnings, I can't find the
> problem.
>
> Regards, Debbie,IMP epics base R3.14.12.2 stream 2.6 asyn 4.30 linux-x86
>
>
- References:
- 回复:Re: No reply from device using asyn+streamdevice fatimah1129
- Navigate by Date:
- Prev:
Re: Re: ArchiveEngine Silver
- Next:
Re: 回复:Re: No reply from device using asyn+streamdevice Christoph Schroeder
- 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
<2018>
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
回复:Re: No reply from device using asyn+streamdevice fatimah1129
- Next:
Re: 回复:Re: No reply from device using asyn+streamdevice Christoph Schroeder
- 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
<2018>
2019
2020
2021
2022
2023
2024
|