Hi Kevin
I tried both ways:
1) in PI_C663.cmd, I included the following line
var drvPIC663debug 10
then start the IOC:
[xlabsrv2@xlabsrv2 iocPI]$ ./st.cmd
#!../../bin/linux-x86_64/pi
## You may have to change pi to something else
## everywhere it appears in this file
< envPaths
epicsEnvSet("IOC","iocPI")
epicsEnvSet("TOP","/home/xlabsrv2/epics/IOCs/piIOC_pi")
epicsEnvSet("SUPPORT","/home/xlabsrv2/epics/synApps_6_3/support/")
epicsEnvSet("ASYN","/home/xlabsrv2/epics/synApps_6_3/support//asyn-R4-44-2")
epicsEnvSet("STREAM","/home/xlabsrv2/epics/synApps_6_3/support//StreamDevice-2-8-24")
epicsEnvSet("MOTOR","/home/xlabsrv2/epics/synApps_6_3/support/motor-R7-3-1")
epicsEnvSet("EPICS_BASE","/home/xlabsrv2/epics")
epicsEnvSet("SNCSEQ","/home/xlabsrv2/epics/synApps_6_3/support//sequencer-mirror-R2-2-9")
epicsEnvSet("BUSY","/home/xlabsrv2/epics/synApps_6_3/support//busy-R1-7-4")
epicsEnvSet("IPAC","/home/xlabsrv2/epics/synApps_6_3/support//ipac-2-16")
epicsEnvSet("LUA","/home/xlabsrv2/epics/synApps_6_3/support//lua-R3-1")
######cd "${TOP}"
## Register all support components
dbLoadDatabase "../../dbd/pi.dbd"
pi_registerRecordDeviceDriver pdbbase
#####cd "${TOP}/iocBoot/${IOC}"
## motorUtil (allstop & alldone)
dbLoadRecords("/home/xlabsrv2/epics/synApps_6_3/support/motor-R7-3-1/db/motorUtil.db",
"P=pi_1:")
drvAsynIPPortConfigure("serial_pi_1","100.100.0.11:4001",0,0,0)
asynOctetSetInputEos("serial_pi_1",0,"\n")
asynOctetSetOutputEos("serial_pi_1",0,"\n")
##
< PI_C663.cmd
#drvAsynSerialPortConfigure("serial1", "/dev/ttyS0", 0, 0, 0)
dbLoadTemplate("PI_C663.substitutions")
# PI C-663 driver setup parameters:
# (1) maximum number of controllers in system
# (2) motor task polling rate (min=1Hz,max=60Hz)
PIC663Setup(2, 10)
# PI C-663 driver configuration parameters:
# (1) controller# being configured
# (2) ASYN port name
# (3) address (GPIB only)
PIC663Config(0, "serial_pi_1")
#PIC663Config(1, "serial_pi_1")
#PIC663Config(2, "serial_pi_1")
#!drvPIC844debug = 4
var drvPIC663debug 10
#!< PI_C844.cmd
#!< PI_C848.cmd
#!< PI_E662.cmd
#!< PI_C862.cmd
#!< PI_E816.cmd
iocInit
Starting iocInit
############################################################################
## EPICS R7.0.8.2-DEV
## Rev. R7.0.8.1-142-g144f9756eac4e800f18d
## Rev. Date Git: 2025-02-05 10:16:16 -0600
############################################################################
recGblRecordError: motor_init_record_com(): card does not exist! Illegal
field value PV: pi_1:m1
recGblRecordError: motor_init_record_com(): card does not exist! Illegal
field value PV: pi_1:m2
iocRun: All initialization complete
## motorUtil (allstop & alldone)
motorUtilInit("pi_1:")
# Boot complete
so no Info!
2) including the lines in st.cmd
asynSetTraceIOMask("serial_pi_1", 0, ASCII)
asynSetTraceMask("serial_pi_1", 0, ERROR|DRIVER)
the exit is
[xlabsrv2@xlabsrv2 iocPI]$ ./st.cmd
#!../../bin/linux-x86_64/pi
## You may have to change pi to something else
## everywhere it appears in this file
< envPaths
epicsEnvSet("IOC","iocPI")
epicsEnvSet("TOP","/home/xlabsrv2/epics/IOCs/piIOC_pi")
epicsEnvSet("SUPPORT","/home/xlabsrv2/epics/synApps_6_3/support/")
epicsEnvSet("ASYN","/home/xlabsrv2/epics/synApps_6_3/support//asyn-R4-44-2")
epicsEnvSet("STREAM","/home/xlabsrv2/epics/synApps_6_3/support//StreamDevice-2-8-24")
epicsEnvSet("MOTOR","/home/xlabsrv2/epics/synApps_6_3/support/motor-R7-3-1")
epicsEnvSet("EPICS_BASE","/home/xlabsrv2/epics")
epicsEnvSet("SNCSEQ","/home/xlabsrv2/epics/synApps_6_3/support//sequencer-mirror-R2-2-9")
epicsEnvSet("BUSY","/home/xlabsrv2/epics/synApps_6_3/support//busy-R1-7-4")
epicsEnvSet("IPAC","/home/xlabsrv2/epics/synApps_6_3/support//ipac-2-16")
epicsEnvSet("LUA","/home/xlabsrv2/epics/synApps_6_3/support//lua-R3-1")
######cd "${TOP}"
## Register all support components
dbLoadDatabase "../../dbd/pi.dbd"
pi_registerRecordDeviceDriver pdbbase
#####cd "${TOP}/iocBoot/${IOC}"
## motorUtil (allstop & alldone)
dbLoadRecords("/home/xlabsrv2/epics/synApps_6_3/support/motor-R7-3-1/db/motorUtil.db",
"P=pi_1:")
drvAsynIPPortConfigure("serial_pi_1","100.100.0.11:4001",0,0,0)
asynOctetSetInputEos("serial_pi_1",0,"\n")
asynOctetSetOutputEos("serial_pi_1",0,"\n")
asynSetTraceIOMask("serial_pi_1", 0, ASCII)
asynSetTraceMask("serial_pi_1", 0, ERROR|DRIVER)
##
< PI_C663.cmd
#drvAsynSerialPortConfigure("serial1", "/dev/ttyS0", 0, 0, 0)
dbLoadTemplate("PI_C663.substitutions")
# PI C-663 driver setup parameters:
# (1) maximum number of controllers in system
# (2) motor task polling rate (min=1Hz,max=60Hz)
PIC663Setup(2, 10)
# PI C-663 driver configuration parameters:
# (1) controller# being configured
# (2) ASYN port name
# (3) address (GPIB only)
PIC663Config(0, "serial_pi_1")
#PIC663Config(1, "serial_pi_1")
#PIC663Config(2, "serial_pi_1")
#!drvPIC844debug = 4
#var drvPIC663debug 10
#!< PI_C844.cmd
#!< PI_C848.cmd
#!< PI_E662.cmd
#!< PI_C862.cmd
#!< PI_E816.cmd
iocInit
Starting iocInit
############################################################################
## EPICS R7.0.8.2-DEV
## Rev. R7.0.8.1-142-g144f9756eac4e800f18d
## Rev. Date Git: 2025-02-05 10:16:16 -0600
############################################################################
2025/08/29 11:35:41.910 100.100.0.11:4001 write 5
0VE
2025/08/29 11:35:43.912 100.100.0.11:4001 write 5
0VE
2025/08/29 11:35:45.915 100.100.0.11:4001 write 5
0VE
recGblRecordError: motor_init_record_com(): card does not exist! Illegal
field value PV: pi_1:m1
recGblRecordError: motor_init_record_com(): card does not exist! Illegal
field value PV: pi_1:m2
iocRun: All initialization complete
## motorUtil (allstop & alldone)
motorUtilInit("pi_1:")
# Boot complete
it seems some problems with "0VE". Using a direct comunication "nc" I
found this
0VE
1 ERR?
0 1 2
1 VE
1 ERR?
0 1 2
1VE
1 ERR?
0 1 2
VER?
FW_DSP: V00.046
It seems that there are some problems with VE command. Following the
manual
(https://urldefense.us/v3/__http://xdel.ru/downloads/PI/PI-old/Manuals/C-663.11_User_MS208E_100.pdf__;!!G_uCfscf7eWS!e2RnKfjNz_C-hh3ijVjPaOES5efTEPDKjOqbAyFx9r8_bphvhQX5jCO1lHgV6KhIzYPUulp26ze32ZjUHdqMKzDne2TYgws_YQ$
for example), the VE commands dosen't exist and even in daisy chain, the
right command is VER? without mentioning any card/controller.
What's I'm wrong?
thank you for your help
Dariush
Il 28/08/2025 16:32, Peterson, Kevin M. ha scritto:
Dariush,
Thank you for following up. I'm sorry I didn't reply sooner. Your message got lost in a sea of email.
I have not had a chance to look into merging the daisy-chain code.
The following error means the IOC did not recieve a reply from the controller when it first polled the controller during iocInit:
recGblRecordError: motor_init_record_com(): card does not exist!
There are two ways you can troubleshoot what is happening:
1. Turn on the motor driver debugging by setting the drvPIC663debug to a non-zero value:
var drvPIC663debug 10
2. Turn on asyn traces for the serial_pi_1 port after the call to drvAsynIPPortConfigure and before iocInit:
asynSetTraceIOMask("serial_pi_1", 0, ASCII)
asynSetTraceMask("serial_pi_1", 0, ERROR|DRIVER)
You should see that messages are being sent to the controller but not received. Specifically, you should see three failed attempts at sending the "VE" command, to query the controllers ID string:
https://urldefense.us/v3/__https://github.com/epics-motor/motorPI/blob/802e15ebceeb3f5aefdef7a011c453ea005a7d03/piApp/src/drvPIC663.cc*L509-L527__;Iw!!G_uCfscf7eWS!e2RnKfjNz_C-hh3ijVjPaOES5efTEPDKjOqbAyFx9r8_bphvhQX5jCO1lHgV6KhIzYPUulp26ze32ZjUHdqMKzDne2SneowWWQ$
Can you share the serial and operating settings of the moxa that is being used to talk to the C-663?
Kevin
________________________________________
From: Dariush Hampai <[email protected]>
Sent: Friday, August 8, 2025 8:37 AM
To: Peterson, Kevin M.; [email protected]
Cc: Rivers, Mark L.; Pearson, Matthew
Subject: Re: help requested about motorPI module
Hi Kevin, awaiting the upgrade of PIGC2 for daisy chain mode, I trid to use the piMotor module. Following your suggestions, the PI_C663. cmd is: dbLoadTemplate("PI_C663. substitutions") # PI C-663 driver setup parameters: # (1) maximum number
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd
Hi Kevin,
awaiting the upgrade of PIGC2 for daisy chain mode, I trid to use the
piMotor module.
Following your suggestions, the PI_C663.cmd is:
dbLoadTemplate("PI_C663.substitutions")
# PI C-663 driver setup parameters:
# (1) maximum number of controllers in system
# (2) motor task polling rate (min=1Hz,max=60Hz)
PIC663Setup(2, 10)
# PI C-663 driver configuration parameters:
# (1) controller# being configured
# (2) ASYN port name
# (3) address (GPIB only)
PIC663Config(0, "serial_pi_1")
and the PI_C663.substitutions is
file "$(MOTOR)/db/motor.db"
{
pattern
{P, N, M, DTYP, C, S, DESC, EGU, DIR,
VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT}
{pi_1:, 1, "m$(N)", "PIC663", 0, 0, "L-611.90 $(N)", degrees,
Pos, 25, .1, 200, 0, 1, .2, 102400, 4,
1000000, -100, ""}
{pi_1:, 2, "m$(N)", "PIC663", 1, 0, "PLS-85 $(N)", mm, Pos,
10, .2, 200, 0, 1, .2, 409600, 3, 102, -1, ""}
}
(I tried also with C=0 and S=1 for the N=2).
However I receive the following output when start the IOC
[xlabsrv2@xlabsrv2 iocPI]$ ./st.cmd
#!../../bin/linux-x86_64/pi
## You may have to change pi to something else
## everywhere it appears in this file
< envPaths
epicsEnvSet("IOC","iocPI")
epicsEnvSet("TOP","/home/xlabsrv2/epics/IOCs/piIOC")
epicsEnvSet("SUPPORT","/home/xlabsrv2/epics/synApps_6_3/support/")
epicsEnvSet("ASYN","/home/xlabsrv2/epics/synApps_6_3/support//asyn-R4-44-2")
epicsEnvSet("STREAM","/home/xlabsrv2/epics/synApps_6_3/support//StreamDevice-2-8-24")
epicsEnvSet("MOTOR","/home/xlabsrv2/epics/synApps_6_3/support/motor-R7-3-1")
epicsEnvSet("EPICS_BASE","/home/xlabsrv2/epics")
epicsEnvSet("SNCSEQ","/home/xlabsrv2/epics/synApps_6_3/support//sequencer-mirror-R2-2-9")
epicsEnvSet("BUSY","/home/xlabsrv2/epics/synApps_6_3/support//busy-R1-7-4")
epicsEnvSet("IPAC","/home/xlabsrv2/epics/synApps_6_3/support//ipac-2-16")
epicsEnvSet("LUA","/home/xlabsrv2/epics/synApps_6_3/support//lua-R3-1")
######cd "${TOP}"
## Register all support components
dbLoadDatabase "../../dbd/pi.dbd"
pi_registerRecordDeviceDriver pdbbase
#####cd "${TOP}/iocBoot/${IOC}"
## motorUtil (allstop & alldone)
dbLoadRecords("/home/xlabsrv2/epics/synApps_6_3/support/motor-R7-3-1/db/motorUtil.db",
"P=pi_1:")
drvAsynIPPortConfigure("serial_pi_1","100.100.0.11:4001",0,0,0)
asynOctetSetInputEos("serial_pi_1",0,"\n")
asynOctetSetOutputEos("serial_pi_1",0,"\n")
##
< PI_C663.cmd
#drvAsynSerialPortConfigure("serial1", "/dev/ttyS0", 0, 0, 0)
dbLoadTemplate("PI_C663.substitutions")
# PI C-663 driver setup parameters:
# (1) maximum number of controllers in system
# (2) motor task polling rate (min=1Hz,max=60Hz)
PIC663Setup(2, 10)
# PI C-663 driver configuration parameters:
# (1) controller# being configured
# (2) ASYN port name
# (3) address (GPIB only)
PIC663Config(0, "serial_pi_1")
#!drvPIC844debug = 4
#!< PI_C844.cmd
#!< PI_C848.cmd
#!< PI_E662.cmd
#!< PI_C862.cmd
#!< PI_E816.cmd
iocInit
Starting iocInit
############################################################################
## EPICS R7.0.8.2-DEV
## Rev. R7.0.8.1-142-g144f9756eac4e800f18d
## Rev. Date Git: 2025-02-05 10:16:16 -0600
############################################################################
recGblRecordError: motor_init_record_com(): card does not exist! Illegal
field value PV: pi_1:m1
recGblRecordError: motor_init_record_com(): card does not exist! Illegal
field value PV: pi_1:m2
iocRun: All initialization complete
## motorUtil (allstop & alldone)
motorUtilInit("pi_1:")
# Boot complete
In someway something is wrong (the error led on the controller m1 is on
while the error led of the controlle m2 is off).
Did not understand the meaning of:
recGblRecordError: motor_init_record_com(): card does not exist! Illegal
field value PV: pi_1:m1
recGblRecordError: motor_init_record_com(): card does not exist! Illegal
field value PV: pi_1:m2
Moreover on PI_C663.cmd I use
# PI C-663 driver configuration parameters:
# (1) controller# being configured
# (2) ASYN port name
# (3) address (GPIB only)
PIC663Config(0, "serial_pi_1") -> "0" as controller# being configured...
is it right? I have also to put same for the second controller?
awaiting your reply
Dariush
Il 11/07/2025 18:42, Peterson, Kevin M. ha scritto:
Dariush,
The support in motorPI is very limited compared to the support in motorPIGCS2. I don't know if copying the C-844 support and renaming it for the C-663 will work. If it does work, it would be difficult to add missing features to the motorPI support, because the drivers are model-1 drivers, which aren't easily extensible.
A simpler approach would be to use one serial port per C-663 and use motorPIGCS2 or do use the old verison of motorPIGCS2 that supports daisy-chaining.
I will attempt to answer your questions:
1. That st.cmd looks ok to me.
2. In the PI_C663.cmd, this line only specifies one controller:
PIC663Setup(1, 10)
I would change it to support two controllers:
PIC663Setup(2, 10)
3. Macro explanations:
N = a macro that is usually only used to set both the motor name (M) and description (DESC) fields to "m$(N)." This isn't actually a macro that is required by the database and can be exlcuded if none of the values use "$(N)".
M = the motor's name. The full record name of the motor is "$(P)$(M)"
C = card index (starting from zero)
S = slot index (starting from zero)
For a daisy chain of multi-axis controllers, C is usually the index of the controller and S is usually the index of the motor. Some controllers, however, are smart enough to know that multiple controllers are daisy chained and and present themselves as a single controller (C=0 for all axes), so the S in that case would range from 0 to (num controllers * num axes per control - 1).
I don't know how the daisy-chain addressing works with the C-663 controller, so I don't know if the motor record for the 2nd axis should have C=0 & S=1 or C=1 and S=0.
Kevin
--
************************************
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: help requested about motorPI module Dariush Hampai via Tech-talk
- References:
- Re: help requested about motorPI module Dariush Hampai via Tech-talk
- Re: help requested about motorPI module Peterson, Kevin M. via Tech-talk
- Navigate by Date:
- Prev:
Re: Building EPICS base with Yocto Lucas Magalhães via Tech-talk
- Next:
Re: Building modbus 3-4 on rhel-9 epics 3.15.9 Sue Witherspoon 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>
2026
- Navigate by Thread:
- Prev:
Re: help requested about motorPI module Peterson, Kevin M. via Tech-talk
- Next:
Re: help requested about motorPI module Dariush Hampai 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>
2026
|