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  2016  2017  2018  2019  <20202021  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  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Seeking config advice for smarAct MCS controller
From: Juliane Reinhardt via Tech-talk <tech-talk at aps.anl.gov>
To: Mark Rivers <rivers at cars.uchicago.edu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 22 Oct 2020 14:30:36 -0700
Hi Mark,

yes, I started the IOC as before. I think I figured out the issue. I had set 2 IP addresses in the EPICS_CA_ADDR_LIST variable in the .bash_profile in order to use 2 IOCs on 1 computer but that seems like the wrong formatting (export EPICS_CA_ADDR_LIST="192.168.168.200 192.168.168.201").
Now I removed this variable and started only 1 IOC and it works again.

(before I simply got the message:
$caget cosmic:m1
Channel connect timed out: 'cosmic:m1' not found.)

In general, what is best practice: having one IOC for each controller or having multiple controllers (that are somehow doing related tasks such as controlling samples stages) on a single IOC? The first way I got to work once, the second not. But I guess it all comes down, to not having the IP addresses specified properly.

Any advice is appreciated.
Thanks,
Juliane


On 10/22/20 14:19, Mark Rivers wrote:

Ø  However, now it silently fails, not giving any error or warning when starting the IOC, but can't connect to any PV.

Can you explain exactly what you mean?  Do you mean that the IOC is running fine, but that your Channel Access client (caget, camonitor, etc.) cannot connect to the PVs?

Mark

 

 

 

From: Juliane Reinhardt <jreinhardt at lbl.gov>
Sent: Thursday, October 22, 2020 3:59 PM
To: Mark Rivers <rivers at cars.uchicago.edu>; 'Torsten Bögershausen' <torsten.bogershausen at ess.eu>; Jemian, Pete R. <jemian at anl.gov>
Cc: tech-talk at aps.anl.gov
Subject: Re: Seeking config advice for smarAct MCS controller

 

It was resolved magically, continued to work again. Even got 2 IOC running on 1 computer. However, now it silently fails, not giving any error or warning when starting the IOC, but can't connect to any PV.

On 10/22/20 12:53, Juliane Reinhardt wrote:

Hi Mark,

we switched to ASCII in the smarAct firmware and this morning we successfully moved the motor using caput/caget. However, now I am back to getting this error:

$ ../../bin/linux-x86_64/smarAct st_201.cmd
#!../../bin/linux-x86_64/smarAct
< envPaths
epicsEnvSet("IOC","iocSmarAct")
epicsEnvSet("TOP","/opt/epics/synApps/synApps_6_1/support/motor-R7-1/modules/motorSmarAct/iocs/smarActIOC")
epicsEnvSet("MOTOR","/opt/epics/synApps/synApps_6_1/support/motor-R7-1")
epicsEnvSet("ASYN","/opt/epics/synApps/synApps_6_1/support/asyn-R4-36")
epicsEnvSet("SNCSEQ","/opt/epics/synApps/synApps_6_1/support/seq-2-2-6")
epicsEnvSet("BUSY","/opt/epics/synApps/synApps_6_1/support/busy-R1-7-2")
epicsEnvSet("IPAC","/opt/epics/synApps/synApps_6_1/support/ipac-2-15")
epicsEnvSet("EPICS_BASE","/opt/epics/base")
cd "/opt/epics/synApps/synApps_6_1/support/motor-R7-1/modules/motorSmarAct/iocs/smarActIOC"
## Register all support components
dbLoadDatabase "dbd/smarAct.dbd"
smarAct_registerRecordDeviceDriver pdbbase
cd "/opt/epics/synApps/synApps_6_1/support/motor-R7-1/modules/motorSmarAct/iocs/smarActIOC/iocBoot/iocSmarAct"
## motorUtil (allstop & alldone)
dbLoadRecords("/opt/epics/synApps/synApps_6_1/support/motor-R7-1/db/motorUtil.db", "P=cosmic:")
# Uncomment one of the following lines for MCS or MCS2 controller
< smaractmcs_201.iocsh
### Motors
# Motors substitutions, customize this for your motor
dbLoadTemplate "motor.substitutions.smaractmcs_201"
# Configure each controller
#origvalues# drvAsynIPPortConfigure("MCS_ETH","192.168.1.17:2102",0,0,0)
drvAsynIPPortConfigure("MCS_ETH","192.168.168.201:5000",0,0,0)
asynSetTraceIOMask("MCS_ETH", 0, ESCAPE|HEX)
asynSetTraceMask("MCS_ETH", 0, ERROR|DRIVER|FLOW)
# Controller port, asyn port, number of axis, moving poll period, idle poll period
# smarActMCSCreateController(const char *motorPortName, const char *ioPortName, int numAxes, double movingPollPeriod, double idlePollPeriod);
smarActMCSCreateController("MCS", "MCS_ETH", 1, 0.020, 1.0)
2020/10/22 12:47:00.895 MCS_ETH asynManager::queueLockPort locking port
2020/10/22 12:47:00.895 MCS_ETH asynManager::queueLockPort created queueLockPortPvt=0x5576af1c87e0
2020/10/22 12:47:00.895 MCS_ETH asynManager::queueLockPort created queueLockPortPvt=0x5576af1c87e0, event=0x5576af1c8800, mutex=0x5576af1c88b0
2020/10/22 12:47:00.895 MCS_ETH asynManager::queueLockPort taking mutex 0x5576af1c88b0
2020/10/22 12:47:00.895 MCS_ETH asynManager::queueLockPort queueing request
SmarActMCSController(MCS): WARNING - detected unexpected characters on link (MCS_ETH); make sure you have a RAW (not TELNET) connection
2020/10/22 12:47:00.895 MCS_ETH lockPort
2020/10/22 12:49:11.561 MCS_ETH -1 autoConnect
2020/10/22 12:49:11.561 MCS_ETH set Eos 1
\n

0a
2020/10/22 12:49:11.561 MCS_ETH unlockPort
2020/10/22 12:49:11.561 MCS_ETH lockPort
2020/10/22 12:49:11.562 Attempting to connect to 192.168.168.201:5000  reason:0  fd:-1
2020/10/22 12:49:31.556 MCS_ETH addr -1 queueRequest priority 3 not lockHolder



I can still caget in another terminal and get a response.
I'm not aware of any changes since it worked (except from logout/login to the computer). Another controller of the same kind, that it connected on a different ip port (not started at the same time), works just fine.

Any suggestions?
Thanks,
Juliane

On 10/20/20 05:15, Mark Rivers wrote:

This doesn't seem to be a good thing.
The axis number is the EPICS axis number - it must start with 1.
That is not true.  EPICS axis numbers for model 3 drivers start with 0.  
 
The example IOC for the smartAct MCS demonstrates that:
 
# Controller port, axis number, controller channel
# smarActSCUCreateAxis(const char *motorPortName, int axisNumber, int channel)
smarActSCUCreateAxis("SCU1", 0, 0);
smarActSCUCreateAxis("SCU1", 1, 1);
smarActSCUCreateAxis("SCU1", 2, 2);
smarActSCUCreateAxis("SCU2", 0, 0);
smarActSCUCreateAxis("SCU2", 1, 1);
smarActSCUCreateAxis("SCU2", 2, 2);
 
So does the Newport XPS example IOC:
 
# XPS asyn port,  axis, groupName.positionerName, stepSize
XPSConfigAxis("XPS1",0,"FINE.X",             100000) # VP-25XL
XPSConfigAxis("XPS1",1,"FINE.Y",              50000) # VP-5ZA
XPSConfigAxis("XPS1",2,"THETA.POSITIONER",     2000) # URS75CC
XPSConfigAxis("XPS1",3,"COARSEX.POSITIONER",   2000) # ILS200CC
XPSConfigAxis("XPS1",4,"COARSEY.POSITIONER",   2000) # ILS200CC
XPSConfigAxis("XPS1",5,"COARSEZ.POSITIONER",   5000) # IMS300CC
 
We believe we have found Juliane's problem.  This is the asynTrace output when the axis is being created.
 
2020/10/19 16:24:35.487 192.168.168.201:5000 flush
2020/10/19 16:24:35.487 192.168.168.201:5000 write.
2020/10/19 16:24:35.487 192.168.168.201:5000 write 7
:GCLS0\n
 
3a 47 43 4c 53 30 0a
2020/10/19 16:24:35.487 wrote 7 to 192.168.168.201:5000, return asynSuccess.
2020/10/19 16:24:35.487 192.168.168.201:5000 read.
2020/10/19 16:24:35.488 192.168.168.201:5000 read 4
\b\000\361\200
 
So the driver is sending an ASCII string, ":GCLS0\n".  But it is receiving a binary response: "\b\000\361\200".
 
Apparently there are 2 versions of the smarAct MCS firmware, one that does binary communication and one that does ASCII communication.  The EPICS driver only supports ASCII communication.  Juliane's controller apparently has the binary firmware version, so she needs to change the firmware on her MCS.
 
Mark
 
 
 
Mark
 
 
-----Original Message-----
From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Torsten Bögershausen via Tech-talk
Sent: Tuesday, October 20, 2020 7:01 AM
To: Jemian, Pete R. <jemian at anl.gov>; EPICS Tech Talk <tech-talk at aps.anl.gov>; Reinhardt, Juliane <jreinhardt at lbl.gov>
Subject: Re: Seeking config advice for smarAct MCS controller
 
On 20/10/20 01:15, Jemian, Pete R. via Tech-talk wrote:
Here's a question from Juliane Reinhardt, ALS:
 
  > anyone having some advice for connecting motors to a smarAct MCS 
controller? What does the channel number mean? Our .iocsh file looks 
like this
 
### Motors
# Motors substitutions, customize this for your motor dbLoadTemplate 
"motor.substitutions.smaractmcs_201"# Configure each controller 
#origvalues# 
drvAsynIPPortConfigure("MCS_ETH","192.168.1.17:2102",0,0,0)
drvAsynIPPortConfigure("MCS_ETH","192.168.168.201:5000",0,0,0)#
Controller port, asyn port, number of axis, moving poll period, idle 
poll period # smarActMCSCreateController(const char *motorPortName, 
const char *ioPortName, int numAxes, double movingPollPeriod, double 
idlePollPeriod); smarActMCSCreateController("MCS", "MCS_ETH", 1, 
0.020, 1.0)# Controller port, axis number, controller channel # 
smarActMCSCreateAxis(const char *motorPortName, int axisNumber, int
channel)
smarActMCSCreateAxis("MCS", 0, 0);
This doesn't seem to be a good thing.
The axis number is the EPICS axis number - it must start with 1.
 
The channel is the axis number inside the controller - I don't know if they start counting at 0 ?
 
Not having such a controller, I would speculate and try smarActMCSCreateAxis("MCS", 1, 0);
 



-- 
Juliane Reinhardt, PhD
Project Scientist | ALS Computing Group
Blg. 15-337E | phone: 510-486-4313
jreinhardt at lbl.gov
Lawrence Berkeley National Lab



-- 
Juliane Reinhardt, PhD
Project Scientist | ALS Computing Group
Blg. 15-337E | phone: 510-486-4313
jreinhardt at lbl.gov
Lawrence Berkeley National Lab

-- 
Juliane Reinhardt, PhD
Project Scientist | ALS Computing Group
Blg. 15-337E | phone: 510-486-4313
jreinhardt at lbl.gov
Lawrence Berkeley National Lab

Replies:
RE: Seeking config advice for smarAct MCS controller Mark Rivers via Tech-talk
References:
Seeking config advice for smarAct MCS controller Jemian, Pete R. via Tech-talk
Re: Seeking config advice for smarAct MCS controller Torsten Bögershausen via Tech-talk
RE: Seeking config advice for smarAct MCS controller Mark Rivers via Tech-talk
Re: Seeking config advice for smarAct MCS controller Juliane Reinhardt via Tech-talk
Re: Seeking config advice for smarAct MCS controller Juliane Reinhardt via Tech-talk
RE: Seeking config advice for smarAct MCS controller Mark Rivers via Tech-talk

Navigate by Date:
Prev: RE: Seeking config advice for smarAct MCS controller Mark Rivers via Tech-talk
Next: RE: Seeking config advice for smarAct MCS controller Mark Rivers via Tech-talk
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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Seeking config advice for smarAct MCS controller Mark Rivers via Tech-talk
Next: RE: Seeking config advice for smarAct MCS controller Mark Rivers via Tech-talk
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  <20202021  2022  2023  2024 
ANJ, 22 Oct 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·