Experimental Physics and Industrial Control System
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
- Navigate by Date:
- Prev:
RE: Capturing data from string which is sent by device Mark Rivers
- 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
<2016>
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
RE: Capturing data from string which is sent by device Mark Rivers
- 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
<2016>
2017
2018
2019
2020
2021
2022
2023
2024