Send Tech-talk mailing list submissions to
tech-talk at aps.anl.gov To subscribe or unsubscribe via the World Wide Web, visit
https://mailman.aps.anl.gov/mailman/listinfo/tech-talk or, via email, send a message with subject or body 'help' to
tech-talk-request at aps.anl.gov You can reach the person managing the list at
tech-talk-owner at aps.anl.gov When replying, please edit your Subject line so it is more specific
than "Re: Contents of Tech-talk digest..."
Today's Topics:
1. RE: Faster Scan Rates possible? (Manoussakis, Adamandios)
2. RE: serial IOC connection problem (Ivashkevych, Oksana)
3. RE: Faster Scan Rates possible? (Manoussakis, Adamandios)
4. Re: serial IOC connection problem (Mark Rivers)
5. RE: serial IOC connection problem (Ivashkevych, Oksana)
----------------------------------------------------------------------
Message: 1
Date: Wed, 9 Dec 2020 21:36:35 +0000
From: "Manoussakis, Adamandios" <
manoussakis1 at llnl.gov>
To: EPICS tech-talk <
tech-talk at aps.anl.gov>
Subject: RE: Faster Scan Rates possible?
Message-ID:
<
BY5PR09MB50280AC6B12984852FFDDB7EF1CC0 at BY5PR09MB5028.namprd09.prod.outlook.com>
Content-Type: text/plain; charset="utf-8"
Also mark just to make sure I understood Passive,Event,IO Intr are always at the top and do not have any priority assigned due to being event driven and then the next menuScans are from slowest to fastest which are assigned also lower to highest priority 10s being lowest priority and .1 second being highest priority assigned?
menu(menuScan) {
choice(menuScanPassive,"Passive")
choice(menuScanEvent,"Event")
choice(menuScanI_O_Intr,"I/O Intr")
choice(menuScan10_second,"10 second")
choice(menuScan5_second,"5 second")
choice(menuScan2_second,"2 second")
choice(menuScan1_second,"1 second")
choice(menuScan_5_second,".5 second")
choice(menuScan_2_second,".2 second")
choice(menuScan_1_second,".1 second")
}
From: Tech-talk <
tech-talk-bounces at aps.anl.gov> On Behalf Of Manoussakis, Adamandios via Tech-talk
Sent: Wednesday, December 9, 2020 1:33 PM
To: EPICS tech-talk <
tech-talk at aps.anl.gov>
Subject: RE: Faster Scan Rates possible?
Thanks Mark/Andrew for the insigh, is there any rule of thumb for how fast you can setup a SCAN rate in that dbd file for any current line of CPU (assuming more cores would help with threading and higher clock speeds). Is it safe to say go to .01 .001 on current gen cpu hardware?
From: Johnson, Andrew N. <
anj at anl.gov<mailto:
anj at anl.gov>>
Sent: Wednesday, December 9, 2020 1:21 PM
To: Manoussakis, Adamandios <
manoussakis1 at llnl.gov<mailto:
manoussakis1 at llnl.gov>>
Cc: EPICS tech-talk <
tech-talk at aps.anl.gov<mailto:
tech-talk at aps.anl.gov>>
Subject: Re: Faster Scan Rates possible?
Hi,
On Dec 9, 2020, at 3:14 PM, Manoussakis, Adamandios via Tech-talk <
tech-talk at aps.anl.gov<mailto:
tech-talk at aps.anl.gov>> wrote:
I have been looking at older posts and have seen talk of increasing the scan rate from the default (I think) .1seconds but no definitive guide on how to? On a standard linux distro without RT_PREEMPT, is it possible to push to say .01 or faster scan rates? Also I wanted to know does camonitor only update as fast as the scan rate limit, .1seconds currently?
There is no internal connection between CA monitor rates and the DB scan rates, it very much depends on your CPU, your IOC application and the clients you have connected as to how fast you would be able to run a periodic scan thread that sends out monitors. Note that the IOC?s CA server can and does throw away monitor updates if the clients can?t keep up, so don?t design your systems assuming that your clients will always get every monitor if you?re running at high speeds.
HTH,
- Andrew
--
Complexity comes for free, simplicity you have to work for.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://mailman.aps.anl.gov/pipermail/tech-talk/attachments/20201209/46068f11/attachment.html>
------------------------------
Message: 2
Date: Wed, 9 Dec 2020 21:39:02 +0000
From: "Ivashkevych, Oksana" <
oksana at bnl.gov>
To: Mark Rivers <
rivers at cars.uchicago.edu>
Cc: "
tech-talk at aps.anl.gov" <
tech-talk at aps.anl.gov>
Subject: RE: serial IOC connection problem
Message-ID:
<
BLAPR09MB7361D5E5874CD6871A6EF80FD3CC0 at BLAPR09MB7361.namprd09.prod.outlook.com>
Content-Type: text/plain; charset="us-ascii"
Hi Mark,
Thank you very much for being thorough and suspicious.
It still works without errors.
And I gladly express my happy wows one more time. :)
With this line present you won't even see error messages.
Could you please elaborate on this, I did see connection errors before implementing the fix you suggested, right?
Oksana
[oksana@xf16id-babyioc1 ftsioc]$ ../../bin/linux-x86_64/ftsioc st.cmd
#!../../bin/linux-x86_64/ftsioc
< envPaths
epicsEnvSet("IOC","ftsioc")
epicsEnvSet("TOP","/home/oksana/ftsioc")
epicsEnvSet("SUPPORT","/opt/epics/support")
epicsEnvSet("ASYN","/opt/epics/support/asyn")
epicsEnvSet("CALC","/opt/epics/support/calc")
epicsEnvSet("STREAM","/opt/epics/support/StreamDevice")
epicsEnvSet("DEVIOCSTATS","/opt/epics/support/iocStats")
epicsEnvSet("AUTOSAVE","/opt/epics/support/autosave")
epicsEnvSet("EPICS_BASE","/opt/epics/epics-base")
epicsEnvSet("STREAM_PROTOCOL_PATH", "../../ftsiocApp/Db")
epicsEnvSet("PREFIX", "XF:16IDC-ES:LIX")
epicsEnvSet("FTS_IP", "10.16.2.195:49151 HTTP")
epicsEnvSet("PORT", "FTS")
## Register all support components
dbLoadDatabase("../../dbd/ftsioc.dbd",0,0)
ftsioc_registerRecordDeviceDriver(pdbbase)
drvAsynIPPortConfigure("FTS", "10.16.2.195:49151 HTTP")
## Load record instances
dbLoadRecords("../../db/fts.db","P=XF:16IDC-ES:LIX,R={FTS:2},PORT=FTS,user=oksana")
iocInit()
Starting iocInit
############################################################################
## EPICS R7.0.3.1
## EPICS Base built Dec 1 2020
############################################################################
iocRun: All initialization complete
## Start any sequence programs
#seq sncftsioc,"user=oksana"
epics>
-----Original Message-----
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Wednesday, December 09, 2020 3:57 PM
To: Ivashkevych, Oksana <oksana at bnl.gov>
Cc: tech-talk at aps.anl.gov
Subject: Re: serial IOC connection problem
Hi Oksana,
it looks like I forgot to remove asynSetTraceMask( "FTS",0,0).
Yes, you should comment out or remove this line. With this line present you
won't even see error messages.
asynSetTraceMask( "FTS",0,0)
Mark
________________________________
From: Ivashkevych, Oksana <oksana at bnl.gov>
Sent: Wednesday, December 9, 2020 2:53 PM
To: Mark Rivers
Cc: tech-talk at aps.anl.gov
Subject: RE: serial IOC connection problem
Hi Mark,
Yes, this is exactly what I did , and it looks like I forgot to remove
asynSetTraceMask( "FTS",0,0).
Oksana
[oksana@xf16id-babyioc1 ftsioc]$ vim st.cmd
[oksana@xf16id-babyioc1 ftsioc]$ ../../bin/linux-x86_64/ftsioc st.cmd
#!../../bin/linux-x86_64/ftsioc < envPaths
epicsEnvSet("IOC","ftsioc")
epicsEnvSet("TOP","/home/oksana/ftsioc")
epicsEnvSet("SUPPORT","/opt/epics/support")
epicsEnvSet("ASYN","/opt/epics/support/asyn")
epicsEnvSet("CALC","/opt/epics/support/calc")
epicsEnvSet("STREAM","/opt/epics/support/StreamDevice")
epicsEnvSet("DEVIOCSTATS","/opt/epics/support/iocStats")
epicsEnvSet("AUTOSAVE","/opt/epics/support/autosave")
epicsEnvSet("EPICS_BASE","/opt/epics/epics-base")
epicsEnvSet("STREAM_PROTOCOL_PATH", "../../ftsiocApp/Db")
epicsEnvSet("PREFIX", "XF:16IDC-ES:LIX")
epicsEnvSet("FTS_IP", "10.16.2.195:49151 HTTP")
epicsEnvSet("PORT", "FTS")
## Register all support components
dbLoadDatabase("../../dbd/ftsioc.dbd",0,0)
ftsioc_registerRecordDeviceDriver(pdbbase)
drvAsynIPPortConfigure("FTS", "10.16.2.195:49151 HTTP"
## Load record instances
dbLoadRecords("../../db/fts.db","P=XF:16IDC-
ES:LIX,R={FTS:2},PORT=FTS,user=oksana")
#asynSetTraceMask( "FTS",0,255)
asynSetTraceMask( "FTS",0,0)
iocInit()
Starting iocInit
##########################################################
##################
## EPICS R7.0.3.1
## EPICS Base built Dec 1 2020
##########################################################
##################
iocRun: All initialization complete
#asynSetTraceMask( "FTS",0,0)
## Start any sequence programs
#seq sncftsioc,"user=oksana"
epics> dbl
[oksana@xf16id-babyioc1 Db]$ more fts.proto Timeout=10000; Terminator =
"";
read{
MaxInput = 16;
out
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00%0.2
r\x00\x00";
in "\x12\x34%(A)02r%(B)2r%(C)2r%(D)2r%(E)2r%(F)2r%(G)2r";
}
readCalibration {
MaxInput = 24;
out
"\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00
\x00\x00\x00";
in
"\x12\x34%(A)01r%(B)01r%(C)04r%(D)04r%(E)02r%(F)02r%(G)02r%(H)02r%(I
)02r%(J)02r";
disconnect;
@init {
out
"\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00
\x00\x00\x00";
in
"\x12\x34%(A)01r%(B)01r%(C)04r%(D)04r%(E)02r%(F)02r%(G)02r%(H)02r%(I
)02r%(J)02r";
}
}
[oksana@xf16id-babyioc1 Db]$
-----Original Message-----
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Wednesday, December 09, 2020 3:48 PM
To: Ivashkevych, Oksana <oksana at bnl.gov>
Cc: tech-talk at aps.anl.gov
Subject: Re: serial IOC connection problem
Hi Oksana,
Just to be clear, did you add HTTP to the drvAsynIPPortConfigure
command, and remove the "disconnect" commands from the protocol file?
Mark
________________________________
From: Ivashkevych, Oksana <oksana at bnl.gov>
Sent: Wednesday, December 9, 2020 2:35 PM
To: Mark Rivers
Cc: tech-talk at aps.anl.gov
Subject: RE: serial IOC connection problem
Hi Mark,
Thank you very much!
Not a single squeak!
I may suggest considering adding "164.54.17.43:5186 HTTP" to the list
of examples in the link you shared.
Thanks again,
Oksana
-----Original Message-----
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Wednesday, December 09, 2020 2:15 PM
To: Ivashkevych, Oksana <oksana at bnl.gov>
Cc: tech-talk at aps.anl.gov
Subject: Re: serial IOC connection problem
Hi Oksana,
It may be that this device wants to just do a single transaction per
connection. That is how Web servers work.
drvAsynIPPort supports that mode of operation directly.
https://urldefense.com/v3/__https://epics-
modules.github.io/master/asyn/R4-
41/asynDriver.html*drvAsynIPPort__;Iw!!P4SdNyxKAPE!Sz1Tm08wfhCbs3_
mnZgFXMFrf7-JRdetWpdz-RbQ7TG0ozHVy-fgl3g3QhaCrw$
You need to change this line:
drvAsynIPPortConfigure("FTS", "10.16.2.195:49151")
to this:
drvAsynIPPortConfigure("FTS", "10.16.2.195:49151 HTTP")
Once you do that I think you can remove the "disconnect" commands
from the protocol file.
If you still have trouble please turn on ASYN_TRACEIO_DRIVER for the
IP port and send the output.
Mark
________________________________
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of
Ivashkevych, Oksana via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, December 9, 2020 12:51 PM
To: tech-talk at aps.anl.gov
Subject: serial IOC connection problem
Hello,
I have been asked to port an existing Serial IOC for a Force Torque
Sensor from ATI from one server (Debian 7 with Debian packages dated
~ at least 5 years ago) to CentOS 7.
CentOS 7.7.1908; base R7.0.3.1; asyn R4-37; SerialDevice master.
After the ported recompiled IOC reported unrecoverable connection
error, I have created a brand new IOC using the latest
makeBaseApp.pl
script.
Errors became more dynamic, and I do see some readings, when IOC
does manage to connect successfully. I have browsed the Tech Talk
and found a related discussions about connecting/disconnecting.
Protocol file of this IOC does connects/disconnects after every
read and is very simple. I only can guess why the developer made
this decision, I am sure it was an unavoidable compromise. I did
add asynSetTraceMask call which changes temporarily the dynamic of
the errors. Logs and proto
are attached.
In summary: I have two iocs accessing same device: the old one
running on Debian 7, and the new on running CentOS 7. The old one
works without problem the new on reports connection errors and does
manage to read something at the frequency ~30 times slower than 0.1
expected scan. I am out of my own ideas, and would appreciate help
from the
community.
Thank you,
Oksana
------------------------------
Message: 3
Date: Wed, 9 Dec 2020 21:46:30 +0000
From: "Manoussakis, Adamandios" <
manoussakis1 at llnl.gov>
To: EPICS tech-talk <
tech-talk at aps.anl.gov>
Subject: RE: Faster Scan Rates possible?
Message-ID:
<
BY5PR09MB502803976A7BC276AB6B083AF1CC0 at BY5PR09MB5028.namprd09.prod.outlook.com>
Content-Type: text/plain; charset="us-ascii"
Thanks Mark, I will look into the I/O intr support and how we might be able to implement it.
-----Original Message-----
From: Mark Rivers <
rivers at cars.uchicago.edu>
Sent: Wednesday, December 9, 2020 1:43 PM
To: Manoussakis, Adamandios <
manoussakis1 at llnl.gov>
Subject: Re: Faster Scan Rates possible?
I have never changed the scan rates, so I am not sure about the priorities.
Note that increasing the periodic scan rates is not necessarily the best way to process records more quickly. Another way is to have the device support or driver support SCAN=I/O Intr. That is the approach that most drivers I have written use.
Mark
________________________________
From: Tech-talk <
tech-talk-bounces at aps.anl.gov> on behalf of Manoussakis, Adamandios via Tech-talk <
tech-talk at aps.anl.gov>
Sent: Wednesday, December 9, 2020 3:36 PM
To: EPICS tech-talk
Subject: RE: Faster Scan Rates possible?
Also mark just to make sure I understood Passive,Event,IO Intr are always at the top and do not have any priority assigned due to being event driven and then the next menuScans are from slowest to fastest which are assigned also lower to highest priority 10s being lowest priority and .1 second being highest priority assigned?
menu(menuScan) {
choice(menuScanPassive,"Passive")
choice(menuScanEvent,"Event")
choice(menuScanI_O_Intr,"I/O Intr")
choice(menuScan10_second,"10 second")
choice(menuScan5_second,"5 second")
choice(menuScan2_second,"2 second")
choice(menuScan1_second,"1 second")
choice(menuScan_5_second,".5 second")
choice(menuScan_2_second,".2 second")
choice(menuScan_1_second,".1 second")
}
From: Tech-talk <
tech-talk-bounces at aps.anl.gov> On Behalf Of Manoussakis, Adamandios via Tech-talk
Sent: Wednesday, December 9, 2020 1:33 PM
To: EPICS tech-talk <
tech-talk at aps.anl.gov>
Subject: RE: Faster Scan Rates possible?
Thanks Mark/Andrew for the insigh, is there any rule of thumb for how fast you can setup a SCAN rate in that dbd file for any current line of CPU (assuming more cores would help with threading and higher clock speeds). Is it safe to say go to .01 .001 on current gen cpu hardware?
From: Johnson, Andrew N. <
anj at anl.gov<mailto:
anj at anl.gov>>
Sent: Wednesday, December 9, 2020 1:21 PM
To: Manoussakis, Adamandios <
manoussakis1 at llnl.gov<mailto:
manoussakis1 at llnl.gov>>
Cc: EPICS tech-talk <
tech-talk at aps.anl.gov<mailto:
tech-talk at aps.anl.gov>>
Subject: Re: Faster Scan Rates possible?
Hi,
On Dec 9, 2020, at 3:14 PM, Manoussakis, Adamandios via Tech-talk <
tech-talk at aps.anl.gov<mailto:
tech-talk at aps.anl.gov>> wrote:
I have been looking at older posts and have seen talk of increasing the scan rate from the default (I think) .1seconds but no definitive guide on how to? On a standard linux distro without RT_PREEMPT, is it possible to push to say .01 or faster scan rates? Also I wanted to know does camonitor only update as fast as the scan rate limit, .1seconds currently?
There is no internal connection between CA monitor rates and the DB scan rates, it very much depends on your CPU, your IOC application and the clients you have connected as to how fast you would be able to run a periodic scan thread that sends out monitors. Note that the IOC's CA server can and does throw away monitor updates if the clients can't keep up, so don't design your systems assuming that your clients will always get every monitor if you're running at high speeds.
HTH,
- Andrew
--
Complexity comes for free, simplicity you have to work for.
------------------------------
Message: 4
Date: Wed, 9 Dec 2020 21:51:27 +0000
From: Mark Rivers <
rivers at cars.uchicago.edu>
To: "Ivashkevych, Oksana" <
oksana at bnl.gov>
Cc: "
tech-talk at aps.anl.gov" <
tech-talk at aps.anl.gov>
Subject: Re: serial IOC connection problem
Message-ID: <
2ad25233faa042eea2d8e2b16cd4360b at cars.uchicago.edu>
Content-Type: text/plain; charset="iso-8859-1"
Could you please elaborate on this, I did see connection errors before implementing the fix you suggested, right?
Yes, you saw connection errors. But in the serial_iocLog1.txt file you sent previously, which had the error messages, you had these lines just before iocInit:
#asynSetTraceMask( "FTS",0,255)
#asynSetTraceMask( "FTS",0,0)
So the line disabling the error messages was commented out.
Mark
________________________________
From: Ivashkevych, Oksana <
oksana at bnl.gov>
Sent: Wednesday, December 9, 2020 3:39 PM
To: Mark Rivers
Cc:
tech-talk at aps.anl.gov Subject: RE: serial IOC connection problem
Hi Mark,
Thank you very much for being thorough and suspicious.
It still works without errors.
And I gladly express my happy wows one more time. :)
With this line present you won't even see error messages.
Could you please elaborate on this, I did see connection errors before implementing the fix you suggested, right?
Oksana
[oksana@xf16id-babyioc1 ftsioc]$ ../../bin/linux-x86_64/ftsioc st.cmd
#!../../bin/linux-x86_64/ftsioc
< envPaths
epicsEnvSet("IOC","ftsioc")
epicsEnvSet("TOP","/home/oksana/ftsioc")
epicsEnvSet("SUPPORT","/opt/epics/support")
epicsEnvSet("ASYN","/opt/epics/support/asyn")
epicsEnvSet("CALC","/opt/epics/support/calc")
epicsEnvSet("STREAM","/opt/epics/support/StreamDevice")
epicsEnvSet("DEVIOCSTATS","/opt/epics/support/iocStats")
epicsEnvSet("AUTOSAVE","/opt/epics/support/autosave")
epicsEnvSet("EPICS_BASE","/opt/epics/epics-base")
epicsEnvSet("STREAM_PROTOCOL_PATH", "../../ftsiocApp/Db")
epicsEnvSet("PREFIX", "XF:16IDC-ES:LIX")
epicsEnvSet("FTS_IP", "10.16.2.195:49151 HTTP")
epicsEnvSet("PORT", "FTS")
## Register all support components
dbLoadDatabase("../../dbd/ftsioc.dbd",0,0)
ftsioc_registerRecordDeviceDriver(pdbbase)
drvAsynIPPortConfigure("FTS", "10.16.2.195:49151 HTTP")
## Load record instances
dbLoadRecords("../../db/fts.db","P=XF:16IDC-ES:LIX,R={FTS:2},PORT=FTS,user=oksana")
iocInit()
Starting iocInit
############################################################################
## EPICS R7.0.3.1
## EPICS Base built Dec 1 2020
############################################################################
iocRun: All initialization complete
## Start any sequence programs
#seq sncftsioc,"user=oksana"
epics>
-----Original Message-----
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Wednesday, December 09, 2020 3:57 PM
To: Ivashkevych, Oksana <oksana at bnl.gov>
Cc: tech-talk at aps.anl.gov
Subject: Re: serial IOC connection problem
Hi Oksana,
it looks like I forgot to remove asynSetTraceMask( "FTS",0,0).
Yes, you should comment out or remove this line. With this line present you
won't even see error messages.
asynSetTraceMask( "FTS",0,0)
Mark
________________________________
From: Ivashkevych, Oksana <oksana at bnl.gov>
Sent: Wednesday, December 9, 2020 2:53 PM
To: Mark Rivers
Cc: tech-talk at aps.anl.gov
Subject: RE: serial IOC connection problem
Hi Mark,
Yes, this is exactly what I did , and it looks like I forgot to remove
asynSetTraceMask( "FTS",0,0).
Oksana
[oksana@xf16id-babyioc1 ftsioc]$ vim st.cmd
[oksana@xf16id-babyioc1 ftsioc]$ ../../bin/linux-x86_64/ftsioc st.cmd
#!../../bin/linux-x86_64/ftsioc < envPaths
epicsEnvSet("IOC","ftsioc")
epicsEnvSet("TOP","/home/oksana/ftsioc")
epicsEnvSet("SUPPORT","/opt/epics/support")
epicsEnvSet("ASYN","/opt/epics/support/asyn")
epicsEnvSet("CALC","/opt/epics/support/calc")
epicsEnvSet("STREAM","/opt/epics/support/StreamDevice")
epicsEnvSet("DEVIOCSTATS","/opt/epics/support/iocStats")
epicsEnvSet("AUTOSAVE","/opt/epics/support/autosave")
epicsEnvSet("EPICS_BASE","/opt/epics/epics-base")
epicsEnvSet("STREAM_PROTOCOL_PATH", "../../ftsiocApp/Db")
epicsEnvSet("PREFIX", "XF:16IDC-ES:LIX")
epicsEnvSet("FTS_IP", "10.16.2.195:49151 HTTP")
epicsEnvSet("PORT", "FTS")
## Register all support components
dbLoadDatabase("../../dbd/ftsioc.dbd",0,0)
ftsioc_registerRecordDeviceDriver(pdbbase)
drvAsynIPPortConfigure("FTS", "10.16.2.195:49151 HTTP"
## Load record instances
dbLoadRecords("../../db/fts.db","P=XF:16IDC-
ES:LIX,R={FTS:2},PORT=FTS,user=oksana")
#asynSetTraceMask( "FTS",0,255)
asynSetTraceMask( "FTS",0,0)
iocInit()
Starting iocInit
##########################################################
##################
## EPICS R7.0.3.1
## EPICS Base built Dec 1 2020
##########################################################
##################
iocRun: All initialization complete
#asynSetTraceMask( "FTS",0,0)
## Start any sequence programs
#seq sncftsioc,"user=oksana"
epics> dbl
[oksana@xf16id-babyioc1 Db]$ more fts.proto Timeout=10000; Terminator =
"";
read{
MaxInput = 16;
out
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00%0.2
r\x00\x00";
in "\x12\x34%(A)02r%(B)2r%(C)2r%(D)2r%(E)2r%(F)2r%(G)2r";
}
readCalibration {
MaxInput = 24;
out
"\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00
\x00\x00\x00";
in
"\x12\x34%(A)01r%(B)01r%(C)04r%(D)04r%(E)02r%(F)02r%(G)02r%(H)02r%(I
)02r%(J)02r";
disconnect;
@init {
out
"\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00
\x00\x00\x00";
in
"\x12\x34%(A)01r%(B)01r%(C)04r%(D)04r%(E)02r%(F)02r%(G)02r%(H)02r%(I
)02r%(J)02r";
}
}
[oksana@xf16id-babyioc1 Db]$
-----Original Message-----
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Wednesday, December 09, 2020 3:48 PM
To: Ivashkevych, Oksana <oksana at bnl.gov>
Cc: tech-talk at aps.anl.gov
Subject: Re: serial IOC connection problem
Hi Oksana,
Just to be clear, did you add HTTP to the drvAsynIPPortConfigure
command, and remove the "disconnect" commands from the protocol file?
Mark
________________________________
From: Ivashkevych, Oksana <oksana at bnl.gov>
Sent: Wednesday, December 9, 2020 2:35 PM
To: Mark Rivers
Cc: tech-talk at aps.anl.gov
Subject: RE: serial IOC connection problem
Hi Mark,
Thank you very much!
Not a single squeak!
I may suggest considering adding "164.54.17.43:5186 HTTP" to the list
of examples in the link you shared.
Thanks again,
Oksana
-----Original Message-----
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Wednesday, December 09, 2020 2:15 PM
To: Ivashkevych, Oksana <oksana at bnl.gov>
Cc: tech-talk at aps.anl.gov
Subject: Re: serial IOC connection problem
Hi Oksana,
It may be that this device wants to just do a single transaction per
connection. That is how Web servers work.
drvAsynIPPort supports that mode of operation directly.
https://urldefense.com/v3/__https://epics-
modules.github.io/master/asyn/R4-
41/asynDriver.html*drvAsynIPPort__;Iw!!P4SdNyxKAPE!Sz1Tm08wfhCbs3_
mnZgFXMFrf7-JRdetWpdz-RbQ7TG0ozHVy-fgl3g3QhaCrw$
You need to change this line:
drvAsynIPPortConfigure("FTS", "10.16.2.195:49151")
to this:
drvAsynIPPortConfigure("FTS", "10.16.2.195:49151 HTTP")
Once you do that I think you can remove the "disconnect" commands
from the protocol file.
If you still have trouble please turn on ASYN_TRACEIO_DRIVER for the
IP port and send the output.
Mark
________________________________
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of
Ivashkevych, Oksana via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, December 9, 2020 12:51 PM
To: tech-talk at aps.anl.gov
Subject: serial IOC connection problem
Hello,
I have been asked to port an existing Serial IOC for a Force Torque
Sensor from ATI from one server (Debian 7 with Debian packages dated
~ at least 5 years ago) to CentOS 7.
CentOS 7.7.1908; base R7.0.3.1; asyn R4-37; SerialDevice master.
After the ported recompiled IOC reported unrecoverable connection
error, I have created a brand new IOC using the latest
makeBaseApp.pl
script.
Errors became more dynamic, and I do see some readings, when IOC
does manage to connect successfully. I have browsed the Tech Talk
and found a related discussions about connecting/disconnecting.
Protocol file of this IOC does connects/disconnects after every
read and is very simple. I only can guess why the developer made
this decision, I am sure it was an unavoidable compromise. I did
add asynSetTraceMask call which changes temporarily the dynamic of
the errors. Logs and proto
are attached.
In summary: I have two iocs accessing same device: the old one
running on Debian 7, and the new on running CentOS 7. The old one
works without problem the new on reports connection errors and does
manage to read something at the frequency ~30 times slower than 0.1
expected scan. I am out of my own ideas, and would appreciate help
from the
community.
Thank you,
Oksana
------------------------------
Message: 5
Date: Wed, 9 Dec 2020 22:07:52 +0000
From: "Ivashkevych, Oksana" <
oksana at bnl.gov>
To: Mark Rivers <
rivers at cars.uchicago.edu>
Cc: "
tech-talk at aps.anl.gov" <
tech-talk at aps.anl.gov>
Subject: RE: serial IOC connection problem
Message-ID:
<
BLAPR09MB73619611A9C472DA8D8752D9D3CC0 at BLAPR09MB7361.namprd09.prod.outlook.com>
Content-Type: text/plain; charset="us-ascii"
Hi Mark,
I am very sorry to sound petty, but I did have this line uncommented in the file I have shared. Run #3 at the end.
In this file I ran ioc 3 times:
1. with #asynSetTraceMask( "FTS",0,0) and had bunch of connection errors.
2. with asynSetTraceMask( "FTS",0,0) and had protocol errors reported (something new)
3. Third time without changing anything with errors like in 1. It was very confusing. Same IOC reporting different errors. May be it gets enabled back by other means somehow...
I did have a bunch of #asynSetTraceMask with different parameters commented before and after iocInit() as the leftovers of my struggles to understand what is going on.
Thank you,
Oksana
-----Original Message-----
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Wednesday, December 09, 2020 4:51 PM
To: Ivashkevych, Oksana <oksana at bnl.gov>
Cc: tech-talk at aps.anl.gov
Subject: Re: serial IOC connection problem
Could you please elaborate on this, I did see connection errors before
implementing the fix you suggested, right?
Yes, you saw connection errors. But in the serial_iocLog1.txt file you sent
previously, which had the error messages, you had these lines just before
iocInit:
#asynSetTraceMask( "FTS",0,255)
#asynSetTraceMask( "FTS",0,0)
So the line disabling the error messages was commented out.
Mark
________________________________
From: Ivashkevych, Oksana <oksana at bnl.gov>
Sent: Wednesday, December 9, 2020 3:39 PM
To: Mark Rivers
Cc: tech-talk at aps.anl.gov
Subject: RE: serial IOC connection problem
Hi Mark,
Thank you very much for being thorough and suspicious.
It still works without errors.
And I gladly express my happy wows one more time. :)
With this line present you won't even see error messages.
Could you please elaborate on this, I did see connection errors before
implementing the fix you suggested, right?
Oksana
[oksana@xf16id-babyioc1 ftsioc]$ ../../bin/linux-x86_64/ftsioc st.cmd
#!../../bin/linux-x86_64/ftsioc < envPaths
epicsEnvSet("IOC","ftsioc")
epicsEnvSet("TOP","/home/oksana/ftsioc")
epicsEnvSet("SUPPORT","/opt/epics/support")
epicsEnvSet("ASYN","/opt/epics/support/asyn")
epicsEnvSet("CALC","/opt/epics/support/calc")
epicsEnvSet("STREAM","/opt/epics/support/StreamDevice")
epicsEnvSet("DEVIOCSTATS","/opt/epics/support/iocStats")
epicsEnvSet("AUTOSAVE","/opt/epics/support/autosave")
epicsEnvSet("EPICS_BASE","/opt/epics/epics-base")
epicsEnvSet("STREAM_PROTOCOL_PATH", "../../ftsiocApp/Db")
epicsEnvSet("PREFIX", "XF:16IDC-ES:LIX")
epicsEnvSet("FTS_IP", "10.16.2.195:49151 HTTP")
epicsEnvSet("PORT", "FTS")
## Register all support components
dbLoadDatabase("../../dbd/ftsioc.dbd",0,0)
ftsioc_registerRecordDeviceDriver(pdbbase)
drvAsynIPPortConfigure("FTS", "10.16.2.195:49151 HTTP") ## Load record
instances
dbLoadRecords("../../db/fts.db","P=XF:16IDC-
ES:LIX,R={FTS:2},PORT=FTS,user=oksana")
iocInit()
Starting iocInit
##########################################################
##################
## EPICS R7.0.3.1
## EPICS Base built Dec 1 2020
##########################################################
##################
iocRun: All initialization complete
## Start any sequence programs
#seq sncftsioc,"user=oksana"
epics>
-----Original Message-----
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Wednesday, December 09, 2020 3:57 PM
To: Ivashkevych, Oksana <oksana at bnl.gov>
Cc: tech-talk at aps.anl.gov
Subject: Re: serial IOC connection problem
Hi Oksana,
it looks like I forgot to remove asynSetTraceMask( "FTS",0,0).
Yes, you should comment out or remove this line. With this line
present you won't even see error messages.
asynSetTraceMask( "FTS",0,0)
Mark
________________________________
From: Ivashkevych, Oksana <oksana at bnl.gov>
Sent: Wednesday, December 9, 2020 2:53 PM
To: Mark Rivers
Cc: tech-talk at aps.anl.gov
Subject: RE: serial IOC connection problem
Hi Mark,
Yes, this is exactly what I did , and it looks like I forgot to remove
asynSetTraceMask( "FTS",0,0).
Oksana
[oksana@xf16id-babyioc1 ftsioc]$ vim st.cmd
[oksana@xf16id-babyioc1 ftsioc]$ ../../bin/linux-x86_64/ftsioc st.cmd
#!../../bin/linux-x86_64/ftsioc < envPaths
epicsEnvSet("IOC","ftsioc")
epicsEnvSet("TOP","/home/oksana/ftsioc")
epicsEnvSet("SUPPORT","/opt/epics/support")
epicsEnvSet("ASYN","/opt/epics/support/asyn")
epicsEnvSet("CALC","/opt/epics/support/calc")
epicsEnvSet("STREAM","/opt/epics/support/StreamDevice")
epicsEnvSet("DEVIOCSTATS","/opt/epics/support/iocStats")
epicsEnvSet("AUTOSAVE","/opt/epics/support/autosave")
epicsEnvSet("EPICS_BASE","/opt/epics/epics-base")
epicsEnvSet("STREAM_PROTOCOL_PATH", "../../ftsiocApp/Db")
epicsEnvSet("PREFIX", "XF:16IDC-ES:LIX")
epicsEnvSet("FTS_IP", "10.16.2.195:49151 HTTP")
epicsEnvSet("PORT", "FTS")
## Register all support components
dbLoadDatabase("../../dbd/ftsioc.dbd",0,0)
ftsioc_registerRecordDeviceDriver(pdbbase)
drvAsynIPPortConfigure("FTS", "10.16.2.195:49151 HTTP"
## Load record instances
dbLoadRecords("../../db/fts.db","P=XF:16IDC-
ES:LIX,R={FTS:2},PORT=FTS,user=oksana")
#asynSetTraceMask( "FTS",0,255)
asynSetTraceMask( "FTS",0,0)
iocInit()
Starting iocInit
##########################################################
##################
## EPICS R7.0.3.1
## EPICS Base built Dec 1 2020
##########################################################
##################
iocRun: All initialization complete
#asynSetTraceMask( "FTS",0,0)
## Start any sequence programs
#seq sncftsioc,"user=oksana"
epics> dbl
[oksana@xf16id-babyioc1 Db]$ more fts.proto Timeout=10000; Terminator
= "";
read{
MaxInput = 16;
out
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00%0.2
r\x00\x00";
in "\x12\x34%(A)02r%(B)2r%(C)2r%(D)2r%(E)2r%(F)2r%(G)2r";
}
readCalibration {
MaxInput = 24;
out
"\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00
\x00\x00\x00";
in
"\x12\x34%(A)01r%(B)01r%(C)04r%(D)04r%(E)02r%(F)02r%(G)02r%(H)02r%(I
)02r%(J)02r";
disconnect;
@init {
out
"\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00
\x00\x00\x00";
in
"\x12\x34%(A)01r%(B)01r%(C)04r%(D)04r%(E)02r%(F)02r%(G)02r%(H)02r%(I
)02r%(J)02r";
}
}
[oksana@xf16id-babyioc1 Db]$
-----Original Message-----
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Wednesday, December 09, 2020 3:48 PM
To: Ivashkevych, Oksana <oksana at bnl.gov>
Cc: tech-talk at aps.anl.gov
Subject: Re: serial IOC connection problem
Hi Oksana,
Just to be clear, did you add HTTP to the drvAsynIPPortConfigure
command, and remove the "disconnect" commands from the protocol
file?
Mark
________________________________
From: Ivashkevych, Oksana <oksana at bnl.gov>
Sent: Wednesday, December 9, 2020 2:35 PM
To: Mark Rivers
Cc: tech-talk at aps.anl.gov
Subject: RE: serial IOC connection problem
Hi Mark,
Thank you very much!
Not a single squeak!
I may suggest considering adding "164.54.17.43:5186 HTTP" to the
list of examples in the link you shared.
Thanks again,
Oksana
-----Original Message-----
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Wednesday, December 09, 2020 2:15 PM
To: Ivashkevych, Oksana <oksana at bnl.gov>
Cc: tech-talk at aps.anl.gov
Subject: Re: serial IOC connection problem
Hi Oksana,
It may be that this device wants to just do a single transaction
per connection. That is how Web servers work.
drvAsynIPPort supports that mode of operation directly.
https://urldefense.com/v3/__https://epics-
modules.github.io/master/asyn/R4-
41/asynDriver.html*drvAsynIPPort__;Iw!!P4SdNyxKAPE!Sz1Tm08wfhCbs3_
mnZgFXMFrf7-JRdetWpdz-RbQ7TG0ozHVy-fgl3g3QhaCrw$
You need to change this line:
drvAsynIPPortConfigure("FTS", "10.16.2.195:49151")
to this:
drvAsynIPPortConfigure("FTS", "10.16.2.195:49151 HTTP")
Once you do that I think you can remove the "disconnect" commands
from the protocol file.
If you still have trouble please turn on ASYN_TRACEIO_DRIVER for
the IP port and send the output.
Mark
________________________________
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of
Ivashkevych, Oksana via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, December 9, 2020 12:51 PM
To: tech-talk at aps.anl.gov
Subject: serial IOC connection problem
Hello,
I have been asked to port an existing Serial IOC for a Force
Torque Sensor from ATI from one server (Debian 7 with Debian
packages dated ~ at least 5 years ago) to CentOS 7.
CentOS 7.7.1908; base R7.0.3.1; asyn R4-37; SerialDevice master.
After the ported recompiled IOC reported unrecoverable connection
error, I have created a brand new IOC using the latest
makeBaseApp.pl
script.
Errors became more dynamic, and I do see some readings, when IOC
does manage to connect successfully. I have browsed the Tech Talk
and found a related discussions about connecting/disconnecting.
Protocol file of this IOC does connects/disconnects after every
read and is very simple. I only can guess why the developer made
this decision, I am sure it was an unavoidable compromise. I did
add asynSetTraceMask call which changes temporarily the dynamic of
the errors. Logs and proto
are attached.
In summary: I have two iocs accessing same device: the old one
running on Debian 7, and the new on running CentOS 7. The old one
works without problem the new on reports connection errors and
does manage to read something at the frequency ~30 times slower
than 0.1 expected scan. I am out of my own ideas, and would
appreciate help from the
community.
Thank you,
Oksana
------------------------------
Subject: Digest Footer
_______________________________________________
Tech-talk mailing list
Tech-talk at aps.anl.gov https://mailman.aps.anl.gov/mailman/listinfo/tech-talk ------------------------------
End of Tech-talk Digest, Vol 14, Issue 640
******************************************