Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!../../bin/linux-x86_64/PCU50_300test
- ###############################################################################
- # Set up environment
- < envPaths
- epicsEnvSet("IOC","iocPCU50_300test")
- epicsEnvSet("TOP","/home/leblanc/EPICS/PCU50-300")
- epicsEnvSet("EPICS_BASE","/home/leblanc/EPICS/epics-base")
- epicsEnvSet("SUPPORT","/home/leblanc/EPICS/support")
- epicsEnvSet("ASYN","/home/leblanc/EPICS/support/asyn")
- epicsEnvSet("CALC","/home/leblanc/EPICS/support/calc")
- epicsEnvSet("STREAM","/home/leblanc/EPICS/support/StreamDevice")
- epicsEnvSet "STREAM_PROTOCOL_PATH" "/home/leblanc/EPICS/PCU50-300/db"
- ###############################################################################
- # Allow PV name prefixes and serial port name to be set from the environment
- epicsEnvSet "P" "PCU50_300"
- epicsEnvSet "R" "test"
- #epicsEnvSet "HOST" "$(HOST=10.0.0.105)"
- #epicsEnvSet "PORT" "$(PORT=5025)"
- ###############################################################################
- ## Register all support components
- cd "/home/leblanc/EPICS/PCU50-300"
- dbLoadDatabase "dbd/PCU50_300test.dbd"
- PCU50_300test_registerRecordDeviceDriver pdbbase
- ###############################################################################
- # Set up ASYN ports
- #drvAsynIPPortConfigure("LAN0","$(HOST):$(PORT)",0,0,0)
- #1st argument is the port's name
- #2nd argument is the "IP address: port num"
- #3rd argument is priority; 0 means medium
- #4th argument is noAutoConnect; 0 means yes, autoconnect
- #5th argument is noProcessEOS; 0 something complicated, 1 also complicated
- drvAsynSerialPortConfigure("USB0","/dev/ttyUSB0",0,0,0)
- asynSetOption("USB0",-1,"baud","9600")
- asynSetOption("USB0",-1,"bits","8")
- asynSetOption("USB0",-1,"parity","none")
- asynSetOption("USB0",-1,"stop","2")
- # Set output and input end of command terminators to be newlines.
- asynOctetSetOutputEos("USB0", 0, "\n")
- asynOctetSetInputEos("USB0", 0, "\n")
- ###############################################################################
- asynSetTraceIOMask("USB0", 0, "ESCAPE")
- asynSetTraceMask("USB0", 0, "ERROR|DRIVER")
- var streamError 1
- var streamDebug 1
- var streamDebugColored 1
- var streamErrorDeadTime 30
- var streamMsgTimeStamped 1
- streamSetLogfile("logfile.txt")
- ###############################################################################
- ## Load record instances
- dbLoadRecords("db/devPCU50_300.db","P=PCU50_300,R=test,PORT=USB0,A=0")
- ###############################################################################
- ## Start EPICS
- cd "/home/leblanc/EPICS/PCU50-300/iocBoot/iocPCU50_300test"
- iocInit
- Starting iocInit
- ############################################################################
- ## EPICS R7.0.7.1-DEV
- ## Rev. R7.0.7-112-g216359974c97b26ed9e8
- ## Rev. Date Git: 2023-04-18 13:11:59 -0500
- ############################################################################
- 2023/06/27 10:31:29.269 /dev/ttyUSB0 write 5
- AD 0\n
- iocRun: All initialization complete
- 2023/06/27 10:31:29.287 /dev/ttyUSB0 read 8
- 000000\n\r
- 2023/06/27 10:31:29.288 /dev/ttyUSB0 write 7
- DA 0,0\n
- 2023/06/27 10:31:29.288 /dev/ttyUSB0 write 4
- S1H\n
- 2023/06/27 10:31:29.303 /dev/ttyUSB0 read 5
- 00000
- 2023/06/27 10:31:29.319 /dev/ttyUSB0 read 10
- 0\n\r08000\n\r
- 2023/06/27 10:31:29.320 /dev/ttyUSB0 write 6
- *IDN?\n
- 2023/06/27 10:31:29.335 /dev/ttyUSB0 read 6
- PCU 50
- 2023/06/27 10:31:29.351 /dev/ttyUSB0 read 6
- -300\n\r
- 2023/06/27 10:31:29.352 /dev/ttyUSB0 write 6
- *IDN?\n
- 2023/06/27 10:31:29.367 /dev/ttyUSB0 read 6
- PCU 50
- 2023/06/27 10:31:29.383 /dev/ttyUSB0 read 6
- -300\n\r
- 2023/06/27 10:31:29.384 /dev/ttyUSB0 write 5
- AD 0\n
- 2023/06/27 10:31:29.399 /dev/ttyUSB0 read 7
- 000000\n
- epics> 2023/06/27 10:31:38.767 /dev/ttyUSB0 read 1
- \r
- 2023/06/27 10:31:38.767 /dev/ttyUSB0 write 4
- S1H\n
- 2023/06/27 10:31:38.775 /dev/ttyUSB0 read 1
- 4
- 2023/06/27 10:31:38.791 /dev/ttyUSB0 read 7
- 08000\n\r
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement