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 <[email protected]>
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 <[email protected]> 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
************************************