EPICS Controls 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  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: [EXTERNAL] Re: using PI C-863 Mercury motor controller with linux
From: "Pearson, Matthew via Tech-talk" <tech-talk at aps.anl.gov>
To: Dariush Hampai <dariush.hampai at lnf.infn.it>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 3 Jul 2025 15:00:36 +0000

Hi Darisuh,

 

It really depends on which stages are connected and how the controller is configured, so one set of parameters in use by somebody else might not be correct for your setup. Also some of those parameters listed are specific to the motor record logic, such as backlash correction (BDST, BVEL and BACC) which wouldn’t have an equivalent setting in the PI software (unless it happened to implement the same feature).

 

Most of time setting reasonable default parameters can work, and they don’t have to match what the vendor has as a default configuration.

 

Cheers,

Matt

 

From: Dariush Hampai <dariush.hampai at lnf.infn.it>
Sent: Thursday, July 3, 2025 10:38 AM
To: Pearson, Matthew <pearsonmr at ornl.gov>; tech-talk at aps.anl.gov
Cc: Mark Rivers <rivers at cars.uchicago.edu>
Subject: Re: [EXTERNAL] Re: using PI C-863 Mercury motor controller with linux

 

Hi Matt, all these informations are stored in the PIMikroMove software: however the list of parameters is really huge (about 30 voices), so I ask if someone in the community has already found the right values to fill in epics db. Dariush Il

Hi Matt,
all these informations are stored in the PIMikroMove software: however the list of parameters is really huge (about 30 voices), so I ask if someone in the community has already found the right values to fill in epics db.

Dariush

 

Il 02/07/2025 19:46, Pearson, Matthew ha scritto:

Hi,

 

You have to figure out most of those parameters yourself, based on the controller settings and motor specification. I assume you’ve read the motor record documentation to find out what they mean?

 

I’m not fully sure what PI_GC2.substitues is. I usually use basic_asyn_motor.db (or a custom variation of that). Here’s a default set that will likely work:

 

VELO=1

VBAS=0

ACCL=1

BDST=0

BVEL=1

BACC=1

MRES <- you need to figure out how many controller steps will move 1mm

PREC=3

DHLM=1000

DLLM=-1000

INIT <- it’s unlikely you need this, so just set to “”

 

Cheers,

Matt

 

From: Dariush Hampai <dariush.hampai at lnf.infn.it>
Sent: Tuesday, July 1, 2025 12:06 PM
To: Pearson, Matthew <pearsonmr at ornl.gov>; tech-talk at aps.anl.gov
Cc: Mark Rivers <rivers at cars.uchicago.edu>
Subject: Re: [EXTERNAL] Re: using PI C-863 Mercury motor controller with linux

 

Hi Matt, Hi Community, following your help, I'm able to create the right IOC. however in the PI_GC2.substitues I have to fill the table with the right parameters. I don't know these values, but I can access to the controller parameters list

Hi Matt,
Hi Community,
following your help, I'm able to create the right IOC.
however in the PI_GC2.substitues I have to fill the table with the right parameters. I don't know these values, but I can access to the controller parameters list by the PI software (PIMikroMove).
As those parameters are a lot, does someone know which parameters I have to consider?
In particulare the parameters requested are

VELO ->
VBAS ->
ACCL ->
BDST ->
BVEL ->
BACC ->
MRES ->
PREC ->
DHLM ->
DLLM ->
INIT ->

thank you in advance
Dariush

 

Il 27/06/2025 17:48, Pearson, Matthew ha scritto:

Hi Dariush,

 

Hi Matt,
after 10 years i'll reply to this thread...
 
The good news is that I’m still here!
 
In my lab I have 3 PI-Mercury controller C-663 (one for a rotative motor 
and 2 linear stages) in daisy chain mode.
I have some questions regarding this setup (up to now I used Labview 
successfully... so I know that it works fine).
I start from the module "motorPI" (or have I to use motorPIGCS2?)
 
It’s been a while (+5 years) since I dealt with those PI controllers, but I suspect you have to use motorPIGCS2 for all the newer controllers that support the GCS2 command set. 
 
I’m pasting some examples below, from an IOC which uses C-663 and C-863 controllers all daisy chained together (5 total) on a serial line via a Moxa.
 
In the st.cmd file I have:
 
#Connect to the Moxa
epicsEnvSet("PI_IP","10.112.2.4")
drvAsynIPPortConfigure("PI1","$(PI_IP):4001",0,0,0)
 
# Setup the motor drivers
PI_GCS2_CreateDaisyChainController("PIC1", "PI1", 1, 1, 0, 0, 500, 1000)
PI_GCS2_CreateDaisyChainController("PIC2", "PI1", 2, 1, 0, 0, 500, 1000)
PI_GCS2_CreateDaisyChainController("PIC3", "PI1", 3, 1, 0, 0, 500, 1000)
PI_GCS2_CreateDaisyChainController("PIC4", "PI1", 4, 1, 0, 0, 500, 1000)
PI_GCS2_CreateDaisyChainController("PIC5", "PI1", 5, 1, 0, 0, 500, 1000)
 
So it must be the 3rd argument which is the address on the serial bus. I seem to remember setting those addresses via DIP switches on the controllers.
 
In the IOC src/Makefile I have:
 
bl1a-piezo1_DBD += base.dbd
bl1a-piezo1_DBD += asyn.dbd
bl1a-piezo1_DBD += drvAsynIPPort.dbd
bl1a-piezo1_DBD += PI_GCS2Support.dbd
bl1a-piezo1_DBD += motorSupport.dbd
 
and:
 
bl1a-piezo1_LIBS += asyn
bl1a-piezo1_LIBS += motor
bl1a-piezo1_LIBS += PI_GCS2Support
 
Then, for the IOC database, you should just need to instantiate a single motor record per controller, defining the Asyn port as PIC1, PIC2, etc and leaving the Asyn address as 0. 
 
Hope that helps.
 
Cheers,
Matt
 
1) following the ioc in motorNewport, I included in piIOC/piApp/Db/Makefile
 
# Create and install (or just install) into <top>/db
# databases, templates, substitutions like this
#DB += xxx.db
 
DB_INSTALLS += $(MOTOR)/db/asyn_motor.db
DB_INSTALLS += $(MOTOR)/db/asyn_motor_positions.req
DB_INSTALLS += $(MOTOR)/db/asyn_motor_settings.req
DB_INSTALLS += $(MOTOR)/db/basic_asyn_motor.db
DB_INSTALLS += $(MOTOR)/db/profileMoveController.template
DB_INSTALLS += $(MOTOR)/db/profileMoveController_settings.req
DB_INSTALLS += $(MOTOR)/db/profileMoveAxis.template
DB_INSTALLS += $(MOTOR)/db/profileMoveAxis_settings.req
 
2) in motor/module/motorPI there is a template to start. However there 
isn't the C-663 option in st.cmd. So, it is right to create a 
PI_C663.cmd/.substitution (similar to PI_C844)? Looking for the driver 
of C-663  in sources it seems that the functions are the same.
 
3) in PI_C663.cmd, how I set the setup?
PIC663Setup(1, 10) -> change 1 to 3 as I have three controllers?
 
4) PIC663Config(0, "serial_pi_1"), the 0 is "controller# being 
configured". Have I change it?
 
5) regarding the daisy chain, how can I manage it? in .substitution file?
 
 
thank you in advance
 
 > Hi,
 >
 > The C-663 uses the PI General Command Set, and there's also Asyn 
based support in the motor support module:
 >
 > https://urldefense.us/v2/url?u=http-3A__www.aps.anl.gov_bcda_synApps_motor_&d=DwIDaQ&c=v4IIwRuZAmwupIjowmMWUmLasxPEgYsgNI-O7C4ViYc&r=aEDRFW1J1RKf3L4Vy5iLgaY2FJpZ2TV1XDtc_tKxW00&m=ybmxs2lyUrRLADSk15B8Jy1lLkFSkeSQbvo4mhec8z_4xVeRqZsCJdj8vaRw4nMc&s=DEJkRdVwoCOBm9uCPAbPPqGCKM6QNTszI63d94b2mtA&e=
 >
 > I'm currently using two C-663 controllers in a RS232 daisy chain 
configuration via a Moxa. The motor module doesn't contain the daisy 
chain support, but does work point-to-point.
 >
 > The IOC startup file would contain the following commands:
 >
 > drvAsynIPPortConfigure("PI1","10.112.2.4:4001",0,0,0)
 > PI_GCS2_CreateController("PIC1", "PI1", 1, 0, 0, 500, 1000)
 >
 > Then the motor record would use the "PIC1" asyn port.
 >
 > Cheers,
 > Matt
 
 
 > On Mar 13, 2015, at 8:00 AM, Heinz Junkes <junkes at fhi-berlin.mpg.de> 
wrote:
 
 > Hi Enrico,
 >
 > I run a similar controller C-663 Mercury Step but using the serial 
(RS232) port.
 > I can send to you the proto and db - files to use the controller with 
streamdevice.
 >
 > Best regards,
 > Heinz
 >
 >> On 13.03.2015, at 10:59, Enrico Virgilli <virgilli at fe.infn.it> wrote:
 >>
 >> Dear staff,
 >>
 >> I have a PI C-863 Mercury motor controller
 >> https://urldefense.us/v2/url?u=http-3A__www.physikinstrumente.com_en_products_prdetail.php-3Fsortnr-3D900605&d=DwIDaQ&c=v4IIwRuZAmwupIjowmMWUmLasxPEgYsgNI-O7C4ViYc&r=aEDRFW1J1RKf3L4Vy5iLgaY2FJpZ2TV1XDtc_tKxW00&m=ybmxs2lyUrRLADSk15B8Jy1lLkFSkeSQbvo4mhec8z_4xVeRqZsCJdj8vaRw4nMc&s=U8c3Q_pgvB3PR9EdmDe0-PBJJboV-I8sLDs-676FjtQ&e=
 >> that I would like to control with linux. The connection is
 >> USB, and at the moment I am successfully using it with a desktop with
 >> windows.
 >>
 >> I have not found drivers or references on how to do it and I am a really
 >> newbye in this sense. Can you help me giving some reference or
 >> free software to test it?
 >>
 >> SIncerely,
 >>
 >> Enrico
 
-- 
************************************
 
Dr. Dariush Hampai, PhD
 
INFN - LNF
X-Lab Frascati
Via E. Fermi, 54 (ex 40)
I-00044 Frascati (RM)
Italy
 
Mail Address:
XLab-Frascati
LNF-INFN
Casella Postale 13
Frascati (RM)
Italy
 
Room:      +39.06.9403.5248
Lab.:        +39.06.9403.2286
Mob.:       +39.06.9403.8025
Fax.:        +39.06.9403.2597
 
************************************
 
 
-- 
************************************
 
Dr. Dariush Hampai, PhD
 
INFN - LNF
X-Lab Frascati
Via E. Fermi, 54 (ex 40)
I-00044 Frascati (RM)
Italy
 
Mail Address:
XLab-Frascati
LNF-INFN
Casella Postale 13
Frascati (RM)
Italy
 
Room:    +39.06.9403.5248
Lab.:    +39.06.9403.2286
Mob.:    +39.06.9403.8025
Fax.:    +39.06.9403.2597
 
************************************
-- 
************************************
 
Dr. Dariush Hampai, PhD
 
INFN - LNF
X-Lab Frascati
Via E. Fermi, 54 (ex 40)
I-00044 Frascati (RM)
Italy
 
Mail Address:
XLab-Frascati
LNF-INFN
Casella Postale 13
Frascati (RM)
Italy
 
Room:    +39.06.9403.5248
Lab.:    +39.06.9403.2286
Mob.:    +39.06.9403.8025
Fax.:    +39.06.9403.2597
 
************************************

Replies:
RE: [EXTERNAL] Re: using PI C-863 Mercury motor controller with linux Pearson, Matthew via Tech-talk
References:
Re: using PI C-863 Mercury motor controller with linux Dariush Hampai via Tech-talk
RE: [EXTERNAL] Re: using PI C-863 Mercury motor controller with linux Pearson, Matthew via Tech-talk
Re: [EXTERNAL] Re: using PI C-863 Mercury motor controller with linux Dariush Hampai via Tech-talk
RE: [EXTERNAL] Re: using PI C-863 Mercury motor controller with linux Pearson, Matthew via Tech-talk
Re: [EXTERNAL] Re: using PI C-863 Mercury motor controller with linux Dariush Hampai via Tech-talk

Navigate by Date:
Prev: Re: [EXTERNAL] Re: using PI C-863 Mercury motor controller with linux Dariush Hampai via Tech-talk
Next: Job openings at ITER Ralph Lange 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: [EXTERNAL] Re: using PI C-863 Mercury motor controller with linux Dariush Hampai via Tech-talk
Next: RE: [EXTERNAL] Re: using PI C-863 Mercury motor controller with linux Pearson, Matthew 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, 08 Jul 2025 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·