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  2016  <2017 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
<== Date ==> <== Thread ==>

Subject: RE: RE: RE: RE: Re: IOC Connecting Problem
From: "Pilkyu Jung"<pilkyu@bmii.co.kr>
To: Mark Rivers <rivers@cars.uchicago.edu>
Cc: yjkim@kaeri.re.kr, tech-talk@aps.anl.gov
Date: Mon, 06 Mar 2017 15:08:07 +0900
Dear Mark,

First of all, thank you for your long and kind emails.
When I used "*IDN?" command with telnet on port 5024, it took about 7.5 seconds.
Also, I set "ReplyTimeout = 10000;" to get 10 seconds response when I uses port 5205.
When I use port 5024, it seems that 7.5 seconds is needed only for its network connection.
Finally, I can understand that Agilent scope and DG645 behave differently. I spent that a long time to understand your explanation. Now, I fully understand it.
Thank you for your helpful answer!

Best Regards,
Pilkyu Jung


---------- Original Message ----------
 From: "Mark Rivers" <rivers@cars.uchicago.edu>
 Date: 2017-03-02 22:39
 Subject: RE: RE: RE: Re: IOC Connecting Problem
 To: "Pilkyu Jung" <pilkyu@bmii.co.kr>
 Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>,"yjkim@kaeri.re.kr" <yjkim@kaeri.re.kr>
I cannot explain why it takes 7.5 seconds for the device to reply to "*IDN?" on port 5024 and why it never replies within 10 seconds on port 5025.

When you interactively send the "*IDN?" command with telnet on port 5024 does it respond quickly or does it also take 7.5 seconds?

What timeout are you using in your StreamDevice protocol file?

Note that the fact that the Agilent scope and the DG645 both use ports 5024 and 5025 is because those are defined as SCPI-telnet and SCPI-raw respectively. But they may behave differently on the 2 devices.

Mark

________________________________
From: Pilkyu Jung [pilkyu@bmii.co.kr]
Sent: Wednesday, March 01, 2017 6:39 PM
To: Mark Rivers
Cc: tech-talk@aps.anl.gov; yjkim@kaeri.re.kr
Subject: RE: RE: RE: Re: IOC Connecting Problem

Dear Mark,
Most of all, Thank you for your kind answer.
Here is your question and my answer.

Ø What happens if you simply connect to port 5024 with drvAsynIPPortConfigure? Do you get an error?

-> No, I don't have error. It works well. Just needed about 7 seconds more for connecting. I guess this section is different.
Like this,
--------------------------------------------------------------------------------
2017/02/27 14:14:05.325 P1 get Eos 0
2017/02/27 14:14:05.325 P1 set Eos 0
2017/02/27 14:14:05.325 192.168.1.73:5024 write.
2017/02/27 14:14:05.325 192.168.1.73:5024 write 6
*IDN?\r
2017/02/27 14:14:05.325 wrote 6 to 192.168.1.73:5024, return asynSuccess.
2017/02/27 14:14:05.326 P1 wrote
*IDN?\r
2017/02/27 14:14:05.326 P1 set Eos 0
2017/02/27 14:14:05.326 P1 addr -1 queueRequest priority 0 from lockHolder
2017/02/27 14:14:05.326 P1 schedule queueRequest timeout
2017/02/27 14:14:05.326 asynManager::portThread port=P1 callback
2017/02/27 14:14:05.326 192.168.1.73:5024 read.
epics> 2017/02/27 14:14:12.827 192.168.1.73:5024 read 3
\377\373\001
2017/02/27 14:14:12.827 P1 read
\377\373\001
2017/02/27 14:14:12.827 192.168.1.73:5024 read.
2017/02/27 14:14:12.828 192.168.1.73:5024 read 3
\377\373\003
2017/02/27 14:14:12.828 P1 read
\377\373\003
2017/02/27 14:14:12.828 192.168.1.73:5024 read.
2017/02/27 14:14:12.829 192.168.1.73:5024 read 42
Welcome to Agilent 0 InfiniiVision - 0\r\n>>
2017/02/27 14:14:12.829 P1 read
Welcome to Agilent 0 InfiniiVision - 0\r\n>>
2017/02/27 14:14:12.829 192.168.1.73:5024 read.
2017/02/27 14:14:12.830 192.168.1.73:5024 read 7
*IDN?\r\n
2017/02/27 14:14:12.830 P1 read
*IDN?\r\n
2017/02/27 14:14:12.830 192.168.1.73:5024 read.
2017/02/27 14:14:12.883 192.168.1.73:5024 read 64
AGILENT TECHNOLOGIES,DSO-X 3052A,MY51138324,02.37.2014052001\r\n>>
2017/02/27 14:14:12.883 P1 read
AGILENT TECHNOLOGIES,DSO-X 3052A,MY51138324,02.37.2014052001\r\n>>
2017/02/27 14:14:12.884 192.168.1.73:5024 read.
--------------------------------------------------------------------------------
But, I have never seen like this delay before. That's why I am confused.

Ø How does it fail?
-> I am not sure. There is no reply.
--------------------------------------------------------------------------------
2017/02/27 14:10:24.799 P1 get Eos 0
2017/02/27 14:10:24.799 P1 set Eos 0
2017/02/27 14:10:24.799 192.168.1.73:5025 write.
2017/02/27 14:10:24.799 192.168.1.73:5025 write 6
*IDN?\r
2017/02/27 14:10:24.799 wrote 6 to 192.168.1.73:5025, return asynSuccess.
2017/02/27 14:10:24.799 P1 wrote
*IDN?\r
2017/02/27 14:10:24.799 P1 set Eos 0
2017/02/27 14:10:24.799 P1 addr -1 queueRequest priority 0 from lockHolder
2017/02/27 14:10:24.799 P1 schedule queueRequest timeout
2017/02/27 14:10:24.799 asynManager::portThread port=P1 callback
2017/02/27 14:10:24.799 192.168.1.73:5025 read.
epics> 2017/02/27 14:10:34.809529 P1 10MeV:TM:IDN: No reply from device within 10000 ms
epics>
--------------------------------------------------------------------------------

I hope to know that why it is different between 5024 and 5025.
Also, when I check the DG645, it is connected well with IOC via port 5024, 5025.



p.s. the output when the IOC starts with special commands
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
osc IOC with port 5024

localhost.localdomain[175]# st.cmd
#!../../bin/linux-x86_64/osc
< envPaths
epicsEnvSet("ARCH","linux-x86_64")
epicsEnvSet("IOC","iocosc")
epicsEnvSet("TOP","/home/anothel/Desktop/osc")
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/osc/db"
epicsEnvSet "P" "10MeV:"
epicsEnvSet "R" "TM:"
epicsEnvSet "TCP1" "192.168.1.73:5024"
cd /home/anothel/Desktop/osc
dbLoadDatabase "dbd/osc.dbd"
osc_registerRecordDeviceDriver pdbbase
drvAsynIPPortConfigure("P1","192.168.1.73:5024",0,0,0)
##asynSetTraceIOMask("P1", -1, 0x2)
##asynSetTraceMask("P1", -1, 0x9)
asynSetTraceIOMask(P1, -1, 2)
asynSetTraceMask(P1, -1, 255)
##dbLoadRecords("db/devosc.db","P=$(P),R=$(R),PORT1 =P1 ,A=1")
dbLoadRecords(db/devosc.db, "P=10MeV:, R=TM:, PORT1=P1, A=1")
cd /home/anothel/Desktop/osc/iocBoot/iocosc
iocInit
Starting iocInit
############################################################################
## EPICS R3.14.12.5 $Date: Tue 2015-03-24 09:57:35 -0500$
## EPICS Base built Nov 22 2016
############################################################################
2017/02/27 14:14:05.324 P1 addr -1 queueRequest priority 0 not lockHolder
2017/02/27 14:14:05.324 P1 schedule queueRequest timeout
2017/02/27 14:14:05.324 asynManager::portThread port=P1 callback
2017/02/27 14:14:05.324 P1 addr -1 queueRequest priority 0 not lockHolder
2017/02/27 14:14:05.324 P1 schedule queueRequest timeout
2017/02/27 14:14:05.324 asynManager::portThread port=P1 callback
2017/02/27 14:14:05.324 192.168.1.73:5024 read.
iocRun: All initialization complete
## Start any sequence programs
#seq sncxxx,"user=anothel"
2017/02/27 14:14:05.325 P1 get Eos 0
2017/02/27 14:14:05.325 P1 set Eos 0
2017/02/27 14:14:05.325 192.168.1.73:5024 write.
2017/02/27 14:14:05.325 192.168.1.73:5024 write 6
*IDN?\r
2017/02/27 14:14:05.325 wrote 6 to 192.168.1.73:5024, return asynSuccess.
2017/02/27 14:14:05.326 P1 wrote
*IDN?\r
2017/02/27 14:14:05.326 P1 set Eos 0
2017/02/27 14:14:05.326 P1 addr -1 queueRequest priority 0 from lockHolder
2017/02/27 14:14:05.326 P1 schedule queueRequest timeout
2017/02/27 14:14:05.326 asynManager::portThread port=P1 callback
2017/02/27 14:14:05.326 192.168.1.73:5024 read.
epics> 2017/02/27 14:14:12.827 192.168.1.73:5024 read 3
\377\373\001
2017/02/27 14:14:12.827 P1 read
\377\373\001
2017/02/27 14:14:12.827 192.168.1.73:5024 read.
2017/02/27 14:14:12.828 192.168.1.73:5024 read 3
\377\373\003
2017/02/27 14:14:12.828 P1 read
\377\373\003
2017/02/27 14:14:12.828 192.168.1.73:5024 read.
2017/02/27 14:14:12.829 192.168.1.73:5024 read 42
Welcome to Agilent 0 InfiniiVision - 0\r\n>>
2017/02/27 14:14:12.829 P1 read
Welcome to Agilent 0 InfiniiVision - 0\r\n>>
2017/02/27 14:14:12.829 192.168.1.73:5024 read.
2017/02/27 14:14:12.830 192.168.1.73:5024 read 7
*IDN?\r\n
2017/02/27 14:14:12.830 P1 read
*IDN?\r\n
2017/02/27 14:14:12.830 192.168.1.73:5024 read.
2017/02/27 14:14:12.883 192.168.1.73:5024 read 64
AGILENT TECHNOLOGIES,DSO-X 3052A,MY51138324,02.37.2014052001\r\n>>
2017/02/27 14:14:12.883 P1 read
AGILENT TECHNOLOGIES,DSO-X 3052A,MY51138324,02.37.2014052001\r\n>>
2017/02/27 14:14:12.884 192.168.1.73:5024 read.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

osc IOC with port 5025

localhost.localdomain[153]# st.cmd
#!../../bin/linux-x86_64/osc
< envPaths
epicsEnvSet("ARCH","linux-x86_64")
epicsEnvSet("IOC","iocosc")
epicsEnvSet("TOP","/home/anothel/Desktop/osc")
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/osc/db"
epicsEnvSet "P" "10MeV:"
epicsEnvSet "R" "TM:"
epicsEnvSet "TCP1" "192.168.1.73:5025"
cd /home/anothel/Desktop/osc
dbLoadDatabase "dbd/osc.dbd"
osc_registerRecordDeviceDriver pdbbase
drvAsynIPPortConfigure("P1","192.168.1.73:5025",0,0,0)
##asynSetTraceIOMask("P1", -1, 0x2)
##asynSetTraceMask("P1", -1, 0x9)
asynSetTraceIOMask(P1, -1, 2)
asynSetTraceMask(P1, -1, 255)
##dbLoadRecords("db/devosc.db","P=$(P),R=$(R),PORT1 =P1 ,A=1")
dbLoadRecords(db/devosc.db, "P=10MeV:, R=TM:, PORT1=P1, A=1")
cd /home/anothel/Desktop/osc/iocBoot/iocosc
iocInit
Starting iocInit
############################################################################
## EPICS R3.14.12.5 $Date: Tue 2015-03-24 09:57:35 -0500$
## EPICS Base built Nov 22 2016
############################################################################
2017/02/27 14:10:24.798 P1 addr -1 queueRequest priority 0 not lockHolder
2017/02/27 14:10:24.798 P1 schedule queueRequest timeout
2017/02/27 14:10:24.798 asynManager::portThread port=P1 callback
2017/02/27 14:10:24.798 P1 addr -1 queueRequest priority 0 not lockHolder
2017/02/27 14:10:24.798 P1 schedule queueRequest timeout
2017/02/27 14:10:24.798 asynManager::portThread port=P1 callback
2017/02/27 14:10:24.798 192.168.1.73:5025 read.
iocRun: All initialization complete
## Start any sequence programs
#seq sncxxx,"user=anothel"
2017/02/27 14:10:24.799 P1 get Eos 0
2017/02/27 14:10:24.799 P1 set Eos 0
2017/02/27 14:10:24.799 192.168.1.73:5025 write.
2017/02/27 14:10:24.799 192.168.1.73:5025 write 6
*IDN?\r
2017/02/27 14:10:24.799 wrote 6 to 192.168.1.73:5025, return asynSuccess.
2017/02/27 14:10:24.799 P1 wrote
*IDN?\r
2017/02/27 14:10:24.799 P1 set Eos 0
2017/02/27 14:10:24.799 P1 addr -1 queueRequest priority 0 from lockHolder
2017/02/27 14:10:24.799 P1 schedule queueRequest timeout
2017/02/27 14:10:24.799 asynManager::portThread port=P1 callback
2017/02/27 14:10:24.799 192.168.1.73:5025 read.
epics> 2017/02/27 14:10:34.809529 P1 10MeV:TM:IDN: No reply from device within 10000 ms
epics>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

osc telnet port 5024

localhost.localdomain[192]# telnet 192.168.1.73 5024
Trying 192.168.1.73...
Connected to 192.168.1.73.
Escape character is '^]'.
Welcome to Agilent 0 InfiniiVision - 0
>>*IDN?
AGILENT TECHNOLOGIES,DSO-X 3052A,MY51138324,02.37.2014052001
>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

osc telnet 5025

localhost.localdomain[191]# telnet 192.168.1.73 5025
Trying 192.168.1.73...
Connected to 192.168.1.73.
Escape character is '^]'.
*IDN?
AGILENT TECHNOLOGIES,DSO-X 3052A,MY51138324,02.37.2014052001
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Best Regards,
Pilkyu Jung



---------- Original Message ----------
From: "Mark Rivers"
Date: 2017-02-24 03:03
Subject: RE: RE: Re: IOC Connecting Problem
To: "'Pilkyu Jung'"
Cc: "Rod Nussbaumer" ,"tech-talk@aps.anl.gov" ,"yjkim@kaeri.re.kr"

Ø I used port 5024 (successful, but when it start, the telnet connection required)

What do you mean by “the telnet connection required”? What happens if you simply connect to port 5024 with drvAsynIPPortConfigure? Do you get an error?


Ø and 5025(failed).

How does it fail?

If I understand correctly you are concerned about 2 things:


- Using port 5024 works but you think it may have poorer performance because it is a “telnet” port?

- Using port 5025 does not work?

Can you send the output when the IOC starts with these commands first when using port 5024 and then again when using port 5025

drvAsynIPPortConfigure(P1, 192.168.1.73:5024, 0, 0, 0)
asynSetTraceIOMask(P1, -1, 2)
asynSetTraceMask(P1, -1, 255)
dbLoadRecords(db/devosc.db, P=10MeV:, R=TM:, PORT1=P1, A=1)
iocInit

Mark





From: Pilkyu Jung [mailto:pilkyu@bmii.co.kr]
Sent: Thursday, February 23, 2017 3:30 AM
To: Mark Rivers
Cc: Rod Nussbaumer; tech-talk@aps.anl.gov; yjkim@kaeri.re.kr
Subject: RE: RE: Re: IOC Connecting Problem

Dear Mark,
First of all, I appreciate your kind Email. I didn't know about the synApps "delayGen" module. I am going to try to use it.

Yes, I am trying to connect an Agilent oscilloscope to IOC. A DG645 was just an example that I connected with IOC before.
I checked there are two parts of connection(port 5024, 5025) in the case of the DG645. also, There are two parts of connection(port 5024, 5025) in the case of the Agilent oscilloscope.
So, I have thought that this is similar. However, when I tried to connect the Agilent oscilloscope to IOC, I used port 5024(successful, but when it start, the telnet connection required) and 5025(failed).
In the case of delay generator, I have used port 5025 which was successful with nothing telnet connecting first.
I am not sure whether I express my opinion properly. Thank you so much to read my Email. If you have any confusing things, would you let me know?

Best Regards,
Pilkyu

---------- Original Message ----------
From: "Mark Rivers"
Date: 2017-02-23 12:15
Subject: RE: Re: IOC Connecting Problem
To: "Pilkyu Jung" ,"Rod Nussbaumer"
Cc: "tech-talk@aps.anl.gov"
I suspect the difference between the telnet port 5024 and the bare socket probably has to do with line terminators and perhaps other things that it does to make the telnet connection easier to use with an interactive terminal session.

I am confused what device you are actually trying to talk to. Earlier today you mentioned an Agilent oscilloscope, but now you are referring to the DG645 delay generator. Note that there is already an asyn driver for the DG645 in the synApps "delayGen" module.

Mark

________________________________
From: tech-talk-bounces@aps.anl.gov [tech-talk-bounces@aps.anl.gov] on behalf of Pilkyu Jung [pilkyu@bmii.co.kr]
Sent: Wednesday, February 22, 2017 8:01 PM
To: Rod Nussbaumer
Cc: tech-talk@aps.anl.gov
Subject: RE: Re: IOC Connecting Problem

Rod:
Thanks a lot. Your comment is very helpful.
I have thought that It is different between Telnet and TCP communication, because there are two kind of communication in case of delay generator.
I attached delay generator's manual(http://www.thinksrs.com/downloads/PDFs/Manuals/DG645m.pdf).
As you can see, there are difference in page 44, operation 30, Table 14: NET Menu Options for TCP/IP Configuration.
Could you let me know what is different between Bare socket interface(port 5025) and Telnet interface(port 5024)?
In my case, I have used only port 5025 for connecting IOC.
I hope you have a nice day.


Best Regards,
Pilkyu



---------- Original Message ----------
From: "Rod Nussbaumer"
Date: 2017-02-23 01:56
Subject: Re: IOC Connecting Problem
To: "Pilkyu Jung"

Telnet is simply doing the same kinds of TCP communication that the IOC
asynPort does. The connection seen by the oscilloscope is the same for a
telnet session as it is for an EPICS asynPort connection. In telnet, you
send commands interactively. The IOC sends commands as part of the
program algorithm. The data transferred is the same, and the scope
doesn't see any difference.

The port number is part of the IP address used to make the TCP
connection, so that is why it must be correct in order for the
connection to succeed.

I don't quite understand your last question. If you don't want to use a
telnet-like connection between the scope and the IOC, then you will need
to use some other kind of interface. Perhaps your scope is equipped with
GPIB or serial ports. These work equally well from the standpoint of
compatibility with EPICS asyn + streamDevice support.

I hope this helps.

--- rod.



On 02/21/2017 11:24 PM, Pilkyu Jung wrote:
> Rod:
>
> First of all, I appreciate your advice. It was very helpful.
> By the way, I have tried to use port 5024 and 5025.
> But, now IOC worked with port 5024, not port 5025.
>
> Can I ask you a question one more?
>
> When I use port 5024, the device worked with telnet automatically.
> Like a Image file(16:18:10) that I attached a image file.
> However, I guess it should more fast without connecting telnet.
> At least, when I connect other device, didn't connect telnet.
>
> and when I use port 5025, it doesn't work.
> So, Could you let me know how can I use this oscilloscope on IOC without
> telnet connecting like other devices?
>
> best regards,
> Pilkyu
>
>
>
> On 02/16/2017 11:15 PM, Rod Nussbaumer wrote:
>> Pilkyu:
>>
>> In your telnet connection, you use port 5024, but in the asyn port
>> connection, you are attempting to use port 5025. This is quite likely
>> one cause of your problem.
>>
>> Rod Nussbaumer
>> TRIUMF
>> Vancouver, Canada
>>
>> On 02/15/2017 10:29 PM, Pilkyu Jung wrote:
>>> Hi all,
>>>
>>>
>>> First of all, I am trying to connect from a oscilloscope which name is
>>> Agilent Technologies DSO-X 3052A (500 MHz 4 GSa/s) to IOC.
>>>
>>> As you can see in the
>>> manual(http://literature.cdn.keysight.com/litweb/pdf/75019-97073.pdf ,
>>> http://www.keysight.com/upload/cmc_upload/All/3000_series_prog_guide.pdf),
>>>
>>>
>>> this oscilloscope support a few ways (e.g. the IO Library, Telnet
>>> Sockets, and using Browser Web Control) for sending SCPI.
>>>
>>> However, When I connect to IOC, I got a problem. Until now, I just
>>> connected only adjust IP address in st.cmd.
>>>
>>>
>>> Like this,
>>>
>>> drvAsynIPPortConfigure("P1",169.254.90.3:5025,0,0,0)
>>>
>>>
>>> When I connect by telnet, it is done successfully (please check the
>>> Screenshot...image file).
>>>
>>> I don't know why this device can't be connected to IOC in this case.
>>> Definitely I am done with this way before, but now I can't.
>>>
>>>
>>> Here is my question,
>>>
>>>
>>> 1. Normally, when you connect from device to IOC, what kind of method
>>> use?
>>>
>>> 2. In my case, How can I connect to IOC?
>>>
>>>
>>> Best Regards,
>>>
>>> Pilkyu Jung
>>>
>>>
>>
>>
>



[Image removed by sender.]




Navigate by Date:
Prev: Re: Problem with EPICS Ralph Lange
Next: CaQtDM installation error on scientific linux 7.2 Arnab Dasgupta
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
Navigate by Thread:
Prev: Re: IOC Connecting Problem Rod Nussbaumer
Next: EDM compiling problems lzf neu
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
ANJ, 06 Mar 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·