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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Attocube AMC300 driver? |
From: | "Lang, Keenan C. via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, "Leicester, Pete (DLSLtd, RAL, LSCI)" <peter.leicester at diamond.ac.uk> |
Date: | Fri, 16 Jul 2021 23:00:38 +0000 |
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) 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).
If you still would want to use it, I have the script here:
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 (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 .
Keenan Lang
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Leicester, Pete (DLSLtd, RAL, LSCI) via Tech-talk <tech-talk at aps.anl.gov>
Sent: Friday, July 16, 2021 9:47 AM To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov> Subject: Attocube AMC300 driver? Just wondering has anyone already written an EPICS driver for an Attocube AMC300?
AMC300 piezo motion controller (attocube.com)
Pete
Pete Leicester Senior Software Systems Engineer Diamond Light Source Ltd
-- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify
us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. |