You need to add the following lines to your stxm/stxmApp/src/Makefile in
the MOTOR section and then rebuild the IOC:
stxm_Common_DBD += omsAsynSupport.dbd
stxm_Common_LIBS += omsAsyn
Kevin
On 2/3/17 11:04 AM, David Vine wrote:
> Hi all,
>
> I'm trying to build an IOC to talk to a MAXnet controller using xxx-5-8
> and motor-6-9 (synApps-5-8, base-3.15.5). Nothing in
> motor-6-9/motorApp/Makefile is deselected and synApps builds without error.
>
> The st.cmd and boot output are below but the error is:
> omsMAXnetConfig("MAXNET1" , 10, "MAXNET", 10, 1000, "")
> st.cmd line 67: Command omsMAXnetConfig not found.
>
> How do I tell the IOC where to find the maxnet support?
>
> Thanks,
> David
>
>
> # MAXnet Serial
> drvAsynSerialPortConfigure("MAXNET","/dev/ttyUSB0",0,0,0)
> asynSetOption("MAXNET",0,"baud","115200")
> asynSetOption("MAXNET",0,"bits","8")
> asynSetOption("MAXNET",0,"parity","none")
> asynSetOption("MAXNET",0,"crtscts","Y")
> dbLoadRecords("$(ASYN)/db/asynRecord.db","P=oms:,R=maxnet,PORT=MAXNET,ADDR=0,OMAX=0,IMAX=0")
>
> ### Uncomment one of the following two lines:
> #asynOctetSetInputEos("MAXNET",0,"\n\r")
> asynOctetSetInputEos("MAXNET",0,"\n")
> asynOctetSetOutputEos("MAXNET",0,"\n")
>
> # omsMAXnetConfig(portName, /* MAXnet Motor Asyn Port name */
> # numAxes, /* Number of axes this
> controller supports */
> # serialPortName, /* MAXnet Serial Asyn Port name */
> # movingPollPeriod, /* Time to poll (msec) when an
> axis is in motion */
> # idlePollPeriod, /* Time to poll (msec) when an
> axis is idle. 0 for no polling */
> # initString) /* Init String sent to card */
> omsMAXnetConfig("MAXNET1" , 10, "MAXNET", 10, 1000, "")
>
>
>
> [david@dusk iocLinux]$ ../../bin/linux-x86_64/stxm st.cmd
> # Linux startup script
> # For devIocStats
> epicsEnvSet("ENGINEER","engineer")
> epicsEnvSet("LOCATION","location")
> < envPaths
> epicsEnvSet("IOC","iocLinux")
> epicsEnvSet("TOP","/opt/epics/synApps_5_8/ioc/stxm")
> epicsEnvSet("SUPPORT","/opt/epics/synApps_5_8/support")
> epicsEnvSet("EPICS_BASE","/opt/epics/base")
> epicsEnvSet("ALIVE","/opt/epics/synApps_5_8/support/alive-1-0")
> epicsEnvSet("ALLEN_BRADLEY","/opt/epics/synApps_5_8/support/allenBradley-2-3")
> epicsEnvSet("AREA_DETECTOR","/opt/epics/synApps_5_8/support/areaDetector")
> epicsEnvSet("ADCORE","/opt/epics/synApps_5_8/support/areaDetector/ADCore")
> epicsEnvSet("ADBINARIES","/opt/epics/synApps_5_8/support/areaDetector/ADBinaries")
> epicsEnvSet("ASYN","/opt/epics/synApps_5_8/support/asyn-4-30")
> epicsEnvSet("AUTOSAVE","/opt/epics/synApps_5_8/support/autosave-5-7-1")
> epicsEnvSet("BUSY","/opt/epics/synApps_5_8/support/busy-1-6-1")
> epicsEnvSet("CALC","/opt/epics/synApps_5_8/support/calc-3-4-2-1")
> epicsEnvSet("CAMAC","/opt/epics/synApps_5_8/support/camac-2-7")
> epicsEnvSet("CAPUTRECORDER","/opt/epics/synApps_5_8/support/caputRecorder-1-5-1")
> epicsEnvSet("DAC128V","/opt/epics/synApps_5_8/support/dac128V-2-8")
> epicsEnvSet("DELAYGEN","/opt/epics/synApps_5_8/support/delaygen-1-1-1")
> epicsEnvSet("DEVIOCSTATS","/opt/epics/synApps_5_8/support/devIocStats-3-1-13")
> epicsEnvSet("IP","/opt/epics/synApps_5_8/support/ip-2-17")
> epicsEnvSet("IP330","/opt/epics/synApps_5_8/support/ip330-2-8")
> epicsEnvSet("IPAC","/opt/epics/synApps_5_8/support/ipac-2-14")
> epicsEnvSet("IPUNIDIG","/opt/epics/synApps_5_8/support/ipUnidig-2-10")
> epicsEnvSet("LOVE","/opt/epics/synApps_5_8/support/love-3-2-5")
> epicsEnvSet("MCA","/opt/epics/synApps_5_8/support/mca-7-6")
> epicsEnvSet("MEASCOMP","/opt/epics/synApps_5_8/support/measComp-1-1")
> epicsEnvSet("MODBUS","/opt/epics/synApps_5_8/support/modbus-2-7")
> epicsEnvSet("MOTOR","/opt/epics/synApps_5_8/support/motor-6-9")
> epicsEnvSet("OPTICS","/opt/epics/synApps_5_8/support/optics-2-9-3")
> epicsEnvSet("SNCSEQ","/opt/epics/synApps_5_8/support/seq-2-2-3")
> epicsEnvSet("SOFTGLUE","/opt/epics/synApps_5_8/support/softGlue-2-4-3")
> epicsEnvSet("SSCAN","/opt/epics/synApps_5_8/support/sscan-2-10")
> epicsEnvSet("STD","/opt/epics/synApps_5_8/support/std-3-4")
> epicsEnvSet("STREAM","/opt/epics/synApps_5_8/support/stream-2-6a")
> epicsEnvSet("VAC","/opt/epics/synApps_5_8/support/vac-1-5-1")
> epicsEnvSet("VME","/opt/epics/synApps_5_8/support/vme-2-8-2")
> epicsEnvSet("XXX","/opt/epics/synApps_5_8/support/xxx-5-8")
> # save_restore.cmd needs the full path to the startup directory, which
> # envPaths currently does not provide
> epicsEnvSet(STARTUP,/opt/epics/synApps_5_8/ioc/stxm/iocBoot/iocLinux)
> # Increase size of buffer for error logging from default 1256
> errlogInit(20000)
> # Specify largest array CA will transport
> # Note for N doubles, need N*8 bytes+some overhead
> epicsEnvSet EPICS_CA_MAX_ARRAY_BYTES 64010
> epicsEnvSet ("STREAM_PROTOCOL_PATH", ".:../protocols")
> ################################################################################
> # Tell EPICS all about the record types, device-support modules, drivers,
> # etc. in the software we just loaded (stxm.munch)
> dbLoadDatabase("../../dbd/iocstxmLinux.dbd")
> iocstxmLinux_registerRecordDeviceDriver(pdbbase)
> ### save_restore setup
> < save_restore.cmd
> # BEGIN save_restore.cmd
> ------------------------------------------------------
> ### save_restore setup
> # status PVs
> #save_restoreSet_UseStatusPVs(1)
> save_restoreSet_status_prefix("stxm:")
> dbLoadRecords("/opt/epics/synApps_5_8/support/autosave-5-7-1/asApp/Db/save_restoreStatus.db",
> "P=stxm:, DEAD_SECONDS=5")
> # Ok to save/restore save sets with missing values (no CA connection to PV)?
> save_restoreSet_IncompleteSetsOk(1)
> # Save dated backup files?
> save_restoreSet_DatedBackupFiles(1)
> # Number of sequenced backup files to write
> save_restoreSet_NumSeqFiles(3)
> # Time interval between sequenced backups
> save_restoreSet_SeqPeriodInSeconds(300)
> # Ok to retry connecting to PVs whose initial connection attempt failed?
> save_restoreSet_CAReconnect(1)
> # Time interval in seconds between forced save-file writes. (-1 means
> forever).
> # This is intended to get save files written even if the normal trigger
> mechanism is broken.
> save_restoreSet_CallbackTimeout(-1)
> # specify where save files should be
> set_savefile_path("/opt/epics/synApps_5_8/ioc/stxm/iocBoot/iocLinux",
> "autosave")
> ###
> # specify what save files should be restored. Note these files must be
> # in the directory specified in set_savefile_path(), or, if that function
> # has not been called, from the directory current when iocInit is invoked
> set_pass0_restoreFile("auto_positions.sav", "P=stxm:")
> # Save positions every five seconds
> doAfterIocInit("create_monitor_set('auto_positions.req',5,'P=stxm:')")
> set_pass0_restoreFile("auto_settings.sav", "P=stxm:")
> set_pass1_restoreFile("auto_settings.sav", "P=stxm:")
> # save settings every thirty seconds
> doAfterIocInit("create_monitor_set('auto_settings.req',30,'P=stxm:')")
> # Note that you can reload these sets after creating them: e.g.,
> # reload_monitor_set("auto_settings.req",30,"P=stxm:")
> # Note that you can restore a .sav file without also autosaving to it.
> #set_pass0_restoreFile("myInitData.sav")
> #set_pass1_restoreFile("myInitData.sav")
> # Also, you can restore a .sav file that contains macros. (autosave R5-4-2)
> #set_pass0_restoreFile("myGenericData.sav", "P=stxm:")
> #set_pass1_restoreFile("myGenericData.sav", "P=stxm:")
> ###
> # specify directories in which to to search for included request files
> set_requestfile_path("/opt/epics/synApps_5_8/ioc/stxm/iocBoot/iocLinux", "")
> set_requestfile_path("/opt/epics/synApps_5_8/ioc/stxm/iocBoot/iocLinux",
> "autosave")
> set_requestfile_path("/opt/epics/synApps_5_8/support/areaDetector",
> "ADApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/areaDetector/ADCore",
> "ADApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/autosave-5-7-1",
> "asApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/busy-1-6-1",
> "busyApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/calc-3-4-2-1",
> "calcApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/camac-2-7",
> "camacApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/caputRecorder-1-5-1",
> "caputRecorderApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/dac128V-2-8",
> "dac128VApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/delaygen-1-1-1",
> "delaygenApp/Db")
> macLib: macro DXP is undefined (expanding string
> set_requestfile_path("$(DXP)", "dxpApp/Db"))
> set_requestfile_path("/opt/epics/synApps_5_8/support/ip-2-17", "ipApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/ip330-2-8",
> "ip330App/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/ipUnidig-2-10",
> "ipUnidigApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/love-3-2-5",
> "loveApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/mca-7-6", "mcaApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/measComp-1-1",
> "measCompApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/modbus-2-7",
> "modbusApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/motor-6-9",
> "motorApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/optics-2-9-3",
> "opticsApp/Db")
> macLib: macro QUADEM is undefined (expanding string
> set_requestfile_path("$(QUADEM)", "quadEMApp/Db"))
> set_requestfile_path("/opt/epics/synApps_5_8/support/sscan-2-10",
> "sscanApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/softGlue-2-4-3",
> "softGlueApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/std-3-4", "stdApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/vac-1-5-1",
> "vacApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/support/vme-2-8-2",
> "vmeApp/Db")
> set_requestfile_path("/opt/epics/synApps_5_8/ioc/stxm", "stxmApp/Db")
> # Debug-output level
> save_restoreSet_Debug(0)
> # Tell autosave to automatically build built_settings.req and
> # built_positions.req from databases and macros supplied to dbLoadRecords()
> # (and dbLoadTemplate(), which calls dbLoadRecords()).
> epicsEnvSet("BUILT_SETTINGS", "built_settings.req")
> epicsEnvSet("BUILT_POSITIONS", "built_positions.req")
> autosaveBuild("built_settings.req", "_settings.req", 1)
> pretending to register a dbLoadRecords hook
> autosaveBuild("built_positions.req", "_positions.req", 1)
> # END save_restore.cmd
> --------------------------------------------------------
> # Access Security
> dbLoadRecords("/opt/epics/synApps_5_8/ioc/stxm/stxmApp/Db/Security_Control.db","P=stxm:")
> asSetFilename("/opt/epics/synApps_5_8/ioc/stxm/iocBoot/accessSecurity.acf")
> asSetSubstitutions("P=stxm:")
> # soft scaler for testing
> < softScaler.cmd
> # soft scaler
> dbLoadRecords("/opt/epics/synApps_5_8/support/asyn-4-30/db/asynRecord.db","P=stxm:,R=asynScaler,PORT=scaler1Port,ADDR=0,OMAX=0,IMAX=0")
> # drvScalerSoftConfigure(char *portName, int maxChans, char *pvTemplate)
> drvScalerSoftConfigure("scaler1Port", 8, "stxm:scaler1:s%d")
> dbLoadRecords("/opt/epics/synApps_5_8/support/std-3-4/stdApp/Db/scaler.db","P=stxm:,S=scaler1,OUT=@asyn(scaler1Port
> 0 0),DTYP=Asyn Scaler,FREQ=10000000")
> dbLoadRecords("/opt/epics/synApps_5_8/support/std-3-4/stdApp/Db/scalerSoftCtrl.db","P=stxm:,Q=scaler1:,SCALER=stxm:scaler1")
> # user-assignable ramp/tweak
> dbLoadRecords("/opt/epics/synApps_5_8/support/std-3-4/stdApp/Db/ramp_tweak.db","P=stxm:,Q=rt1")
> ### Motors
> dbLoadTemplate("motor.substitutions.MAXnet")
> dbLoadTemplate: error opening sub file motor.substitutions.MAXnet
> #dbLoadTemplate("MAXnetAux.substitutions")
> # MAXnet IP
> #drvAsynIPPortConfigure("MAXNET","maxnet-ip-address:23",0,0,0)
> # MAXnet Serial
> drvAsynSerialPortConfigure("MAXNET","/dev/ttyUSB0",0,0,0)
> asynSetOption("MAXNET",0,"baud","115200")
> asynSetOption("MAXNET",0,"bits","8")
> asynSetOption("MAXNET",0,"parity","none")
> asynSetOption("MAXNET",0,"crtscts","Y")
> dbLoadRecords("/opt/epics/synApps_5_8/support/asyn-4-30/db/asynRecord.db","P=oms:,R=maxnet,PORT=MAXNET,ADDR=0,OMAX=0,IMAX=0")
> ### Uncomment one of the following two lines:
> #asynOctetSetInputEos("MAXNET",0,"\n\r")
> asynOctetSetInputEos("MAXNET",0,"\n")
> asynOctetSetOutputEos("MAXNET",0,"\n")
> # omsMAXnetConfig(portName, /* MAXnet Motor Asyn Port name */
> # numAxes, /* Number of axes this
> controller supports */
> # serialPortName, /* MAXnet Serial Asyn Port name */
> # movingPollPeriod, /* Time to poll (msec) when an
> axis is in motion */
> # idlePollPeriod, /* Time to poll (msec) when an
> axis is idle. 0 for no polling */
> # initString) /* Init String sent to card */
> omsMAXnetConfig("MAXNET1" , 10, "MAXNET", 10, 1000, "")
> st.cmd line 67: Command omsMAXnetConfig not found.
> ### Scan-support software
> # crate-resident scan. This executes 1D, 2D, 3D, and 4D scans, and caches
> # 1D data, but it doesn't store anything to disk. (See 'saveData' below
> for that.)
> dbLoadRecords("/opt/epics/synApps_5_8/support/sscan-2-10/sscanApp/Db/standardScans.db","P=stxm:,MAXPTS1=1000,MAXPTS2=1000,MAXPTS3=1000,MAXPTS4=1000,MAXPTSH=1000")
> dbLoadRecords("/opt/epics/synApps_5_8/support/sscan-2-10/sscanApp/Db/saveData.db","P=stxm:")
> # Run this after iocInit:
> doAfterIocInit("saveData_Init(saveData.req, 'P=stxm:')")
> dbLoadRecords("/opt/epics/synApps_5_8/support/sscan-2-10/sscanApp/Db/scanProgress.db","P=stxm:scanProgress:")
> # Run this after iocInit:
> doAfterIocInit("seq &scanProgress, 'S=stxm:, P=stxm:scanProgress:'")
> # configMenu example.
> dbLoadRecords("/opt/epics/synApps_5_8/support/autosave-5-7-1/asApp/Db/configMenu.db","P=stxm:,CONFIG=scan1")
> # Note that the request file MUST be named $(CONFIG)Menu.req
> # If the macro CONFIGMENU is defined with any value, backup (".savB") and
> # sequence files (".savN") will not be written. We don't want these for
> configMenu.
> # Run this after iocInit:
> doAfterIocInit("create_manual_set('scan1Menu.req','P=stxm:,CONFIG=scan1,CONFIGMENU=1')")
> # You could make scan configurations read-only:
> #dbLoadRecords("$(AUTOSAVE)/asApp/Db/configMenu.db","P=stxm:,CONFIG=scan1,ENABLE_SAVE=0")
> # read-only configMenu example. (Read-only, because we're not calling
> create_manual_set().)
> #dbLoadRecords("$(AUTOSAVE)/asApp/Db/configMenu.db","P=stxm:,CONFIG=scan2")
> # A set of scan parameters for each positioner. This is a convenience
> # for the user. It can contain an entry for each scannable thing in the
> # crate.
> dbLoadTemplate("scanParms.substitutions")
> ### Stuff for user programming ###
> < calc.cmd
> ### Stuff for user programming ###
> dbLoadRecords("/opt/epics/synApps_5_8/support/calc-3-4-2-1/calcApp/Db/userCalcs10.db","P=stxm:")
> appendToFile("built_settings.req", '$(P)userCalcEnable')
> dbLoadRecords("/opt/epics/synApps_5_8/support/calc-3-4-2-1/calcApp/Db/userCalcOuts10.db","P=stxm:")
> appendToFile("built_settings.req", '$(P)userCalcOutEnable')
> dbLoadRecords("/opt/epics/synApps_5_8/support/calc-3-4-2-1/calcApp/Db/userCalcOuts10more.db","P=stxm:,N1=11,N2=12,N3=13,N4=14,N5=15,N6=16,N7=17,N8=18,N9=19,N10=20")
> dbLoadRecords("/opt/epics/synApps_5_8/support/calc-3-4-2-1/calcApp/Db/userStringCalcs10.db","P=stxm:")
> appendToFile("built_settings.req", '$(P)userStringCalcEnable')
> dbLoadRecords("/opt/epics/synApps_5_8/support/calc-3-4-2-1/calcApp/Db/userArrayCalcs10.db","P=stxm:,N=8000")
> appendToFile("built_settings.req", '$(P)userArrayCalcEnable')
> dbLoadRecords("/opt/epics/synApps_5_8/support/calc-3-4-2-1/calcApp/Db/userTransforms10.db","P=stxm:"