1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | "st.cmd" internal code question |
From: | 최원철 via Tech-talk <[email protected]> |
To: | <[email protected]> |
Date: | Wed, 08 Jan 2020 18:15:12 +0900 |
hi
I'm a developer new to EPICS.
My goal is to analyze / modify the project completed by the staff. (He is not here)
I have a product that installs an IOC on the Raspberry pi 3+ and controls the motor via the RS232 line.
Installed on Pi 3+ are asyn4-34, motor-R6-10-1, stream, ipac-2.15 and calc-R3-6-1.
Question 1. ) MTestSetup (1,7,10) and MTestConfig (0, "SERIALPORT") in the /epics/ioc/MTest/iocBoot/iocMTest/st.cmd file
Can I edit / check? And what is that doing?
st.cmd code...
cd "/usr/local/epics/iocs/MTest/iocBoot/iocMTest"
< envPaths
< pvSettings
.
cd "$(TOP)"
## Register all support components
dbLoadDatabase("dbd/MTest.dbd")
MTest_registerRecordDeviceDriver(pdbbase)
## Serial Configuration
drvAsynSerialPortConfigure("SERIALPORT","/dev/ttyAMA0",0,0,0)
asynSetOption("SERIALPORT",-1,"baud","19200")
asynSetOption("SERIALPORT",-1,"bits","8")
asynSetOption("SERIALPORT",-1,"parity","odd")
asynSetOption("SERIALPORT",-1,"stop","1")
asynSetOption("SERIALPORT",-1,"clocal","Y")
asynSetOption("SERIALPORT",-1,"crtscts","N")
asynOctetSetInputEos("SERIALPORT",0,"\r")
asynOctetSetOutputEos("SERIALPORT",0,"\r")
MTestSetup(1,8,10) <-----------------here
MtestConfig(0,"SERIALPORT") <-----------------here
## Load record instances
dbLoadRecords "db/motor_record.db","P=$(P),M=$(M1),S=0"
dbLoadRecords "db/motor_record.db","P=$(P),M=$(M2),S=1"
dbLoadRecords "db/motor_record.db","P=$(P),M=$(M3),S=2"
dbLoadRecords "db/motor_record.db","P=$(P),M=$(M4),S=3"
dbLoadRecords "db/motor_record.db","P=$(P),M=$(M5),S=4"
dbLoadRecords "db/motor_record.db","P=$(P),M=$(M6),S=5"
save_restoreSet_IncompleteSetsOk(1)
save_restoreSet_DatedBackupFiles(0)
set_requestfile_path("./")
set_savefile_path("./", "autosave")
set_pass0_restoreFile("auto_settings.sav")
set_pass1_restoreFile("auto_settings.sav")
cd "${TOP}/iocBoot/${IOC}"
iocInit
create_monitor_set("auto_settings.req", 30, "P=$(P),M1=$(M1),M2=$(M2),M3=$(M3),M4=$(M4),M5=$(M5)")