epics-motor / motorSmarAct

EPICS motor drivers for SmarAct controllers
3 stars 13 forks source link

smaract scu on windows x86_64 error #9

Open LeeYangLBLBCS opened 3 years ago

LeeYangLBLBCS commented 3 years ago

I got this error when trying to start smarAct IOC on windows. Does anyone know what the cause might be?

C:\epics\modules\synApps_6_1_epics7\support\motor-R7-2-1\modules\motorSmarAct\iocs\smarActIOC\iocBoot\iocSmarAct>..\..\bin\windows-x64\smarAct.exe st.cmd
#!../../bin/linux-x86_64/smarAct
< envPaths
epicsEnvSet("IOC","iocSmarAct")
epicsEnvSet("TOP","C:/epics/modules/synApps_6_1_epics7/support/motor-R7-2-1/modules/motorSmarAct/iocs/smarActIOC")
epicsEnvSet("AUTOSAVE","C:/epics/modules/synApps_6_1_epics7/support/autosave-R5-10")
epicsEnvSet("MOTOR","C:/epics/modules/synApps_6_1_epics7/support/motor-R7-2-1")
epicsEnvSet("ASYN","C:/epics/modules/synApps_6_1_epics7/support/asyn-R4-38")
epicsEnvSet("SNCSEQ","C:/epics/modules/synApps_6_1_epics7/support/seq-2-2-7")
epicsEnvSet("BUSY","C:/epics/modules/synApps_6_1_epics7/support/busy-R1-7-2")
epicsEnvSet("IPAC","C:/epics/modules/synApps_6_1_epics7/support/ipac-2-15")
epicsEnvSet("EPICS_BASE","C:/epics/base-7.0.4")
epicsEnvSet("SUPPORT","C:/epics/modules/synApps_6_1_epics7/support")
cd "C:/epics/modules/synApps_6_1_epics7/support/motor-R7-2-1/modules/motorSmarAct/iocs/smarActIOC"
## Register all support components
dbLoadDatabase "dbd/smarAct.dbd"
smarAct_registerRecordDeviceDriver pdbbase
cd "C:/epics/modules/synApps_6_1_epics7/support/motor-R7-2-1/modules/motorSmarAct/iocs/smarActIOC/iocBoot/iocSmarAct"
## motorUtil (allstop & alldone)
dbLoadRecords("C:/epics/modules/synApps_6_1_epics7/support/motor-R7-2-1/db/motorUtil.db", "P=smarAct:")
# Uncomment one of the following lines for MCS or MCS2 controller
#< smaractmcs.iocsh
#< smaractmcs2.iocsh
< smaractscu.iocsh
### Motors
# Motors substitutions, customize this for your motor
dbLoadTemplate "motor.substitutions.smaractscu"
# Configure each controller
drvAsynSerialPortConfigure("serial1","COM3")
asynOctetSetOutputEos("serial1",0,"\n")
asynOctetSetInputEos("serial1",0,"\n")
#asynSetTraceIOMask("serial1",0,2)
#asynSetTraceMask("serial1",0,9)
#drvAsynSerialPortConfigure("serial2","COM6")
#asynOctetSetOutputEos("serial2",0,"\n")
#asynOctetSetInputEos("serial2",0,"\n")
#asynSetTraceIOMask("serial2",0,2)
#asynSetTraceMask("serial2",0,9)
# Controller port, asyn port, number of axis, moving poll period, idle poll period
# smarActSCUCreateController(const char *motorPortName, const char *ioPortName, int numAxes, double movingPollPeriod, double idlePollPeriod);
smarActSCUCreateController("SCU1", "serial1", 2, .05, 1.0)
#smarActSCUCreateController("SCU2", "serial2", 3, .05, 1.0)
#asynSetTraceMask("SCU1", 0, 11)
#asynSetTraceMask("SCU1", 1, 11)
#asynSetTraceMask("SCU1", 2, 11)
#asynSetTraceMask("SCU2", 0, 11)
#asynSetTraceMask("SCU2", 1, 11)
#asynSetTraceMask("SCU2", 2, 11)
# Controller port, axis number, controller channel
# smarActSCUCreateAxis(const char *motorPortName, int axisNumber, int channel)
smarActSCUCreateAxis("SCU1", 0, 0);
2021/03/15 15:20:32.572 ERROR: sendCmd: status=1, sent: :GCLF0, received:
SmarActSCUAxis::SmarActSCUAxis -- channel 0 ASYN error 1
#smarActSCUCreateAxis("SCU1", 1, 1);
#smarActSCUCreateAxis("SCU1", 2, 2);
#smarActSCUCreateAxis("SCU2", 0, 0);
#smarActSCUCreateAxis("SCU2", 1, 1);
#smarActSCUCreateAxis("SCU2", 2, 2);
# Need to sleep for a second to allow poller to run.
# Without this the motors won't have their initial positions
epicsThreadSleep(1.0)
##
iocInit
Starting iocInit
############################################################################
## EPICS R7.0.4
## Rev. 2021-03-12T11:35
############################################################################
2021/03/15 15:20:34.587 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:20:34.589 devMotorAsyn::init_record: smarAct:m2 pasynGenericPointer->read returned 2021/03/15 15:20:34.589 devMotorAsyn::asynCallback: smarAct:m2 pasyn{Float64,Int32}->write returned
2021/03/15 15:20:34.589 devMotorAsyn::asynCallback: smarAct:m2 pasyn{Float64,Int32}->write returned
2021/03/15 15:20:34.590 devMotorAsyn::asynCallback: smarAct:m2 pasyn{Float64,Int32}->write returned
iocRun: All initialization complete
## motorUtil (allstop & alldone)
motorUtilInit("smarAct:")
# Boot complete
epics> 2021/03/15 15:20:36.666 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:20:36.666 smarAct:m2Offset devAsynFloat64::processCallbackOutput process write error
2021/03/15 15:20:36.668 smarAct:m2Resolution devAsynFloat64::processCallbackOutput process write error
2021/03/15 15:20:36.669 smarAct:m2Direction devAsynInt32::processCallbackOutput process write error
2021/03/15 15:20:38.742 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:20:40.816 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:20:42.888 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:20:46.964 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:20:49.046 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:20:51.129 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:20:53.206 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:20:57.299 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:20:59.391 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:21:03.469 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:21:05.549 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:21:09.647 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:21:13.735 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:21:15.811 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:21:19.905 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 15:21:21.985 ERROR: sendCmd: status=1, sent: :GA0, received:

epics>
epics> 2021/03/15 15:21:24.063 ERROR: sendCmd: status=1, sent: :GA0, received:
e2021/03/15 15:21:26.139 ERROR: sendCmd: status=1, sent: :GA0, received:
xit
MarkRivers commented 3 years ago

It looks to me like it is probably not communicating with the device. You should uncomment these 2 lines. That will then show all of the communication from asyn port serial1.

#asynSetTraceIOMask("serial1",0,2)
#asynSetTraceMask("serial1",0,9)

Note that I edited your comment to make it all literal text, which is much easier to read.

LeeYangLBLBCS commented 3 years ago

With these lines uncommented,

asynSetTraceIOMask("serial1",0,2)
asynSetTraceMask("serial1",0,9)

It shows the actual data sent. (none stop). Does SCU have a dual communication mode (ascii/binary) like MCS does? Maybe the firmware is running in the wrong mode?

C:\epics\modules\synApps_6_1_epics7\support\motor-R7-2-1\modules\motorSmarAct\iocs\smarActIOC\iocBoot\iocSmarAct>..\..\bin\windows-x64\smarAct.exe st.cmd
#!../../bin/linux-x86_64/smarAct
< envPaths
epicsEnvSet("IOC","iocSmarAct")
epicsEnvSet("TOP","C:/epics/modules/synApps_6_1_epics7/support/motor-R7-2-1/modules/motorSmarAct/iocs/smarActIOC")
epicsEnvSet("AUTOSAVE","C:/epics/modules/synApps_6_1_epics7/support/autosave-R5-10")
epicsEnvSet("MOTOR","C:/epics/modules/synApps_6_1_epics7/support/motor-R7-2-1")
epicsEnvSet("ASYN","C:/epics/modules/synApps_6_1_epics7/support/asyn-R4-38")
epicsEnvSet("SNCSEQ","C:/epics/modules/synApps_6_1_epics7/support/seq-2-2-7")
epicsEnvSet("BUSY","C:/epics/modules/synApps_6_1_epics7/support/busy-R1-7-2")
epicsEnvSet("IPAC","C:/epics/modules/synApps_6_1_epics7/support/ipac-2-15")
epicsEnvSet("EPICS_BASE","C:/epics/base-7.0.4")
epicsEnvSet("SUPPORT","C:/epics/modules/synApps_6_1_epics7/support")
cd "C:/epics/modules/synApps_6_1_epics7/support/motor-R7-2-1/modules/motorSmarAct/iocs/smarActIOC"
## Register all support components
dbLoadDatabase "dbd/smarAct.dbd"
smarAct_registerRecordDeviceDriver pdbbase
cd "C:/epics/modules/synApps_6_1_epics7/support/motor-R7-2-1/modules/motorSmarAct/iocs/smarActIOC/iocBoot/iocSmarAct"
## motorUtil (allstop & alldone)
dbLoadRecords("C:/epics/modules/synApps_6_1_epics7/support/motor-R7-2-1/db/motorUtil.db", "P=smarAct:")
# Uncomment one of the following lines for MCS or MCS2 controller
#< smaractmcs.iocsh
#< smaractmcs2.iocsh
< smaractscu.iocsh
### Motors
# Motors substitutions, customize this for your motor
dbLoadTemplate "motor.substitutions.smaractscu"
# Configure each controller
drvAsynSerialPortConfigure("serial1","COM3")
asynOctetSetOutputEos("serial1",0,"\n")
asynOctetSetInputEos("serial1",0,"\n")
asynSetTraceIOMask("serial1",0,2)
asynSetTraceMask("serial1",0,9)
#drvAsynSerialPortConfigure("serial2","COM6")
#asynOctetSetOutputEos("serial2",0,"\n")
#asynOctetSetInputEos("serial2",0,"\n")
#asynSetTraceIOMask("serial2",0,2)
#asynSetTraceMask("serial2",0,9)
# Controller port, asyn port, number of axis, moving poll period, idle poll period
# smarActSCUCreateController(const char *motorPortName, const char *ioPortName, int numAxes, double movingPollPeriod, double idlePollPeriod);
smarActSCUCreateController("SCU1", "serial1", 2, .05, 1.0)
#smarActSCUCreateController("SCU2", "serial2", 3, .05, 1.0)
#asynSetTraceMask("SCU1", 0, 11)
#asynSetTraceMask("SCU1", 1, 11)
#asynSetTraceMask("SCU1", 2, 11)
#asynSetTraceMask("SCU2", 0, 11)
#asynSetTraceMask("SCU2", 1, 11)
#asynSetTraceMask("SCU2", 2, 11)
# Controller port, axis number, controller channel
# smarActSCUCreateAxis(const char *motorPortName, int axisNumber, int channel)
smarActSCUCreateAxis("SCU1", 0, 0);
2021/03/15 16:47:10.921 \\.\COM3 write 7
:GCLF0\n
2021/03/15 16:47:10.947 \\.\COM3 read 1
\000
2021/03/15 16:47:14.951 ERROR: sendCmd: status=1, sent: :GCLF0, received:
SmarActSCUAxis::SmarActSCUAxis -- channel 0 ASYN error 1
#smarActSCUCreateAxis("SCU1", 1, 1);
2021/03/15 16:47:14.953 \\.\COM3 write 5
#smarActSCUCreateAxis("SCU1", 2, 2);
:G#smarActSCUCreateAxis("SCU2", 0, 0);
A0#smarActSCUCreateAxis("SCU2", 1, 1);
\n
#smarActSCUCreateAxis("SCU2", 2, 2);
# Need to sleep for a second to allow poller to run.
# Without this the motors won't have their initial positions
epicsThreadSleep(1.0)
2021/03/15 16:47:14.968 \\.\COM3 read 1
\000
##
iocInit
Starting iocInit
############################################################################
## EPICS R7.0.4
## Rev. 2021-03-12T11:35
############################################################################
2021/03/15 16:47:16.984 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 16:47:16.986 devMotorAsyn::init_record: smarAct:m2 pasynGenericPointer->read returned 2021/03/15 16:47:16.987 devMotorAsyn::asynCallback: smarAct:m2 pasyn{Float64,Int32}->write returned
2021/03/15 16:47:16.987 devMotorAsyn::asynCallback: smarAct:m2 pasyn{Float64,Int32}->write returned
2021/03/15 16:47:16.988 devMotorAsyn::asynCallback: smarAct:m2 pasyn{Float64,Int32}->write returned
iocRun: All initialization complete
## motorUtil (allstop & alldone)
motorUtilInit("smarAct:")
2021/03/15 16:47:17.513 smarAct:m2Offset devAsynFloat64::processCallbackOutput process write error
# Boot complete
2021/03/15 16:47:17.514 smarAct:m2Resolution devAsynFloat64::processCallbackOutput process write error
2021/03/15 16:47:17.516 smarAct:m2Direction devAsynInt32::processCallbackOutput process write error
epics> 2021/03/15 16:47:17.998 \\.\COM3 write 5
:GA0\n
2021/03/15 16:47:18.011 \\.\COM3 read 1
\000
2021/03/15 16:47:20.016 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 16:47:21.024 \\.\COM3 write 5
:GA0\n
2021/03/15 16:47:21.036 \\.\COM3 read 1
\000
2021/03/15 16:47:23.037 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 16:47:24.046 \\.\COM3 write 5
:GA0\n
2021/03/15 16:47:24.058 \\.\COM3 read 1
\000
2021/03/15 16:47:26.064 ERROR: sendCmd: status=1, sent: :GA0, received:
2021/03/15 16:47:27.071 \\.\COM3 write 5
:GA0\n
2021/03/15 16:47:27.083 \\.\COM3 read 1
\000
LeeYangLBLBCS commented 3 years ago

Sorry for the messed up fonts. I don't know how to stop github auto format the text.

MarkRivers commented 3 years ago

Does SCU have a dual communication mode (ascii/binary) like MCS does?

Yes. You need to get the ASCII firmware.

I don't know how to stop github auto format the text.

I just fixed it for you. You need to put a line with 3 backquote characters before and after the literal text.

some literal text

If you edit this comment on Github (use the ... menu on the right) then you will see it.