Experimental Physics and
| |||||||||||||||||
|
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
| ||||||||||||||||
ANJ, 22 Oct 2020 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |