Files
motorDriverTests/ioc/motors/turboPmac1.cmd

45 lines
1.6 KiB
Batchfile
Executable File

# Configuration for the Turbo PMAC motor controller
#
# Important functions:
#
# turboPmacController:
# Creates the controller object and specifies busy poll period, idle poll period and communication timeout.
# A typical call looks like this:
# turboPmacController("$(NAME)","$(ASYN_PORT)",8,0.01,0.01,0.05);
# with
# 8 = Total number of axes
# 0.05 = Busy poll period in seconds
# 1 = Idle poll period in seconds
# 0.05 = Communication timeout in seconds
#
# setMaxSubsequentTimeouts:
# Set the number of subsequent timeouts which may occur before the user is informed in NICOS.
#
# setThresholdComTimeout:
# Set the maximum number of timeouts which may happen in a given timespan before the user is informed in NICOS.
# A typical call looks like this:
# setThresholdComTimeout("$(NAME)", 3600, 60);
# with
# 3600 = Timespan in seconds
# 60 = Maximum number of timeout events which may occur before the user is informed
epicsEnvSet("NAME","turboPmac1")
epicsEnvSet("ASYN_PORT","p$(NAME)")
pmacAsynIPPortConfigure("$(ASYN_PORT)","$(TURBOPMAC1_IP):$(TURBOPMAC1_PORT)")
turboPmacController("$(NAME)","$(ASYN_PORT)",8,0.01,1,1);
turboPmacAxis("$(NAME)",1);
turboPmacAxis("$(NAME)",5);
# Set the number of subsequent timeouts
setMaxSubsequentTimeouts("$(NAME)", 20);
# Configure the timeout frequency watchdog:
setThresholdComTimeout("$(NAME)", 100, 1);
epicsEnvSet("SINQDBPATH","$(turboPmac_DB)/sinqMotor.db")
dbLoadTemplate("$(IOCDIR)/motors/$(NAME).substitutions", "INSTR=$(PVPREFIX):$(NAME):,CONTROLLER=$(NAME)")
epicsEnvSet("SINQDBPATH","$(turboPmac_DB)/turboPmac.db")
dbLoadTemplate("$(IOCDIR)/motors/$(NAME).substitutions", "INSTR=$(PVPREFIX):$(NAME):,CONTROLLER=$(NAME)")