Experimental Physics and
| |||||||||||||||
|
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)")
Question 2. ) It communicates via Rs232 with "raspberry Pi-> motor". I was curious about the communication, so I changed it to "raspberry Pi-> PC com port". ./// output PC terminal. % 01 # WCP8R08021R08121R08221R08321R08421R08521R08621R08721 ** % 01 # WCP8R08051R08151R08251R08351R08451R08551R08651R08751 ** % 01 # RCP3R0120R0121R0128 ** % 01 # RCP3R0120R0121R0128 ** % 01 # RCP3R0122R0123R0129 ** % 01 # RCP3R0122R0123R0129 ** % 01 # RCP3R0124R0125R012A ** % 01 # RCP3R0124R0125R012A ** % 01 # RCP3R0126R0127R012B ** % 01 # RCP3R0126R0127R012B ** % 01 # RCP3R0130R0131R0138 ** % 01 # RCP3R0130R0131R0138 ** % 01 # RCP3R0132R0133R0139 ** These contents are printed out. Is this uart communication "where / who" control? I am studying and it is so difficult that I ask these basic questions. Please help me. Thank you.
| ||||||||||||||
ANJ, 09 Jan 2020 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |