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  <20132014  2015  2016  2017  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  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: TPG261 : "message too small=0" for EPICS
From: Mark Rivers <[email protected]>
To: Sanguk Won <[email protected]>
Cc: Song Jihye <[email protected]>, "[email protected]" <[email protected]>
Date: Thu, 29 Aug 2013 02:04:04 +0000
The basic problem is that you are sending characters to the device, but it is sending nothing back.  That is why you get these messages:


2013/08/29 00:39:27.712 /dev/ttyUSB0 timeout handler.

2013/08/29 00:39:27.814 /dev/ttyUSB0 read 0, return 1

I think you should remove these 2 lines from your startup script:


asynOctetSetOutputEos("song",0,"\r\n")

asynOctetSetInputEos("song",0,"\r\n")

I looked at the device support code, and it sets the terminators itself.  On output it does not call setOutputEos, but rather hardcodes it into the string.  So you are sending the wrong output terminator.  This may be the reason that the device is sending nothing back to you.  Or there may be some other reason that the device is sending nothing back: wrong baud rate, improper cable connection, etc.  Serial devices are hard!

Once you remove those lines try again and send the output again.


Mark

________________________________
From: Sanguk Won [[email protected]]
Sent: Wednesday, August 28, 2013 8:26 PM
To: Mark Rivers
Cc: [email protected]; Song Jihye
Subject: Re: TPG261 : "message too small=0" for EPICS

I set the "asynSetTraceMask("song",0,255)" as following your suggestion.
and then I got information as below.




< envPaths

epicsEnvSet("ARCH","linux-x86")

epicsEnvSet("IOC","iocIpTest")

epicsEnvSet("TOP","/home/sanguk/epics/module/synApps_5_6/support/ip-2-13")

epicsEnvSet("ASYN","/home/sanguk/epics/module/synApps_5_6/support/asyn-4-18")

epicsEnvSet("EPICS_BASE","/home/sanguk/epics/base-3.14.12.2")

dbLoadDatabase("../../dbd/ip.dbd")

dbLoadDatabase("../../dbd/ipSupport.dbd")

ip_registerRecordDeviceDriver(pdbbase)

#dbLoadRecords("/Users/jihyesong/EPICS/modules/synApps_5_5/support/ip-2-10/db/TPG261.db","P=Vacuum:,GAUGE=tpg261,PORT=/dev/tty.UC-232AC,ADDR=0,TIMEOUT=1")

#dbLoadRecords("/Users/jihyesong/EPICS/modules/synApps_5_5/support/sscan-2-6-6/sscanApp/Db/scan.db", "P=/dev/tty.UC-232AC:,MAXPTS1=2000,MAXPTS2=200,MAXPTS3=20,MAXPTS4=10,MAXPTSH=10")

# Use the following commands for serial RTU or ASCII

#drvAsynSerialPortConfigure(const char *portName,

#                           const char *ttyName,

#                           unsigned int priority,

#                           int noAutoConnect,

#                           int noProcessEos);

drvAsynSerialPortConfigure("song", "/dev/ttyUSB0", 0, 0, 0)

asynSetOption("song",0,"baud","38400")

asynSetOption("song",0,"parity","none")

asynSetOption("song",0,"bits","8")

asynSetOption("song",0,"stop","1")

# Use the following commands for serial ASCII

asynOctetSetOutputEos("song",0,"\r\n")

asynOctetSetInputEos("song",0,"\r\n")

# Note: non-zero write delay (last parameter) may be needed.

#modbusInterposeConfig("song",2,1000,0)

# Load Pfeiffer TPG 261 driver database

dbLoadRecords("/home/sanguk/epics/module/synApps_5_6/support/ip-2-13/ipApp/Db/TPG261.db","P=Vacuum:,GAUGE=tpg261,PORT=song,ADDR=0,TIMEOUT=2")

asynSetTraceIOMask("song",0,0x2)

asynSetTraceMask("song",0,255)

iocInit

Starting iocInit

############################################################################

## EPICS R3.14.12.2 $Date: Mon 2011-12-12 14:09:32 -0600$

## EPICS Base built Aug 20 2013

############################################################################

2013/08/29 00:39:23.716 devTPG261::initCommon name=Vacuum:tpg261:PRES; command string=GET_PRESSURE command=1 address=0

2013/08/29 00:39:23.716 devTPG261::initCommon name=Vacuum:tpg261:SP1V; command string=GET_SPVAL1 command=6 address=0

2013/08/29 00:39:23.716 devTPG261::initCommon name=Vacuum:tpg261:SP2V; command string=GET_SPVAL2 command=9 address=0

2013/08/29 00:39:23.716 devTPG261::initCommon name=Vacuum:tpg261:SET1; command string=SET_SP1 command=8 address=0

2013/08/29 00:39:23.716 devTPG261::initCommon name=Vacuum:tpg261:SET2; command string=SET_SP2 command=11 address=0

2013/08/29 00:39:23.716 devTPG261::initCommon name=Vacuum:tpg261:SP1S; command string=GET_SPS1 command=7 address=0

2013/08/29 00:39:23.716 devTPG261::initCommon name=Vacuum:tpg261:SP2S; command string=GET_SPS2 command=10 address=0

2013/08/29 00:39:23.716 devTPG261::initCommon name=Vacuum:tpg261:STATUS; command string=GET_SENSOR command=4 address=0

2013/08/29 00:39:23.716 devTPG261::initCommon name=Vacuum:tpg261:START; command string=SET_SENSOR command=5 address=0

2013/08/29 00:39:23.716 devTPG261::initCommon name=Vacuum:tpg261:UNIT; command string=GET_UNIT command=2 address=0

2013/08/29 00:39:23.716 devTPG261::initCommon name=Vacuum:tpg261:SUNIT; command string=SET_UNIT command=3 address=0

iocRun: All initialization complete

|pics> 2013/08/29 00:39:25.717 devTPG261::buildCommand Vacuum:tpg261:PRES len=4 string=|PR0

2013/08/29 00:39:25.717 song addr -1 queueRequest priority 0 not lockHolder

2013/08/29 00:39:25.717 asynManager::portThread port=song callback

2013/08/29 00:39:25.717 song set Eos 2

\r\n

2013/08/29 00:39:25.717 /dev/ttyUSB0 write.

2013/08/29 00:39:25.717 /dev/ttyUSB0 write 6

PR0\r\r\n

2013/08/29 00:39:25.717 wrote 6 to /dev/ttyUSB0, return asynSuccess

2013/08/29 00:39:25.717 song wrote

PR0\r\r\n

2013/08/29 00:39:25.717 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:PRES nwrite=4, output=[P]0

2013/08/29 00:39:25.717 /dev/ttyUSB0 read.

2013/08/29 00:39:27.712 /dev/ttyUSB0 timeout handler.

2013/08/29 00:39:27.814 /dev/ttyUSB0 read 0, return 1

2013/08/29 00:39:27.814 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:PRES nread=0, input=[]

2013/08/29 00:39:27.814 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:PRES message too small=0

|013/08/29 00:39:27.814 devTPG261::buildCommand Vacuum:tpg261:STATUS len=4 string=|SEN

2013/08/29 00:39:27.814 song addr -1 queueRequest priority 0 not lockHolder

2013/08/29 00:39:27.814 asynManager::portThread port=song callback

2013/08/29 00:39:27.814 song set Eos 2

\r\n

2013/08/29 00:39:27.814 /dev/ttyUSB0 write.

2013/08/29 00:39:27.814 /dev/ttyUSB0 write 6

SEN\r\r\n

2013/08/29 00:39:27.814 wrote 6 to /dev/ttyUSB0, return asynSuccess

2013/08/29 00:39:27.814 song wrote

SEN\r\r\n

2013/08/29 00:39:27.814 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:STATUS nwrite=4, output=]SEN

2013/08/29 00:39:27.814 /dev/ttyUSB0 read.

|013/08/29 00:39:29.717 devTPG261::buildCommand Vacuum:tpg261:PRES len=4 string=|PR0

2013/08/29 00:39:29.717 song addr -1 queueRequest priority 0 not lockHolder

2013/08/29 00:39:29.809 /dev/ttyUSB0 timeout handler.

2013/08/29 00:39:29.914 /dev/ttyUSB0 read 0, return 1

2013/08/29 00:39:29.914 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:STATUS nread=0, input=[]

2013/08/29 00:39:29.914 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:STATUS message too small=0

|013/08/29 00:39:29.914 devTPG261::buildCommand Vacuum:tpg261:SP1S len=4 string=|SPS

2013/08/29 00:39:29.914 song addr -1 queueRequest priority 0 not lockHolder

2013/08/29 00:39:29.914 asynManager::portThread port=song callback

2013/08/29 00:39:29.914 song set Eos 2

\r\n

2013/08/29 00:39:29.914 /dev/ttyUSB0 write.

2013/08/29 00:39:29.914 /dev/ttyUSB0 write 6

PR0\r\r\n

2013/08/29 00:39:29.914 wrote 6 to /dev/ttyUSB0, return asynSuccess

2013/08/29 00:39:29.914 song wrote







could you let me know what is problem ?



Thanks
--
Sanguk Won
C302-002 Physics Dep. /Pusan National Univ. /609-735 Pusan, Republic of KOREA
Tel. +82-51-513-2594(Lab.)/+82-51-512-2594(Fax.)/+82-10-3046-1014(Mob.)
http://hipex.phys.pusan.ac.kr/drupal/    http://memorize7.tistory.com/444


On 2013년 8월 28일 Wednesday at 오후 9:23, Mark Rivers wrote:

If you set instead

asynSetTraceMask("song",0,255)

you will also see the debugging messages from the TPG261 device support, which could also be useful.

Mark


________________________________
From: Mark Rivers
Sent: Wednesday, August 28, 2013 7:12 AM
To: Sanguk Won
Cc: [email protected]<mailto:[email protected]>; Song Jihye
Subject: RE: TPG261 : "message too small=0" for EPICS

Put the following commands in your startup script, right after the asynSetTraceIOMask command you already have.

asynSetTraceMask("song",0,9)

Then you will see exactly what characters are sent and received over the serial port.

You should also load an asyn record on that port. Then you can quickly type commands in the medm or other GUI and look at the response. You need to know at least one valid command that you can send to the device, so read the manual to learn that. Also try to figure out what baud rate the device is set for. With the asyn record you can change the baud rate, parity, stop bits, etc. Once you get the asyn record to show the correct response then hopefully the device support will work.



Mark

________________________________
From: Sanguk Won [[email protected]<mailto:[email protected]>]
Sent: Wednesday, August 28, 2013 12:44 AM
To: Mark Rivers
Cc: [email protected]<mailto:[email protected]>; Song Jihye
Subject: Re: TPG261 : "message too small=0" for EPICS

Thank you for the reply.

A. Please send the entire output when the IOC starts up, and then begins giving the errors you showed.
- I have attached the entire output. so please have a look in below.


baud = 34600 setting for start.cmd

< envPaths

epicsEnvSet("ARCH","linux-x86")

epicsEnvSet("IOC","iocIpTest")

epicsEnvSet("TOP","/home/sanguk/epics/module/synApps_5_6/support/ip-2-13")

epicsEnvSet("ASYN","/home/sanguk/epics/module/synApps_5_6/support/asyn-4-18")

epicsEnvSet("EPICS_BASE","/home/sanguk/epics/base-3.14.12.2")

dbLoadDatabase("../../dbd/ip.dbd")

dbLoadDatabase("../../dbd/ipSupport.dbd")

ip_registerRecordDeviceDriver(pdbbase)

#dbLoadRecords("/Users/jihyesong/EPICS/modules/synApps_5_5/support/ip-2-10/db/TPG261.db","P=Vacuum:,GAUGE=tpg261,PORT=/dev/tty.UC-232AC,ADDR=0,TIMEOUT=1")

#dbLoadRecords("/Users/jihyesong/EPICS/modules/synApps_5_5/support/sscan-2-6-6/sscanApp/Db/scan.db", "P=/dev/tty.UC-232AC:,MAXPTS1=2000,MAXPTS2=200,MAXPTS3=20,MAXPTS4=10,MAXPTSH=10")

# Use the following commands for serial RTU or ASCII

#drvAsynSerialPortConfigure(const char *portName,

# const char *ttyName,

# unsigned int priority,

# int noAutoConnect,

# int noProcessEos);

drvAsynSerialPortConfigure("song", "/dev/ttyUSB0", 0, 0, 0)

asynSetOption("song",0,"baud","38400")

asynSetOption("song",0,"parity","none")

asynSetOption("song",0,"bits","8")

asynSetOption("song",0,"stop","1")

# Use the following commands for serial ASCII

asynOctetSetOutputEos("song",0,"\r\n")

asynOctetSetInputEos("song",0,"\r\n")

# Note: non-zero write delay (last parameter) may be needed.

#modbusInterposeConfig("song",2,1000,0)

# Load Pfeiffer TPG 261 driver database

dbLoadRecords("/home/sanguk/epics/module/synApps_5_6/support/ip-2-13/ipApp/Db/TPG261.db","P=Vacuum:,GAUGE=tpg261,PORT=song,ADDR=0,TIMEOUT=2")

asynSetTraceIOMask("song",0,0x2)

iocInit

Starting iocInit

############################################################################

## EPICS R3.14.12.2 $Date: Mon 2011-12-12 14:09:32 -0600$

## EPICS Base built Aug 20 2013

############################################################################

iocRun: All initialization complete


and error message is following.


epics> 2013/08/28 11:53:39.159 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:PRES message too small=0

2013/08/28 11:53:41.259 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:STATUS message too small=0

2013/08/28 11:53:43.359 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:PRES message too small=0

2013/08/28 11:53:45.459 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:SP1S message too small=0

2013/08/28 11:53:47.559 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:STATUS message too small=0






baud = 9600 setting for start.cmd

< envPaths

epicsEnvSet("ARCH","linux-x86")

epicsEnvSet("IOC","iocIpTest")

epicsEnvSet("TOP","/home/sanguk/epics/module/synApps_5_6/support/ip-2-13")

epicsEnvSet("ASYN","/home/sanguk/epics/module/synApps_5_6/support/asyn-4-18")

epicsEnvSet("EPICS_BASE","/home/sanguk/epics/base-3.14.12.2")

dbLoadDatabase("../../dbd/ip.dbd")

dbLoadDatabase("../../dbd/ipSupport.dbd")

ip_registerRecordDeviceDriver(pdbbase)

#dbLoadRecords("/Users/jihyesong/EPICS/modules/synApps_5_5/support/ip-2-10/db/TPG261.db","P=Vacuum:,GAUGE=tpg261,PORT=/dev/tty.UC-232AC,ADDR=0,TIMEOUT=1")

#dbLoadRecords("/Users/jihyesong/EPICS/modules/synApps_5_5/support/sscan-2-6-6/sscanApp/Db/scan.db", "P=/dev/tty.UC-232AC:,MAXPTS1=2000,MAXPTS2=200,MAXPTS3=20,MAXPTS4=10,MAXPTSH=10")

# Use the following commands for serial RTU or ASCII

#drvAsynSerialPortConfigure(const char *portName,

# const char *ttyName,

# unsigned int priority,

# int noAutoConnect,

# int noProcessEos);

drvAsynSerialPortConfigure("song", "/dev/ttyUSB0", 0, 0, 0)

asynSetOption("song",0,"baud","9600")

asynSetOption("song",0,"parity","none")

asynSetOption("song",0,"bits","8")

asynSetOption("song",0,"stop","1")

# Use the following commands for serial ASCII

asynOctetSetOutputEos("song",0,"\r\n")

asynOctetSetInputEos("song",0,"\r\n")

# Note: non-zero write delay (last parameter) may be needed.

#modbusInterposeConfig("song",2,1000,0)

# Load Pfeiffer TPG 261 driver database

dbLoadRecords("/home/sanguk/epics/module/synApps_5_6/support/ip-2-13/ipApp/Db/TPG261.db","P=Vacuum:,GAUGE=tpg261,PORT=song,ADDR=0,TIMEOUT=2")

asynSetTraceIOMask("song",0,0x2)

iocInit

Starting iocInit

############################################################################

## EPICS R3.14.12.2 $Date: Mon 2011-12-12 14:09:32 -0600$

## EPICS Base built Aug 20 2013

############################################################################

iocRun: All initialization complete


and error message is following.


epics> 2013/08/28 11:52:25.797 devTPG261::readAi Gauge error Vacuum:tpg261:PRES status =[1]

2013/08/28 11:52:27.772 devTPG261::readAi Gauge error Vacuum:tpg261:PRES status =[1]

2013/08/28 11:52:29.845 devTPG261::readAi Gauge error Vacuum:tpg261:PRES status =[1]

2013/08/28 11:52:31.819 devTPG261::readAi Gauge error Vacuum:tpg261:PRES status =[1]

2013/08/28 11:52:33.991 devTPG261::readAi Gauge error Vacuum:tpg261:PRES status =[1]

2013/08/28 11:52:35.768 devTPG261::readAi Gauge error Vacuum:tpg261:PRES status =[1]

2013/08/28 11:52:37.841 devTPG261::readAi Gauge error Vacuum:tpg261:PRES status =[1]

2013/08/28 11:52:39.815 devTPG261::readAi Gauge error Vacuum:tpg261:PRES status =[1]

2013/08/28 11:52:41.790 devTPG261::readAi Gauge error Vacuum:tpg261:PRES status =[1]


I have a one more question.
When I changed the baud from 32600 to 9600,
It shows different error message.
As I know, the default value of baud is 9600.
Should I fix this baud number for the tpg261 model?




linux(Ubuntu12.04 LTS) computer and TPG261 connection is not, Should any device be connected?
B. I don't know what you mean by "TPG261 connection is not". Do you mean that the gauge is not connected to the computer? If so, then the error messages you are seeing are probably normal.
- I had mistake. you don't need to take care about this.



Thanks

--
Sanguk Won



On 2013년 8월 27일 Tuesday at 오후 10:16, Mark Rivers wrote:

Please send the entire output when the IOC starts up, and then begins giving the errors you showed.

linux(Ubuntu12.04 LTS) computer and TPG261 connection is not, Should any device be connected?

I don't know what you mean by "TPG261 connection is not". Do you mean that the gauge is not connected to the computer? If so, then the error messages you are seeing are probably normal.

Mark

________________________________
From: [email protected]<mailto:[email protected]> [[email protected]<mailto:[email protected]>] on behalf of Sanguk Won [[email protected]<mailto:[email protected]>]
Sent: Tuesday, August 27, 2013 7:09 AM
To: [email protected]<mailto:[email protected]>
Cc: Song Jihye
Subject: TPG261 : "message too small=0" for EPICS

Dear all,

I am just starting to learn the EPICS.

In order to monitoring vacuum level of my chamber, I used pfeiffer TPG216 single gauge.

I installed "baseR-3.14.12.1" and "synApps_5.6".
Directory is following

$HOME(or any directory where you want)/EPICS/base
$HOME(or any directory where you want)/EPICS/modules/synApps_5_6/support/ip-2-13
$HOME(or any directory where you want)/EPICS/modules/synApps_5_6/support/asyn-4-18
$HOME(or any directory where you want)/EPICS/modules/synApps_5_6/support/ipac-2-11
$HOME(or any directory where you want)/EPICS/modules/synApps_5_6/support/seq-2-1-3

and so on.


I would like to use "ip" which have db and sorce codes for TPG261 model.
when I execute ipApp with st.cmd, what only I can get is following messages.


2013/08/22 21:17:33.179 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:SP2S message too small=0
2013/08/22 21:17:35.279 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:SP1S message too small=0
2013/08/22 21:17:37.379 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:SP2V message too small=0
2013/08/22 21:17:39.479 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:STATUS message too small=0
2013/08/22 21:17:41.579 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:PRES message too small=0
2013/08/22 21:17:43.679 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:UNIT message too small=0
2013/08/22 21:17:45.779 devTPG261::devTPG261Callback Cmd Vacuum:tpg261:SP2S message too small=0


Could you help me with this problem ?


linux(Ubuntu12.04 LTS) computer and TPG261 connection is not, Should any device be connected?


Thanks
--
Sanguk Won



Replies:
Re: TPG261 : "message too small=0" for EPICS Sanguk Won
References:
RE: TPG261 : "message too small=0" for EPICS Mark Rivers
Re: TPG261 : "message too small=0" for EPICS Sanguk Won

Navigate by Date:
Prev: Re: TPG261 : "message too small=0" for EPICS Sanguk Won
Next: RE: EhterCAT terminals [SEC=UNOFFICIAL] LYNCH, Damien
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: TPG261 : "message too small=0" for EPICS Sanguk Won
Next: Re: TPG261 : "message too small=0" for EPICS Sanguk Won
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·