Experimental Physics and Industrial Control System
|
Keenan,
Are the lua scripts that have been written available on github? If not
I propose adding them to the Lua ScriptMotor repo:
https://github.com/epics-motor/motorScriptMotor
Kevin
P.S. The link is for everyone else; I know you know where the script
motor support lives.
On 7/16/21 6:00 PM, Lang, Keenan C. via Tech-talk wrote:
Pete,
I did just a quick set up of a scientist's AMC100, which should use the
same json REST api.
However, it's using the scriptable motor driver
(https://github.com/epics-motor/motorScriptMotor
<https://github.com/epics-motor/motorScriptMotor>) due to me not wanting
to deal with parsing a bunch of JSON in c/c++. So you'll need the master
branch of that motor module and to build motor against the lua epics
module (https://github.com/epics-modules/lua
<https://github.com/epics-modules/lua>).
If you still would want to use it, I have the script here:
https://github.com/keenanlang/Lua-Scripts/blob/master/motors/AMC100.lua
<https://github.com/keenanlang/Lua-Scripts/blob/master/motors/AMC100.lua>
You'll also need to grab json.lua from here:
https://github.com/rxi/json.lua <https://github.com/rxi/json.lua> (put
it in your working directory or edit line 3 of AMC100.lua to add the
path to the package search path)
Then the startup command calls are:
drvAsynIPPortConfigure("AMC100-1_IP", "<INSERT IP HERE>:9090", 0,0,0)
ScriptControllerConfig("AMC100-1", 2, "scripts/AMC100.lua",
"PORT=AMC100-1_IP")
The support assumes a motor that has an encoder. If you're dealing with
open loop steppers, it should just be a matter of switching the api
method names in the move and poll functions (lines 46 and 79).
Or, at the very least, since the scriptable motor is pretty much 1-to-1
compared to a standard model 3 driver, it shouldn't be too bad to
convert the logic to a c++ driver using https://github.com/nlohmann/json
<https://github.com/nlohmann/json> .
Keenan Lang
- References:
- Attocube AMC300 driver? Leicester, Pete (DLSLtd, RAL, LSCI) via Tech-talk
- Re: Attocube AMC300 driver? Lang, Keenan C. via Tech-talk
- Navigate by Date:
- Prev:
Re: CAEN VME crate with controller card plus digitizers Dmitry Yu. Bolkhovityanov via Tech-talk
- Next:
Software Architecture training Rees, Nick 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
2020
<2021>
2022
2023
2024
2025
- Navigate by Thread:
- Prev:
Re: Attocube AMC300 driver? Lang, Keenan C. via Tech-talk
- Next:
Syncronising triggred data acquisition for Modbus "I/O Intr" records and sscan records Kuldeep Joshi 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
2020
<2021>
2022
2023
2024
2025
|
ANJ, 20 Jul 2021 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
·
Download
·
Search
·
IRMIS
·
Talk
·
Documents
·
Links
·
Licensing
·
|