mirror of
https://github.com/Binary-Coalescence/motorDSM.git
synced 2025-08-04 21:55:40 -05:00
Renamed "*acs*" files to "*dsm*".
This commit is contained in:
31
iocs/dsmIOC/Makefile
Normal file
31
iocs/dsmIOC/Makefile
Normal file
@@ -0,0 +1,31 @@
|
||||
# Makefile at top of application tree
|
||||
TOP = .
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
# Directories to build, any order
|
||||
DIRS += configure
|
||||
DIRS += $(wildcard *Sup)
|
||||
DIRS += $(wildcard *App)
|
||||
DIRS += $(wildcard *Top)
|
||||
DIRS += $(wildcard iocBoot)
|
||||
|
||||
# The build order is controlled by these dependency rules:
|
||||
|
||||
# All dirs except configure depend on configure
|
||||
$(foreach dir, $(filter-out configure, $(DIRS)), \
|
||||
$(eval $(dir)_DEPEND_DIRS += configure))
|
||||
|
||||
# Any *App dirs depend on all *Sup dirs
|
||||
$(foreach dir, $(filter %App, $(DIRS)), \
|
||||
$(eval $(dir)_DEPEND_DIRS += $(filter %Sup, $(DIRS))))
|
||||
|
||||
# Any *Top dirs depend on all *Sup and *App dirs
|
||||
$(foreach dir, $(filter %Top, $(DIRS)), \
|
||||
$(eval $(dir)_DEPEND_DIRS += $(filter %Sup %App, $(DIRS))))
|
||||
|
||||
# iocBoot depends on all *App dirs
|
||||
iocBoot_DEPEND_DIRS += $(filter %App,$(DIRS))
|
||||
|
||||
# Add any additional dependency rules here:
|
||||
|
||||
include $(TOP)/configure/RULES_TOP
|
29
iocs/dsmIOC/configure/CONFIG
Normal file
29
iocs/dsmIOC/configure/CONFIG
Normal file
@@ -0,0 +1,29 @@
|
||||
# CONFIG - Load build configuration data
|
||||
#
|
||||
# Do not make changes to this file!
|
||||
|
||||
# Allow user to override where the build rules come from
|
||||
RULES = $(EPICS_BASE)
|
||||
|
||||
# RELEASE files point to other application tops
|
||||
include $(TOP)/configure/RELEASE
|
||||
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).Common
|
||||
ifdef T_A
|
||||
-include $(TOP)/configure/RELEASE.Common.$(T_A)
|
||||
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).$(T_A)
|
||||
endif
|
||||
|
||||
CONFIG = $(RULES)/configure
|
||||
include $(CONFIG)/CONFIG
|
||||
|
||||
# Override the Base definition:
|
||||
INSTALL_LOCATION = $(TOP)
|
||||
|
||||
# CONFIG_SITE files contain other build configuration settings
|
||||
include $(TOP)/configure/CONFIG_SITE
|
||||
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).Common
|
||||
ifdef T_A
|
||||
-include $(TOP)/configure/CONFIG_SITE.Common.$(T_A)
|
||||
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
|
||||
endif
|
||||
|
44
iocs/dsmIOC/configure/CONFIG_SITE
Normal file
44
iocs/dsmIOC/configure/CONFIG_SITE
Normal file
@@ -0,0 +1,44 @@
|
||||
# CONFIG_SITE
|
||||
|
||||
# Make any application-specific changes to the EPICS build
|
||||
# configuration variables in this file.
|
||||
#
|
||||
# Host/target specific settings can be specified in files named
|
||||
# CONFIG_SITE.$(EPICS_HOST_ARCH).Common
|
||||
# CONFIG_SITE.Common.$(T_A)
|
||||
# CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
|
||||
|
||||
# CHECK_RELEASE controls the consistency checking of the support
|
||||
# applications pointed to by the RELEASE* files.
|
||||
# Normally CHECK_RELEASE should be set to YES.
|
||||
# Set CHECK_RELEASE to NO to disable checking completely.
|
||||
# Set CHECK_RELEASE to WARN to perform consistency checking but
|
||||
# continue building even if conflicts are found.
|
||||
CHECK_RELEASE = YES
|
||||
|
||||
# Set this when you only want to compile this application
|
||||
# for a subset of the cross-compiled target architectures
|
||||
# that Base is built for.
|
||||
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-ppc32
|
||||
|
||||
# To install files into a location other than $(TOP) define
|
||||
# INSTALL_LOCATION here.
|
||||
#INSTALL_LOCATION=</absolute/path/to/install/top>
|
||||
|
||||
# Set this when the IOC and build host use different paths
|
||||
# to the install location. This may be needed to boot from
|
||||
# a Microsoft FTP server say, or on some NFS configurations.
|
||||
#IOCS_APPL_TOP = </IOC's/absolute/path/to/install/top>
|
||||
|
||||
# For application debugging purposes, override the HOST_OPT and/
|
||||
# or CROSS_OPT settings from base/configure/CONFIG_SITE
|
||||
#HOST_OPT = NO
|
||||
#CROSS_OPT = NO
|
||||
|
||||
# Include motor's CONFIG_SITE.local when building inside motor
|
||||
-include $(TOP)/../../../../configure/CONFIG_SITE.local
|
||||
# Include motorAcs's CONFIG_SITE.local when building inside motorAcs
|
||||
-include $(TOP)/../../configure/CONFIG_SITE.local
|
||||
# Use acsIOC's CONFIG_SITE.local
|
||||
-include $(TOP)/configure/CONFIG_SITE.local
|
||||
|
6
iocs/dsmIOC/configure/EXAMPLE_CONFIG_SITE.local
Normal file
6
iocs/dsmIOC/configure/EXAMPLE_CONFIG_SITE.local
Normal file
@@ -0,0 +1,6 @@
|
||||
# Use settings from motor's CONFIG_SITE unless they are overridden below
|
||||
-include $(MOTOR)/configure/CONFIG_SITE
|
||||
|
||||
#
|
||||
CHECK_RELEASE = WARN
|
||||
|
6
iocs/dsmIOC/configure/EXAMPLE_RELEASE.local
Normal file
6
iocs/dsmIOC/configure/EXAMPLE_RELEASE.local
Normal file
@@ -0,0 +1,6 @@
|
||||
# Use the following lines if motorAcs was built inside motor
|
||||
MOTOR=
|
||||
-include $(MOTOR)/configure/RELEASE
|
||||
# Use the following lines if motorAcs was built outside motor
|
||||
#!MOTOR_ACS=
|
||||
#!-include $(MOTOR_ACS)/configure/RELEASE.local
|
8
iocs/dsmIOC/configure/Makefile
Normal file
8
iocs/dsmIOC/configure/Makefile
Normal file
@@ -0,0 +1,8 @@
|
||||
TOP=..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
TARGETS = $(CONFIG_TARGETS)
|
||||
CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS)))
|
||||
|
||||
include $(TOP)/configure/RULES
|
8
iocs/dsmIOC/configure/RELEASE
Normal file
8
iocs/dsmIOC/configure/RELEASE
Normal file
@@ -0,0 +1,8 @@
|
||||
# RELEASE - Location of external support modules
|
||||
|
||||
# Use motor/module's generated release file when buidling inside motor
|
||||
-include $(TOP)/../../../RELEASE.$(EPICS_HOST_ARCH).local
|
||||
# Use motorAcs's release file when building inside motorAcs, but outside motor
|
||||
-include $(TOP)/../../configure/RELEASE.local
|
||||
# Use acsIOC's RELEASE.local when building outside motorAcs
|
||||
-include $(TOP)/configure/RELEASE.local
|
6
iocs/dsmIOC/configure/RULES
Normal file
6
iocs/dsmIOC/configure/RULES
Normal file
@@ -0,0 +1,6 @@
|
||||
# RULES
|
||||
|
||||
include $(CONFIG)/RULES
|
||||
|
||||
# Library should be rebuilt because LIBOBJS may have changed.
|
||||
$(LIBNAME): ../Makefile
|
2
iocs/dsmIOC/configure/RULES.ioc
Normal file
2
iocs/dsmIOC/configure/RULES.ioc
Normal file
@@ -0,0 +1,2 @@
|
||||
#RULES.ioc
|
||||
include $(CONFIG)/RULES.ioc
|
2
iocs/dsmIOC/configure/RULES_DIRS
Normal file
2
iocs/dsmIOC/configure/RULES_DIRS
Normal file
@@ -0,0 +1,2 @@
|
||||
#RULES_DIRS
|
||||
include $(CONFIG)/RULES_DIRS
|
3
iocs/dsmIOC/configure/RULES_TOP
Normal file
3
iocs/dsmIOC/configure/RULES_TOP
Normal file
@@ -0,0 +1,3 @@
|
||||
#RULES_TOP
|
||||
include $(CONFIG)/RULES_TOP
|
||||
|
22
iocs/dsmIOC/dsmApp/Db/Makefile
Normal file
22
iocs/dsmIOC/dsmApp/Db/Makefile
Normal file
@@ -0,0 +1,22 @@
|
||||
TOP=../..
|
||||
include $(TOP)/configure/CONFIG
|
||||
#----------------------------------------
|
||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||
|
||||
#----------------------------------------------------
|
||||
# Optimization of db files using dbst (DEFAULT: NO)
|
||||
#DB_OPT = YES
|
||||
|
||||
#----------------------------------------------------
|
||||
# Create and install (or just install) into <top>/db
|
||||
# databases, templates, substitutions like this
|
||||
#DB += xxx.db
|
||||
|
||||
#----------------------------------------------------
|
||||
# If <anyname>.db template is not named <anyname>*.template add
|
||||
# <anyname>_template = <templatename>
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
#----------------------------------------
|
||||
# ADD RULES AFTER THIS LINE
|
||||
|
8
iocs/dsmIOC/dsmApp/Makefile
Normal file
8
iocs/dsmIOC/dsmApp/Makefile
Normal file
@@ -0,0 +1,8 @@
|
||||
TOP = ..
|
||||
include $(TOP)/configure/CONFIG
|
||||
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *src*))
|
||||
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Src*))
|
||||
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *db*))
|
||||
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Db*))
|
||||
include $(TOP)/configure/RULES_DIRS
|
||||
|
58
iocs/dsmIOC/dsmApp/src/Makefile
Normal file
58
iocs/dsmIOC/dsmApp/src/Makefile
Normal file
@@ -0,0 +1,58 @@
|
||||
TOP=../..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
#----------------------------------------
|
||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||
#=============================
|
||||
|
||||
# The following are used for debugging messages.
|
||||
#!USR_CXXFLAGS += -DDEBUG
|
||||
|
||||
#=============================
|
||||
# Build the IOC application
|
||||
|
||||
PROD_IOC = acs
|
||||
# acs.dbd will be created and installed
|
||||
DBD += acs.dbd
|
||||
|
||||
# acs.dbd will be made up from these files:
|
||||
acs_DBD += base.dbd
|
||||
|
||||
# Include dbd files from all support applications:
|
||||
#ifdef ASYN
|
||||
acs_DBD += asyn.dbd
|
||||
acs_DBD += drvAsynSerialPort.dbd
|
||||
acs_DBD += drvAsynIPPort.dbd
|
||||
#endif
|
||||
acs_DBD += motorSupport.dbd
|
||||
acs_DBD += devAcsMotor.dbd
|
||||
|
||||
# Add all the support libraries needed by this IOC
|
||||
acs_LIBS += Acs
|
||||
acs_LIBS += motor
|
||||
#ifdef ASYN
|
||||
acs_LIBS += asyn
|
||||
#endif
|
||||
#ifdef SNCSEQ
|
||||
acs_LIBS += seq pv
|
||||
#endif
|
||||
|
||||
# acs_registerRecordDeviceDriver.cpp derives from acs.dbd
|
||||
acs_SRCS += acs_registerRecordDeviceDriver.cpp
|
||||
|
||||
# Build the main IOC entry point on workstation OSs.
|
||||
acs_SRCS_DEFAULT += acsMain.cpp
|
||||
acs_SRCS_vxWorks += -nil-
|
||||
|
||||
# Add support from base/src/vxWorks if needed
|
||||
#acs_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
|
||||
|
||||
# Finally link to the EPICS Base libraries
|
||||
acs_LIBS += $(EPICS_BASE_IOC_LIBS)
|
||||
|
||||
#===========================
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
#----------------------------------------
|
||||
# ADD RULES AFTER THIS LINE
|
||||
|
23
iocs/dsmIOC/dsmApp/src/dsmMain.cpp
Normal file
23
iocs/dsmIOC/dsmApp/src/dsmMain.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
/* acsMain.cpp */
|
||||
/* Author: Marty Kraimer Date: 17MAR2000 */
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "epicsExit.h"
|
||||
#include "epicsThread.h"
|
||||
#include "iocsh.h"
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
if(argc>=2) {
|
||||
iocsh(argv[1]);
|
||||
epicsThreadSleep(.2);
|
||||
}
|
||||
iocsh(NULL);
|
||||
epicsExit(0);
|
||||
return(0);
|
||||
}
|
6
iocs/dsmIOC/iocBoot/Makefile
Normal file
6
iocs/dsmIOC/iocBoot/Makefile
Normal file
@@ -0,0 +1,6 @@
|
||||
TOP = ..
|
||||
include $(TOP)/configure/CONFIG
|
||||
DIRS += $(wildcard *ioc*)
|
||||
DIRS += $(wildcard as*)
|
||||
include $(CONFIG)/RULES_DIRS
|
||||
|
5
iocs/dsmIOC/iocBoot/iocDsm/Makefile
Normal file
5
iocs/dsmIOC/iocBoot/iocDsm/Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
TOP = ../..
|
||||
include $(TOP)/configure/CONFIG
|
||||
ARCH = $(EPICS_HOST_ARCH)
|
||||
TARGETS = envPaths
|
||||
include $(TOP)/configure/RULES.ioc
|
6
iocs/dsmIOC/iocBoot/iocDsm/motor.substitutions.md90
Normal file
6
iocs/dsmIOC/iocBoot/iocDsm/motor.substitutions.md90
Normal file
@@ -0,0 +1,6 @@
|
||||
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}
|
||||
{DSM:, 0, "m$(N)", "asynMotor", MCB4B0, 0, "Bottom", mm, Pos, 2.0, 0.1, .2, 0, 1, .2, -.001, 3, 16, 0, ""}
|
||||
}
|
24
iocs/dsmIOC/iocBoot/iocDsm/st.cmd
Normal file
24
iocs/dsmIOC/iocBoot/iocDsm/st.cmd
Normal file
@@ -0,0 +1,24 @@
|
||||
#!../../bin/linux-x86_64/acs
|
||||
|
||||
< envPaths
|
||||
|
||||
cd "${TOP}"
|
||||
|
||||
## Register all support components
|
||||
dbLoadDatabase "dbd/acs.dbd"
|
||||
acs_registerRecordDeviceDriver pdbbase
|
||||
|
||||
cd "${TOP}/iocBoot/${IOC}"
|
||||
|
||||
|
||||
## motorUtil (allstop & alldone)
|
||||
dbLoadRecords("$(MOTOR)/db/motorUtil.db", "P=acs:")
|
||||
|
||||
##
|
||||
|
||||
iocInit
|
||||
|
||||
## motorUtil (allstop & alldone)
|
||||
motorUtilInit("acs:")
|
||||
|
||||
# Boot complete
|
38
iocs/dsmIOC/iocBoot/iocDsm/st.cmd.md90
Normal file
38
iocs/dsmIOC/iocBoot/iocDsm/st.cmd.md90
Normal file
@@ -0,0 +1,38 @@
|
||||
#errlogInit(5000)
|
||||
< envPaths
|
||||
|
||||
# Tell EPICS all about the record types, device-support modules, drivers, etc.
|
||||
dbLoadDatabase("../../dbd/acs.dbd")
|
||||
acs_registerRecordDeviceDriver(pdbbase)
|
||||
|
||||
# Port 2 on a Moxa
|
||||
#!drvAsynIPPortConfigure("serial0", "192.168.1.16:4002",0,0,0)
|
||||
# Local serial port
|
||||
#!drvAsynSerialPortConfigure("serial0", "/dev/ttyS0", 0, 0, 0)
|
||||
drvAsynSerialPortConfigure("serial0", "/tmp/motorport", 0, 0, 0)
|
||||
asynSetOption("serial0", 0, "baud", "115200")
|
||||
asynSetOption("serial0", 0, "bits", "8")
|
||||
asynSetOption("serial0", 0, "parity", "none")
|
||||
asynSetOption("serial0", 0, "stop", "1")
|
||||
|
||||
# not sure if these two are needed or what they should be set to:
|
||||
#!asynSetOption("serial0", 0, "clocal", "Y")
|
||||
#!asynSetOption("serial0", 0, "crtscts", "Y")
|
||||
|
||||
asynOctetSetInputEos("serial0", 0, "\r")
|
||||
asynOctetSetOutputEos("serial0", 0, "\r")
|
||||
asynSetTraceIOMask("serial0", 0, 2)
|
||||
#asynSetTraceMask("serial0", 0, 255)
|
||||
|
||||
MCB4BCreateController("MCB4B0", "serial0", 1, 100, 5000)
|
||||
|
||||
### Motors
|
||||
dbLoadTemplate "motor.substitutions.mcb4b"
|
||||
|
||||
dbLoadRecords("$(ASYN)/db/asynRecord.db", "P=DSM:,R=serial0,PORT=serial0,ADDR=0,OMAX=80,IMAX=80")
|
||||
|
||||
iocInit
|
||||
|
||||
# This IOC does not use save/restore, so set values of some PVs
|
||||
dbpf("DSM:m0.RTRY", "0")
|
||||
dbpf("DSM:m0.TWV", "0.1")
|
Reference in New Issue
Block a user