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: Capturing data from string which is sent by device
From: Ralph Lange <[email protected]>
To: EPICS Tech Talk <[email protected]>
Date: Fri, 2 Dec 2016 09:52:52 +0100
Hi Pilkyu,

Can you tell the vendor and type of your device?
If it is a common product, there's a good chance that a tested protocol and sample database already exist.

Otherwise, you will have to get rid of the unwanted characters in the 'in' part of your protocol, until only the number you're interested in gets extracted and pushed to the record.

Cheers,
~Ralph


On Fri, Dec 2, 2016 at 9:33 AM, 정필규 <[email protected]> wrote:

Hi all,


I'm Pilkyu Jung who is working with EPICS in Korea.

When I receive data from device on IOC, I have a problem. Normally device sends data like this "current 3.2 A", "0.1 V" etc. at least I was knowing like that.

but, these days I got a new device which is vacuum ion pump. IOC connected with the device perfectly. However, that device sent data like this.

------------------------------------------------------------------------------------------

2016/12/02 17:09:18.992 169.254.90.249:10001 read 19

\377\372,j`\377\36005 OK 00 6.4

2016/12/02 17:09:19.012 169.254.90.249:10001 read 14

E-10 TORR B1\r\000

2016/12/02 17:09:19.012361 P1 dbPut: 10MeV:TM:ST_x_Pressure_R1(10MeV:TM:ST_x_Pressure_R1.VAL, DBF_STRING, "��,j`��05 OK 00 6.4E-10 TORR B1") failed

------------------------------------------------------------------------------------------

So, I can't get only real data(6.5E-10). It makes me can't capture data in PV. Then when I express data by caget, it just express 0, like this.
------------------------------------------------------------------------------------------
localhost.localdomain[15]# caget 10MeV:TM:ST_x_Pressure_R1
10MeV:TM:ST_x_Pressure_R1      0
------------------------------------------------------------------------------------------

 If I wanna capture only real data(6.4E-10) how can I do? Here is my .db and .proto files.
------------------------------------------------------------------------------------------
record( ai, "$(P)$(R)ST_x_Pressure_R1"){
field( DESC, "Pressure read")
field( DTYP, "stream")
field( INP, "@devvacuum.proto getPRS $(PORT1) $(A)")
field( EGU, "Torr")
field( SCAN, "2 second")
}
------------------------------------------------------------------------------------------
getPRS{
out "~ 05 0b 01 00 ";
in "%e TORR";
}
------------------------------------------------------------------------------------------

Best Regards,
PilkyuJung


Replies:
Re: Capturing data from string which is sent by device Pilkyu Jung
References:
Capturing data from string which is sent by device 정필규

Navigate by Date:
Prev: Capturing data from string which is sent by device 정필규
Next: Re: display two opi viewers on different monitors Paul Sichta
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: Capturing data from string which is sent by device 정필규
Next: Re: Capturing data from string which is sent by device Pilkyu Jung
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, 04 Dec 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·