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: Mark Rivers <[email protected]>
To: Pilkyu Jung <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Mon, 5 Dec 2016 02:53:22 +0000
You did not answer my question about the pump controller model.  Is this an MPC?

> This sentence "\377\372,j`\377\360" means error from previous response, isn't it? I need to adjust .proto file.

I am not sure.  Why do you think it is an error response?  

You have already enabled asynTrace with the controller which is good.  You should capture and send us a more complete communication with the controller, including both what is sent as well as what is received.

> By the way, even though installed sysapps5_7 which include ip, I have never used ip. 
> If I wanna get correct line like what you got from an MPC, need to use ip apps?

There are several ways to talk to the MPC.  You should be able to do it with StreamDevice and a protocol file like you are trying to do.

You can also use custom device support which is what is in the ip module.  To use that support you would put lines like the following in your startup script.

dbLoadRecords("$(IP)/ipApp/Db/MPC.db","P=13IDA:,PUMP=ip2,PORT=serial7,PA=0,PN=2")
dbLoadRecords("$(IP)/ipApp/Db/MPC.db","P=13IDA:,PUMP=ip4,PORT=serial7,PA=0,PN=1")

Mark



________________________________________
From: Pilkyu Jung [[email protected]]
Sent: Sunday, December 04, 2016 7:41 PM
To: Mark Rivers
Cc: [email protected]
Subject: Re: Capturing data from string which is sent by device

hi mark,

first of all, I am appreciate of your kindness.

This sentence "\377\372,j`\377\360" means error from previous response, isn't it? I need to adjust .proto file.

By the way, even though installed sysapps5_7 which include ip, I have never used ip. If I wanna get correct line like what you got from an MPC, need to use ip apps?

Best Regards,
Pilkyu Jung



On 12/05/2016 10:03 AM, Mark Rivers wrote:
> Hi Pilkyu,
>
> Your input looks similar to what we receive from the Gamma Vacuum MPC controller:
>
> This is what you get when I put it on one line:
>
> \377\372,j`\377\36005 OK 00 6.4E-10 TORR B1\r\000
>
> This is what I get when from an MPC I put it one one line:
> 00 OK 00 3.9E-09 TORR B6\r
>
> It looks to me like you may not be correctly reading the checksum at the end of the previous response, and it is getting added at the beginning of your next response.
>
> If this is indeed an MPC you can simply use the device support in devMPC.c here:
>
> https://github.com/epics-modules/ip/blob/master/ipApp/src/devMPC.c
>
> Mark
>
>
> ________________________________________
> From: [email protected] [[email protected]] on behalf of Mark Rivers [[email protected]]
> Sent: Sunday, December 04, 2016 6:51 PM
> To: Pilkyu Jung; Ralph Lange
> Cc: [email protected]
> Subject: RE: Capturing data from string which is sent by device
>
> Hi Pilkyu,
>
> What model Gamma Vacuum ion pump controller is this?  There are already EPICS drivers for several models.
>
> Does the documentation for the the controller describe the \377\372 characters you are getting?  If not is it possible that you have got the serial communication parameters wrong, like stop bits or parity?
>
> Mark
>
> ________________________________
> From: [email protected] [[email protected]] on behalf of Pilkyu Jung [[email protected]]
> Sent: Sunday, December 04, 2016 6:26 PM
> To: Ralph Lange
> Cc: [email protected]
> Subject: Re: Capturing data from string which is sent by device
>
> hi, Ralph
>
> This is information of device,
>
> Gamma Vacuum Ion Pump with controller.
>
> By the way, How can I get rid of the unwanted characters which are "\377\372,j`\377\36005 OK 00 TORR B1" for getting only interested data? I guess need to use @mismatch(exception handler) but the things of example which is in stream manual is too weak for me.
>
> Best Regards,
> PilkyuJung
>
> On 12/02/2016 05:52 PM, Ralph Lange wrote:
> 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]<mailto:[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<http://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<http://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
> Tel.+82-10-9067-3109<tel:+82%2010-9067-3109>
>
>
>
>


Replies:
Re: Capturing data from string which is sent by device Pilkyu Jung
References:
Capturing data from string which is sent by device 정필규
Re: Capturing data from string which is sent by device Ralph Lange
Re: Capturing data from string which is sent by device Pilkyu Jung
RE: Capturing data from string which is sent by device Mark Rivers
RE: Capturing data from string which is sent by device Mark Rivers
Re: Capturing data from string which is sent by device Pilkyu Jung

Navigate by Date:
Prev: Re: AreaDetector Interface for Dectris EIGER? David Aragao
Next: Re: AreaDetector Interface for Dectris EIGER? Bruno Martins
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: Capturing data from string which is sent by device Pilkyu Jung
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 ·