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: MCB-4B Motor WriteInt32 Errors
From: Mark Rivers <rivers@cars.uchicago.edu>
To: Caleb Marshall <camarsha@ncsu.edu>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Thu, 9 Feb 2017 17:22:32 +0000
Hi Caleb,

I understand one point of confusion.  The motor/motorApp/AcsSrc contains files for 2 different drivers:

These files are for the old model 1 driver.
-rw-rw-r-- 1 epics domain users   669 Oct 16  2015 drvMCB4B.h
-rw-rw-r-- 1 epics domain users  9427 Oct 16  2015 devMCB4B.cc
-rw-r--r-- 1 epics domain users 16068 Jan 21 18:27 drvMCB4B.cc

These files are for the new model 3 driver.
-rw-rw-r-- 1 epics domain users  1611 Oct 16  2015 MCB4BDriver.h
-rw-rw-r-- 1 epics domain users 11797 Oct 16  2015 MCB4BDriver.cpp

Your startup script contains these 2 commands:

MCB4BCreateController("MCB4B1", "L0", 4, 100, 5000)
MCB4BSetup(1, 10)
MCB4BConfig(0, "L0")

The first command is OK, that configures the new model 3 controller with 4 axes.

The next 2 commands should be removed from your startup script, they are for the old model 1 driver.

> epics> asynReport 10 L0

That is not the output I wanted to see,  That is a report on the underlying drvAsynSerial port, not the MCB4B motor controller port.  Please send the output of this command:

asynReport 10 MCB4B1

Also send the output of

dbpr Enge:m1 10

and the contents of motor.substitutions.mcb4b

Mark

________________________________
From: Caleb Marshall [camarsha@ncsu.edu]
Sent: Thursday, February 09, 2017 8:55 AM
To: Mark Rivers
Cc: tech-talk@aps.anl.gov
Subject: Re: MCB-4B Motor WriteInt32 Errors

Here is the ioc boot:

#!../../bin/linux-x86_64/WithAsyn
#errlogInit(5000)
< envPaths
epicsEnvSet("ARCH","linux-x86_64")
epicsEnvSet("IOC","iocWithAsyn")
epicsEnvSet("TOP","/home/caleb/engemotor")
epicsEnvSet("SUPPORT","/home/caleb/epics/synApps/support")
epicsEnvSet("ASYN","/home/caleb/epics/synApps/support/asyn-4-26")
epicsEnvSet("SNCSEQ","/home/caleb/epics/synApps/support/seq-2-2-1")
epicsEnvSet("BUSY","/home/caleb/epics/synApps/support/busy-1-6-1")
epicsEnvSet("EPICS_BASE","/home/caleb/epics/base")
epicsEnvSet("IPAC","/home/caleb/epics/synApps/support/ipac-2-13")
epicsEnvSet("MOTOR","/home/caleb/engemotor")
# Tell EPICS all about the record types, device-support modules, drivers,
# etc. in this build from CARS
dbLoadDatabase("../../dbd/WithAsyn.dbd")
dbLoadDatabase("../../dbd/devAcsMotor.dbd")
WithAsyn_registerRecordDeviceDriver(pdbbase)
drvAsynSerialPortConfigure("L0", "/dev/ttyUSB0",0,0,0)
asynOctetSetInputEos("L0",0,"\r")
asynOctetSetOutputEos("L0",0,"\r")
asynSetOption("L0",0,"baud","9600")
asynSetOption("L0",0,"bits","8")
asynSetOption("L0",0,"parity","none")
asynSetOption("L0",0,"stop","1")
asynSetOption("L0",0,"clocal","Y")
asynSetOption("L0",0,"crtscts","N")
# asynSetTraceIOMask("L0", 0, 0x2)
# asynSetTraceMask("L0", 0, 0x9)
### Motors
dbLoadTemplate "motor.substitutions.mcb4b"
dbLoadRecords("/home/caleb/epics/synApps/support/asyn-4-26/db/asynRecord.db","P=Enge:,R=L0,PORT=L0,ADDR=0,OMAX=100,IMAX=100")
#Our Control System
MCB4BCreateController("MCB4B1", "L0", 4, 100, 5000)
MCB4BSetup(1, 10)
MCB4BConfig(0, "L0")
iocInit
Starting iocInit
############################################################################
## EPICS R3.15.2 $Date: Thu 2015-05-14 14:09:28 +0200$
## EPICS Base built Sep 11 2015
############################################################################

iocRun: All initialization complete
# This IOC does not use save/restore, so set values of some PVs
dbpf("Enge:m1.TWV", "0.1")
DBR_DOUBLE:         0.1
dbpf("Enge:m2.RTRY", "0")
DBR_SHORT:          0         0x0
dbpf("Enge:m2.TWV", "0.1")
DBR_DOUBLE:         0.1
dbpf("Enge:m3.RTRY", "0")
DBR_SHORT:          0         0x0
dbpf("Enge:m3.TWV", "0.1")
DBR_DOUBLE:         0.1
dbpf("Enge:m4.RTRY", "0")
DBR_SHORT:          0         0x0
dbpf("Enge:m4.TWV", "0.1")
DBR_DOUBLE:         0.1


And here is the command output:




epics> asynReport 10 L0
L0 multiDevice:No canBlock:Yes autoConnect:Yes
    enabled:Yes connected:Yes numberConnects 1
    nDevices 0 nQueued 0 blocked:No
    asynManagerLock:No synchronousLock:Yes
    exceptionActive:No exceptionUsers 2 exceptionNotifys 0
    traceMask:0x1 traceIOMask:0x0 traceInfoMask:0x1
    interposeInterfaceList
        asynOctet pinterface 0x7f3a55f83560 drvPvt 0x1e8dde0
    interfaceList
        asynCommon pinterface 0x7f3a55f807d0 drvPvt 0x1e8ae70
        asynOption pinterface 0x7f3a55f807f0 drvPvt 0x1e8ae70
        asynOctet pinterface 0x7f3a55f82d00 drvPvt 0x1e8ae70
Serial line /dev/ttyUSB0: Connected
                    fd: 4
    Characters written: 585
       Characters read: 195




-Caleb
















On Wed, Feb 8, 2017 at 12:38 PM, Mark Rivers <rivers@cars.uchicago.edu<mailto:rivers@cars.uchicago.edu>> wrote:
Please send the following:

- Complete output when the IOC boots and runs for 10 seconds or so after iocInit.

- Output of the command
  asynReport 10 myPort
where myPort is the name you assigned to the motor controller port you created.

Mark

Sent from my iPhone

> On Feb 8, 2017, at 7:28 AM, Caleb Marshall <camarsha@ncsu.edu<mailto:camarsha@ncsu.edu>> wrote:
>
> Hello all,
>
> I have been trying to develop a stepper motor control system using the Base release R3.15.2 and SynApps_5_8. I have followed the documentation in the motor record to setup the IOC for the MCB-4B controller board. Using the IO traces I can tell that communication with the board is happening (there is a constant polling of position and responses from the board, etc.), but whenever I try to change a value for a motion field I get the following:
>
> 2017/02/08 10:53:40.203 devMotorAsyn::asynCallback: Enge:m1 pasyn{Float64,Int32}->write returned
> 2017/02/08 10:53:40.203 asynMotorController:writeInt32 error, status=3 axis=0, function=4, value=0
> 2017/02/08 10:53:40.203 devMotorAsyn::asynCallback: Enge:m1 pasyn{Float64,Int32}->write returned
>
> And the move command is never sent. I can update fields that do not require communication with the board however.
>
> Any ideas what could be going wrong?
>
> -Caleb Marshall
> NCSU/TUNL
>




Replies:
Re: MCB-4B Motor WriteInt32 Errors Caleb Marshall
References:
MCB-4B Motor WriteInt32 Errors Caleb Marshall
Re: MCB-4B Motor WriteInt32 Errors Mark Rivers
Re: MCB-4B Motor WriteInt32 Errors Caleb Marshall

Navigate by Date:
Prev: Re: MCB-4B Motor WriteInt32 Errors Caleb Marshall
Next: Re: MCB-4B Motor WriteInt32 Errors Caleb Marshall
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: MCB-4B Motor WriteInt32 Errors Caleb Marshall
Next: Re: MCB-4B Motor WriteInt32 Errors Caleb Marshall
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, 14 Feb 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·