|
Please change these lines
asynSetTraceMask("mclennanMotor", 0, 2)
asynSetTraceIOMask("mclennanMotor", 0, 2)
To this:
asynSetTraceMask("mclennanMotor", 0, ERROR|DRIVER)
asynSetTraceIOMask("mclennanMotor", 0, ESCAPE)
You don't seem to be getting any response from the device, i.e. there are no "read" messages. The poller thread should be reading the status periodically.
I notice that you have not set an output terminator or input terminator with asynOctetSetInputEos or asynOctetSetInputEos. It seems like that could be the issue.
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of LONG FENG via Tech-talk <tech-talk at aps.anl.gov>
Sent: Friday, January 9, 2026 1:32 AM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: The motor module is unable to control the PM600 motor.
Hi all,
During the configuration of the motor module, everything seems normal: communication is working, and startup proceeds correctly. However, it is still unable to control the motor. Below is the output information from the startup
process:
#!../../bin/linux-x86_64/motor
< envPaths
epicsEnvSet("IOC","iocmotor")
epicsEnvSet("TOP","/home/training/ConditionMonitoring")
epicsEnvSet("EPICS_BASE","/ics/tools/base-7.0.6")
epicsEnvSet("PYDEVICE","/ics/tools/PyDevice-R1.1.1")
epicsEnvSet("PVXS","/ics/tools/pvxs")
epicsEnvSet("ETHER_IP","/ics/tools/ether_ip")
epicsEnvSet("SNCSEQ","/ics/tools/seq-2.2.9")
epicsEnvSet("AUTOSAVE","/ics/tools/autosave-R5-10-2")
epicsEnvSet("ASYN","/ics/tools/asyn4-38")
epicsEnvSet("STREAM","/ics/tools/StreamDevice-master")
epicsEnvSet("MOTOR","/ics/tools/motor")
epicsEnvSet("BUSY","/ics/tools/busy-1-6-1")
epicsEnvSet("MODBUS","/ics/tools/modbus")
epicsEnvSet("CALC","/ics/tools/calc")
epicsEnvSet("STD","/ics/tools/std")
cd "/home/training/ConditionMonitoring"
## Register all support components
dbLoadDatabase "dbd/motor.dbd"
motor_registerRecordDeviceDriver pdbbase
drvAsynIPPortConfigure("mclennanMotor", "192.168.1.15:4196")
asynSetTraceMask("mclennanMotor", 0, 2)
asynSetTraceIOMask("mclennanMotor", 0, 2)
# --------- initialize PM304 driver (must be compiled into IOC) ----------
# PM304Setup(num_cards, scan_rate)
# num_cards: maximum controllers, scan_rate: polling rate (1..60) in 1/60s units
PM304Setup(1, 5)
# PM304Config(cardIndex, portName, n_axes)
# cardIndex: 0-based index of controller
# portName: asyn port name above
# n_axes: number of axes on that controller (set to actual count)
PM304Config(0, "mclennanMotor", 1)
## Load record instances
#dbLoadRecords("db/motor.db","user=flon")
dbLoadRecords("db/mclennanMotor.db", "P=Mclennan, M=SM9749, PORT=mclennanMotor, ADDR=1")
cd "/home/training/ConditionMonitoring/iocBoot/iocmotor"
iocInit
Starting iocInit
############################################################################
## EPICS R7.0.6
## Rev. 2021-09-28T15:27-0400
############################################################################
2026/01/09 02:19:36.711 asynOctetSyncIO flush
2026/01/09 02:19:36.713 asynOctetSyncIO wrote:
1OA
2026/01/09 02:19:38.729 asynOctetSyncIO wrote:
1ST
2026/01/09 02:19:40.743 asynOctetSyncIO wrote:
1ID
2026/01/09 02:19:42.753 asynOctetSyncIO wrote:
1ID
2026/01/09 02:19:44.769 asynOctetSyncIO wrote:
1OS
2026/01/09 02:19:46.780 asynOctetSyncIO wrote:
1OA
iocRun: All initialization complete
## Start any sequence programs
#seq sncxxx,"user=flon"
epics>
When I set $(P)$(M).VAL to 100, the output is:
epics> 2026/01/09 02:21:31.520 asynOctetSyncIO wrote:
1SV1
2026/01/09 02:21:33.536 asynOctetSyncIO wrote:
1SA2
2026/01/09 02:21:35.550 asynOctetSyncIO wrote:
1SD2
2026/01/09 02:21:37.562 asynOctetSyncIO wrote:
1MA100
2026/01/09 02:21:39.578 asynOctetSyncIO wrote:
1OS
2026/01/09 02:21:41.588 asynOctetSyncIO wrote:
1OA
2026/01/09 02:21:43.603 asynOctetSyncIO wrote:
1SV1
2026/01/09 02:21:45.616 asynOctetSyncIO wrote:
1SA2
2026/01/09 02:21:47.628 asynOctetSyncIO wrote:
1SD2
2026/01/09 02:21:49.640 asynOctetSyncIO wrote:
1MA100
2026/01/09 02:21:51.669 asynOctetSyncIO wrote:
1OS
2026/01/09 02:21:53.706 asynOctetSyncIO wrote:
1OA
2026/01/09 02:21:55.720 asynOctetSyncIO wrote:
1SV1
2026/01/09 02:21:57.733 asynOctetSyncIO wrote:
1SA2
2026/01/09 02:21:59.745 asynOctetSyncIO wrote:
1SD2
2026/01/09 02:22:01.759 asynOctetSyncIO wrote:
1MA100
No errors are reported, but the motor still does not move. Are there any other aspects I should check?
Here is my .db file; perhaps it can help identify the problem.
record(motor, "$(P)$(M)")
{
field(DESC, "PM600")
field(DTYP, "Mclennan PM304")
# field(OUT, "@asyn($(PORT) $(ADDR))")
field(OUT, "#C0 S0 @")
field(EGU, "mm")
field(MRES, "1")
field(VELO, "1")
field(ACCL, ".5")
field(VBAS, ".1")
field(DHLM, "100")
field(DLLM, "0")
field(TWV, "1")
field(PREC, "1")
}
Feng
|