forked from epics_driver_modules/motorBase
New file for simulation IOC
This commit is contained in:
Executable
+8
@@ -0,0 +1,8 @@
|
||||
TOP = ../..
|
||||
include $(TOP)/configure/CONFIG
|
||||
ARCH = linux-x86
|
||||
#ARCH = vxWorks-ppc604
|
||||
TARGETS = cdCommands
|
||||
TARGETS += envPaths
|
||||
include $(TOP)/configure/RULES.ioc
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
To build any examples;
|
||||
|
||||
- in <motor>/configure/RELEASE: EPICS_BASE and MOTOR must be defined.
|
||||
|
||||
- in <motor>/Makefile: the following two lines must be uncommented;
|
||||
#DIRS := $(DIRS) $(filter-out $(DIRS), motorExApp)
|
||||
#DIRS := $(DIRS) $(filter-out $(DIRS), iocBoot)
|
||||
|
||||
To build this simulation example;
|
||||
|
||||
- in <motor>/configure/RELEASE: ASYN must be defined.
|
||||
|
||||
- in <motor>/motorExApp/Makefile: #DIRS += WithMPF must be uncommented.
|
||||
|
||||
- in <motor>/motorExApp/WithMPF/Makefile: uncomment both,
|
||||
#!WithMPF_LIBS += motorSimSupport
|
||||
and,
|
||||
#!WithMPFVx_LIBS += motorSimSupport
|
||||
|
||||
- in both <motor>/motorExApp/WithMPF/WithMPFInclude.dbd, and in
|
||||
<motor>/motorExApp/WithMPF/WithMPFVxInclude.dbd
|
||||
uncomment, #include "motorSimSupport.dbd"
|
||||
|
||||
- in <motor>/iocBoot/iocSim/Makefile set the target architecture
|
||||
|
||||
Finally, cd <motor>; gnumake clean uninstall; gnumake
|
||||
|
||||
To run this simulation example on a Unix OS;
|
||||
- Set the EPICS_HOST_ARCH environment variable correctly.
|
||||
- Edit the st.cmd.unix file for either sun or linux.
|
||||
- Start the ioc from this directory by executing the following command.
|
||||
|
||||
../../bin/${EPICS_HOST_ARCH}/WithMPF st.cmd.unix
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
file "$(MOTOR)/db/basic_asyn_motor.db"
|
||||
{
|
||||
pattern
|
||||
{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT}
|
||||
{IOC:, 1, m$(N), "asynMotor", motorSim1, 0, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""}
|
||||
{IOC:, 2, m$(N), "asynMotor", motorSim1, 1, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""}
|
||||
{IOC:, 3, m$(N), "asynMotor", motorSim1, 2, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""}
|
||||
{IOC:, 4, m$(N), "asynMotor", motorSim1, 3, "motor $(N)", degrees, Pos, 1, .1, .2, 0, 1, .2, 0.01, 5, 100, -100, ""}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
# The is the ASYN example for communication to 4 simulated motors
|
||||
# "#!" marks lines that can be uncommented.
|
||||
|
||||
# The following must be added for many board support packages
|
||||
#!cd "... IOC st.cmd complete directory path ... "
|
||||
|
||||
< cdCommands
|
||||
#!< ../nfsCommands
|
||||
|
||||
cd topbin
|
||||
|
||||
# If the VxWorks kernel was built using the project facility, the following must
|
||||
# be added before any C++ code is loaded (see SPR #28980).
|
||||
sysCplusEnable=1
|
||||
|
||||
ld < WithMPFVx.munch
|
||||
|
||||
cd startup
|
||||
dbLoadDatabase("$(TOP)/dbd/WithMPFVx.dbd")
|
||||
WithMPF_registerRecordDeviceDriver(pdbbase)
|
||||
dbLoadTemplate("motor.substitutions")
|
||||
|
||||
# Create simulated motors: ( start card , start axis , low limit, high limit, home posn, # cards, # axes to setup)
|
||||
motorSimCreate( 0, 0, -32000, 32000, 0, 1, 4 )
|
||||
# Setup the Asyn layer (portname, low-level driver drvet name, card, number of axes on card)
|
||||
drvAsynMotorConfigure("motorSim1", "motorSim", 0, 4)
|
||||
iocInit
|
||||
@@ -0,0 +1,14 @@
|
||||
# The is the ASYN example for communication to 4 simulated motors
|
||||
# "#!" marks lines that can be uncommented.
|
||||
|
||||
< envPaths
|
||||
|
||||
dbLoadDatabase("$(TOP)/dbd/WithMPF.dbd")
|
||||
WithMPF_registerRecordDeviceDriver(pdbbase)
|
||||
dbLoadTemplate("motor.substitutions")
|
||||
|
||||
# Create simulated motors: ( start card , start axis , low limit, high limit, home posn, # cards, # axes to setup)
|
||||
motorSimCreate( 0, 0, -32000, 32000, 0, 1, 4 )
|
||||
# Setup the Asyn layer (portname, low-level driver drvet name, card, number of axes on card)
|
||||
drvAsynMotorConfigure("motorSim1", "motorSim", 0, 4)
|
||||
iocInit
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
# The is the ASYN example for communication to 4 simulated motors
|
||||
# "#!" marks lines that can be uncommented.
|
||||
|
||||
< envPaths
|
||||
|
||||
dbLoadDatabase("$(TOP)/dbd/WithMPFWin32.dbd")
|
||||
WithMPFWin32_registerRecordDeviceDriver(pdbbase)
|
||||
dbLoadTemplate("motor.substitutions")
|
||||
|
||||
# Create simulated motors: ( start card , start axis , low limit, high limit, home posn, # cards, # axes to setup)
|
||||
motorSimCreate( 0, 0, -32000, 32000, 0, 1, 4 )
|
||||
# Setup the Asyn layer (portname, low-level driver drvet name, card, number of axes on card)
|
||||
drvAsynMotorConfigure("motorSim1", "motorSim", 0, 4)
|
||||
iocInit
|
||||
Reference in New Issue
Block a user