Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
23c03353a1 | |||
4743006880 | |||
0da78d2e72 |
2
Makefile
2
Makefile
@ -14,7 +14,7 @@ REQUIRED+=sinqMotor
|
||||
motorBase_VERSION=7.2.2
|
||||
|
||||
# Specify the version of sinqMotor we want to build against
|
||||
sinqMotor_VERSION=0.13.0
|
||||
sinqMotor_VERSION=0.14
|
||||
|
||||
# These headers allow to depend on this library for derived drivers.
|
||||
HEADERS += src/pmacAsynIPPort.h
|
||||
|
24
README.md
24
README.md
@ -26,13 +26,13 @@ The full turboPmacX.cmd file looks like this:
|
||||
|
||||
```
|
||||
# Define the name of the controller and the corresponding port
|
||||
epicsEnvSet("NAME","turboPmacX")
|
||||
epicsEnvSet("ASYN_PORT","p$(NAME)")
|
||||
epicsEnvSet("DRIVER_PORT","turboPmacX")
|
||||
epicsEnvSet("IP_PORT","p$(DRIVER_PORT)")
|
||||
|
||||
# Create the TCP/IP socket used to talk with the controller. The socket can be adressed from within the IOC shell via the port name.
|
||||
# We do not use the standard asyn port driver here, but a PMAC-specific one which enables the usage of StreamDevices for
|
||||
# communicating with the controller directly.
|
||||
pmacAsynIPPortConfigure("$(ASYN_PORT)","172.28.101.24:1025")
|
||||
pmacAsynIPPortConfigure("$(IP_PORT)","172.28.101.24:1025")
|
||||
|
||||
# Create the controller object with the defined name and connect it to the socket via the port name.
|
||||
# The other parameters are as follows:
|
||||
@ -40,25 +40,25 @@ pmacAsynIPPortConfigure("$(ASYN_PORT)","172.28.101.24:1025")
|
||||
# 0.05: Busy poll period in seconds
|
||||
# 1: Idle poll period in seconds
|
||||
# 1: Socket communication timeout in seconds
|
||||
turboPmacController("$(NAME)", "$(ASYN_PORT)", 8, 0.05, 1, 1);
|
||||
turboPmacController("$(DRIVER_PORT)", "$(IP_PORT)", 8, 0.05, 1, 1);
|
||||
|
||||
# Define some axes for the specified MCU at the given slot (1, 2 and 5). No slot may be used twice!
|
||||
turboPmacAxis("$(NAME)",1);
|
||||
turboPmacAxis("$(NAME)",2);
|
||||
turboPmacAxis("$(NAME)",5);
|
||||
turboPmacAxis("$(DRIVER_PORT)",1);
|
||||
turboPmacAxis("$(DRIVER_PORT)",2);
|
||||
turboPmacAxis("$(DRIVER_PORT)",5);
|
||||
|
||||
# Set the number of subsequent timeouts
|
||||
setMaxSubsequentTimeouts("$(NAME)", 20);
|
||||
setMaxSubsequentTimeouts("$(DRIVER_PORT)", 20);
|
||||
|
||||
# Configure the timeout frequency watchdog: A maximum of 10 timeouts are allowed in 300 seconds before an alarm message is sent.
|
||||
setThresholdComTimeout("$(NAME)", 300, 10);
|
||||
setThresholdComTimeout("$(DRIVER_PORT)", 300, 10);
|
||||
|
||||
# Parametrize the EPICS record database with the substitution file named after the MCU.
|
||||
epicsEnvSet("SINQDBPATH","$(sinqMotor_DB)/sinqMotor.db")
|
||||
dbLoadTemplate("$(TOP)/$(NAME).substitutions", "INSTR=$(INSTR)$(NAME):,CONTROLLER=$(NAME)")
|
||||
dbLoadTemplate("$(TOP)/$(DRIVER_PORT).substitutions", "INSTR=$(INSTR)$(DRIVER_PORT):,CONTROLLER=$(DRIVER_PORT)")
|
||||
epicsEnvSet("SINQDBPATH","$(turboPmac_DB)/turboPmac.db")
|
||||
dbLoadTemplate("$(TOP)/$(NAME).substitutions", "INSTR=$(INSTR)$(NAME):,CONTROLLER=$(NAME)")
|
||||
dbLoadRecords("$(sinqMotor_DB)/asynRecord.db","P=$(INSTR)$(NAME),PORT=$(ASYN_PORT)")
|
||||
dbLoadTemplate("$(TOP)/$(DRIVER_PORT).substitutions", "INSTR=$(INSTR)$(DRIVER_PORT):,CONTROLLER=$(DRIVER_PORT)")
|
||||
dbLoadRecords("$(sinqMotor_DB)/asynRecord.db","P=$(INSTR)$(DRIVER_PORT),PORT=$(IP_PORT)")
|
||||
```
|
||||
|
||||
### Additional records
|
||||
|
@ -496,7 +496,7 @@ static int pmacReadReady(pmacPvt *pPmacPvt, asynUser *pasynUser) {
|
||||
pPmacPvt->portName, thisRead);
|
||||
} else {
|
||||
asynPrint(pasynUser, ASYN_TRACE_ERROR,
|
||||
"%s read pmacReadReady failed status=%d,retval=%d",
|
||||
"%s read pmacReadReady failed status=%d,retval=%d\n",
|
||||
pPmacPvt->portName, status, retval);
|
||||
}
|
||||
return retval;
|
||||
|
Reference in New Issue
Block a user