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: Dariush Hampai via Tech-talk <tech-talk at aps.anl.gov>
To: "Pearson, Matthew" <pearsonmr at ornl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 1 Jul 2025 18:06:27 +0200

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

************************************

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

Navigate by Date:
Prev: Re: Fix buffer overflow issue in Epics 3.15 Ralph Lange via Tech-talk
Next: Re: Generation of state diagram documentation from SNL Ed Janke 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 Pearson, Matthew 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, 02 Jul 2025 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·