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: "'PilkyuJung'" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Mon, 5 Dec 2016 15:40:12 +0000
Hi Pilkyu,

I have read the manual for the MPC that you sent.  Indeed it should never sent the unprintable characters like \377\372.  I see that you are using a TCP connection to the MPC, which means you are using its internal Lantronix terminal server.  I think you may have some setting on the Lantronix wrong, for example the start bits, stop bits, or parity.  Can you open a Web page to the Lantronix and see what settings you are using?

Since you have already built the ip application you could try simply using the devMPC device support and see if that works.

To test, comment out the StreamDevice support and add this line to your startup script:

dbLoadRecords("$(IP)/ipApp/Db/MPC.db","P=10MeV:,PUMP=TM:,PORT=P1,PA=5,PN=1")

Your application must have been built using ipSupport.dbd and ip.lib.

Note also that you have an error in your startup script.  You need to define the macro parameter S 

********************************************
dbLoadRecords("db/devvacuum.db","P=10MeV:,R=TM:,PORT1 =P1 ,A=1")
macLib: macro S is undefined (expanding string record (stringin, 
"$(P)$(S):message") {
)
filename="../dbLexRoutines.c" line number=321
macExpandString failed for file db/devvacuum.db
Bad character '$' in record name "10MeV:$(S,undefined):message"
********************************************

Mark


-----Original Message-----
From: PilkyuJung [mailto:[email protected]] 
Sent: Sunday, December 04, 2016 11:14 PM
To: Mark Rivers
Cc: [email protected]
Subject: Capturing data from string which is sent by device

Hi, Mark

Here is complete communication with the controller, including both what 
is sent as well as what is received.
-----------------------------------------------------------------------------------------------------------------------------------communication 
with device
#!../../bin/linux-x86_64/vacuum
< envPaths
epicsEnvSet("ARCH","linux-x86_64")
epicsEnvSet("IOC","iocvacuum")
epicsEnvSet("TOP","/home/anothel/Desktop/vacuum")
epicsEnvSet("EPICS_BASE","/usr/local/epics/base")
epicsEnvSet("ASYN","/usr/local/epics/extensions/src/synApps_5_7/support/asyn-4-21")
epicsEnvSet("STREAM","/usr/local/epics/extensions/src/synApps_5_7/support/stream-2-6")
epicsEnvSet "STREAM_PROTOCOL_PATH" "/home/anothel/Desktop/vacuum/db"
epicsEnvSet "P" "10MeV:"
epicsEnvSet "R" "TM:"
epicsEnvSet "TCP1" "169.254.90.249:10001"
cd /home/anothel/Desktop/vacuum
dbLoadDatabase "dbd/vacuum.dbd"
vacuum_registerRecordDeviceDriver pdbbase
drvAsynIPPortConfigure("P1",169.254.90.249:10001,0,0,0)
asynSetTraceIOMask("P1", -1, 0x2)
asynSetTraceMask("P1", -1, 0x9)
dbLoadRecords("db/devvacuum.db","P=10MeV:,R=TM:,PORT1 =P1 ,A=1")
macLib: macro S is undefined (expanding string record (stringin, 
"$(P)$(S):message") {
)
filename="../dbLexRoutines.c" line number=321
macExpandString failed for file db/devvacuum.db
Bad character '$' in record name "10MeV:$(S,undefined):message"
cd /home/anothel/Desktop/vacuum/iocBoot/iocvacuum
iocInit
Starting iocInit
############################################################################
## EPICS R3.14.12.5 $Date: Tue 2015-03-24 09:57:35 -0500$
## EPICS Base built Nov 22 2016
############################################################################
iocRun: All initialization complete
## Start any sequence programs
#seq sncxxx,"user=anothel"
epics> 2016/12/05 14:01:29.868 169.254.90.249:10001 read 6
\377\373\001\377\373\003
2016/12/05 14:01:29.869 169.254.90.249:10001 write 13
~ 05 0b 1 00\r
2016/12/05 14:01:29.902 169.254.90.249:10001 read 21
\377\372,j`\377\36005 OK 00 7.0E-
2016/12/05 14:01:29.923 169.254.90.249:10001 read 12
10 TORR AE\r\000
2016/12/05 14:01:29.922938 P1 dbPut: 
10MeV:TM:ST_x_Pressure_R1(10MeV:TM:ST_x_Pressure_R1.VAL, DBF_STRING, 
"��,j`��05 OK 00 7.0E-10 TORR AE") failed
2016/12/05 14:01:31.869 169.254.90.249:10001 write 13
~ 05 0b 1 00\r
2016/12/05 14:01:31.901 169.254.90.249:10001 read 21
\377\372,j`\377\36005 OK 00 7.1E-
2016/12/05 14:01:31.922 169.254.90.249:10001 read 12
10 TORR AF\r\000
2016/12/05 14:01:31.921777 P1 dbPut: 
10MeV:TM:ST_x_Pressure_R1(10MeV:TM:ST_x_Pressure_R1.VAL, DBF_STRING, 
"��,j`��05 OK 00 7.1E-10 TORR AF") failed
2016/12/05 14:01:33.869 169.254.90.249:10001 write 13
~ 05 0b 1 00\r
2016/12/05 14:01:33.901 169.254.90.249:10001 read 21
\377\372,j`\377\36005 OK 00 7.0E-
2016/12/05 14:01:33.922 169.254.90.249:10001 read 12
10 TORR AE\r\000
2016/12/05 14:01:33.921827 P1 dbPut: 
10MeV:TM:ST_x_Pressure_R1(10MeV:TM:ST_x_Pressure_R1.VAL, DBF_STRING, 
"��,j`��05 OK 00 7.0E-10 TORR AE") failed

-----------------------------------------------------------------------------------------------------------------------------------.db 
file
record(stringin, "$(P)$(R)ST_x_Mdl1"){
field( DESC, "Get Model")
field( DTYP, "stream")
field( INP, "@devvacuum.proto getMDL $(PORT1) $(A)")
#field( PINI, "YES")
}

record( ai, "$(P)$(R)ST_x_Pressure_R1"){
field( DESC, "Pressure read")
field( DTYP, "stream")
field( INP, "@devvacuum.proto getPRS $(PORT1) $(A)")
#field( PREC, "3")
field( EGU, "TORR")
#field( HOPR, "3.5")
#field( LOPR, "0")
field( SCAN, "2 second")
}

record (stringin, "$(P)$(S):message") {
}
-----------------------------------------------------------------------------------------------------------------------------------.proto 
file
InTerminator=CR;
OutTerminator=CR;
ExtraInput=Ignore;
Terminator = CR LF;

getMDL{
ExtraInput=Ignore;
out "~ 05 01 00 ";
#out "7e 20 30 35 20 30 31 20 30 30 0D";
in "";
}

getPRS{
out "~ 05 0b 1 00";
in "%E TORR";
@mismatch {in "%(\1)39c";}
}
-----------------------------------------------------------------------------------------------------------------------------------

As you said, this sentence "\377\372,j`\377\360" is meaning something 
wrong while communicate between device and me.

I don't know why I received that line which I didn't want. and I watched 
a manual for searching about that number, the manual says nothing for 
that number. I attached the manual. While I am writing this mail, I saw 
some of strange things in my files. but I can't find and fix it.. Could 
you give me a favor? I hope remove "��,j`��". Thank you.

P.S. If I want to know about function of "@mismatch" where I can find 
direction or example?

Best Regards,
Pilkyu Jung


Replies:
Re: Capturing data from string which is sent by device Eric Norum

Navigate by Date:
Prev: Simultaneous Channel access matthew.taylor
Next: Re: Capturing data from string which is sent by device Eric Norum
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 Eric Norum
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, 05 Dec 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·