This is from my startup script for an AG-UC8 8-channel controller. I only defined 5 of the axes for now.
# Serial 5 is Newport AG-UC8 motor controller
drvAsynSerialPortConfigure("serial5", "COM8", 0, 0, 0)
asynOctetSetInputEos("serial5",0,"\r\n")
asynOctetSetOutputEos("serial5",0,"\r\n")
asynSetOption("serial5",0,"baud","921600")
#asynSetOption("serial5",0,"baud","9600")
asynSetOption("serial5",0,"bits","8")
asynSetOption("serial5",0,"stop","1")
asynSetOption("serial5",0,"parity","none")
asynSetOption("serial5",0,"clocal","Y")
asynSetOption("serial5",0,"crtscts","N")
asynSetTraceIOMask("serial5", 0, 2)
#asynSetTraceMask("serial5", 0, 0x19)
# AG_UCCreateController(asyn port, serial port, number of axes,
# active poll period (ms), idle poll period (ms))
AG_UCCreateController("Agilis1", "serial5", 5, 50, 5000)
asynSetTraceIOMask("Agilis1", 0, 2)
#asynSetTraceMask("Agilis1", 0, 255)
# AG_UCCreateAxis((AG_UC controller port, axis, hasLimits, forwardAmplitude, reverseAmplitude)
AG_UCCreateAxis("Agilis1", 0, 1, 50, -50)
AG_UCCreateAxis("Agilis1", 1, 1, 50, -50)
AG_UCCreateAxis("Agilis1", 2, 1, 50, -50)
AG_UCCreateAxis("Agilis1", 3, 1, 50, -50)
AG_UCCreateAxis("Agilis1", 4, 0, 50, -50)
This is from my motors.template file. In this case I am using both a Newport XPS controller and the AG_UC8.
file "$(CARS)/CARSApp/Db/asynMotor.db"
{
pattern
{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST,BVEL,BACC, SREV, UREV, PREC, DHLM, DLLM}
{13RAMAN2:, 1, m1, "asynMotor", XPS1, 0, "Horizontal", mm, Pos, 5., 1, 0.5, 0, 1, .2, 50000, 1, 3, 300, 0}
{13RAMAN2:, 2, m2, "asynMotor", XPS1, 1, "Vertical", mm, Pos, 2., 1, 0.5, 0, 1, .2, 50000, 1, 3, 4.8, 0}
{13RAMAN2:, 3, m3, "asynMotor", XPS1, 2, "Focus", mm, Pos, 5., 1, 0.5, 0, 1, .2, 10000, 1, 3, 25, 0}
{13RAMAN2:, 4, m4, "asynMotor", XPS1, 3, "Rotation 1", deg, Pos, 20., 1, 0.5, 0, 1, .5, 50, 1, 3, 360, 0}
{13RAMAN2:, 5, m5, "asynMotor", XPS1, 4, "Rotation 2", deg, Pos, 20., 1, 0.5, 0, 1, .5, 50, 1, 3, 360, 0}
{13RAMAN2:, 6, m6, "asynMotor", Agilis1, 0, "M6", deg, Pos, .5, 0.1, .25, 0, 1, .2, 1000, 1, 3, 3, -3}
{13RAMAN2:, 7, m7, "asynMotor", Agilis1, 1, "M7", deg, Pos, .5, 0.1, .25, 0, 1, .2, 1000, 1, 3, 3, -3}
{13RAMAN2:, 8, m8, "asynMotor", Agilis1, 2, "M8", deg, Pos, .5, 0.1, .25, 0, 1, .2, 1000, 1, 3, 3, -3}
{13RAMAN2:, 9, m9, "asynMotor", Agilis1, 3, "M9", deg, Pos, .5, 0.1, .25, 0, 1, .2, 1000, 1, 3, 3, -3}
One thing you need to be aware of is that the AG_UC8 is a very dumb controller. It works fine for doing incremental moves on any motor. However, it really only has 2 position registers. That means that when you do a move on channel 1, all of the odd number channels will appear to be moving, their position readback changes. Similarly when you do a move on channel 2 all of the even number channels appear to be moving. So absolute positions are meaningless with this controller if you use more than 2 axes.
Mark
-----Original Message-----
From: Gerrit Kühn [mailto:[email protected]]
Sent: Tuesday, February 23, 2016 9:24 AM
To: Mark Rivers
Cc: [email protected]
Subject: Re: Motor examples missing devSequencer
On Tue, 23 Feb 2016 14:57:09 +0000 Mark Rivers <[email protected]>
wrote about RE: Motor examples missing devSequencer:
Hello Mark,
MR> If you are in that motor/iocBoot/iocWithAsyn directory you do the
MR> following:
MR>
MR> ../../bin/linux-x86_64/WithAsyn st.cmd.AG_UC
Yes, that's what I did. After coming up with some envPaths settings it
appears to find everything it needs now and creates these channels for me:
iocRun: All initialization complete
epics> dbl
IOC:m1Direction
IOC:m2Direction
IOC:m1
IOC:m2
IOC:m1Offset
IOC:m1Resolution
IOC:m2Offset
IOC:m2Resolution
IOC:serial1
I have a UC8 controller here, so I probably can configure/address another
three sets of 2-axis controls in the .cmd file?
MR> You then need to load an OPI screen (there are lots of examples in the
MR> motor module) passing it the names of the motor records, and you
MR> should be able to move the motors.
We are using medm here, but I see that there are loads of .adl screens to look at, too.
MR> Let me know if you have more questions.
I certainly will. :)
Thank you already for your support so far.
cu
Gerrit
- Replies:
- Re: Motor examples missing devSequencer Gerrit Kühn
- References:
- Motor examples missing devSequencer Gerrit Kühn
- Re: Motor examples missing devSequencer Benjamin Franksen
- Re: Motor examples missing devSequencer Gerrit Kühn
- RE: Motor examples missing devSequencer Mark Rivers
- Re: Motor examples missing devSequencer Gerrit Kühn
- Navigate by Date:
- Prev:
RE: How to cs-studio Scan System Crisp, Daniel
- Next:
OSI Compliant VME Support Matt Rippa
- 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
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Motor examples missing devSequencer Gerrit Kühn
- Next:
Re: Motor examples missing devSequencer Gerrit Kühn
- 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
2020
2021
2022
2023
2024
|