Advertisement
GregLeblanc

Untitled

Jun 27th, 2023
955
0
23 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.80 KB | None | 0 0
  1. #!../../bin/linux-x86_64/PCU50_300test
  2. ###############################################################################
  3. # Set up environment
  4. < envPaths
  5. epicsEnvSet("IOC","iocPCU50_300test")
  6. epicsEnvSet("TOP","/home/leblanc/EPICS/PCU50-300")
  7. epicsEnvSet("EPICS_BASE","/home/leblanc/EPICS/epics-base")
  8. epicsEnvSet("SUPPORT","/home/leblanc/EPICS/support")
  9. epicsEnvSet("ASYN","/home/leblanc/EPICS/support/asyn")
  10. epicsEnvSet("CALC","/home/leblanc/EPICS/support/calc")
  11. epicsEnvSet("STREAM","/home/leblanc/EPICS/support/StreamDevice")
  12. epicsEnvSet "STREAM_PROTOCOL_PATH" "/home/leblanc/EPICS/PCU50-300/db"
  13. ###############################################################################
  14. # Allow PV name prefixes and serial port name to be set from the environment
  15. epicsEnvSet "P" "PCU50_300"
  16. epicsEnvSet "R" "test"
  17. #epicsEnvSet "HOST" "$(HOST=10.0.0.105)"
  18. #epicsEnvSet "PORT" "$(PORT=5025)"
  19. ###############################################################################
  20. ## Register all support components
  21. cd "/home/leblanc/EPICS/PCU50-300"
  22. dbLoadDatabase "dbd/PCU50_300test.dbd"
  23. PCU50_300test_registerRecordDeviceDriver pdbbase
  24. ###############################################################################
  25. # Set up ASYN ports
  26. #drvAsynIPPortConfigure("LAN0","$(HOST):$(PORT)",0,0,0)
  27. #1st argument is the port's name
  28. #2nd argument is the "IP address: port num"
  29. #3rd argument is priority; 0 means medium
  30. #4th argument is noAutoConnect; 0 means yes, autoconnect
  31. #5th argument is noProcessEOS; 0 something complicated, 1 also complicated
  32. drvAsynSerialPortConfigure("USB0","/dev/ttyUSB0",0,0,0)
  33. asynSetOption("USB0",-1,"baud","9600")
  34. asynSetOption("USB0",-1,"bits","8")
  35. asynSetOption("USB0",-1,"parity","none")
  36. asynSetOption("USB0",-1,"stop","2")
  37. # Set output and input end of command terminators to be newlines.
  38. asynOctetSetOutputEos("USB0", 0, "\n")
  39. asynOctetSetInputEos("USB0", 0, "\n")
  40. ###############################################################################
  41. asynSetTraceIOMask("USB0", 0, "ESCAPE")
  42. asynSetTraceMask("USB0", 0, "ERROR|DRIVER")
  43. var streamError 1
  44. var streamDebug 1
  45. var streamDebugColored 1
  46. var streamErrorDeadTime 30
  47. var streamMsgTimeStamped 1
  48. streamSetLogfile("logfile.txt")
  49. ###############################################################################
  50. ## Load record instances
  51. dbLoadRecords("db/devPCU50_300.db","P=PCU50_300,R=test,PORT=USB0,A=0")
  52. ###############################################################################
  53. ## Start EPICS
  54. cd "/home/leblanc/EPICS/PCU50-300/iocBoot/iocPCU50_300test"
  55. iocInit
  56. Starting iocInit
  57. ############################################################################
  58. ## EPICS R7.0.7.1-DEV
  59. ## Rev. R7.0.7-112-g216359974c97b26ed9e8
  60. ## Rev. Date Git: 2023-04-18 13:11:59 -0500
  61. ############################################################################
  62. 2023/06/27 10:31:29.269 /dev/ttyUSB0 write 5
  63. AD 0\n
  64. iocRun: All initialization complete
  65. 2023/06/27 10:31:29.287 /dev/ttyUSB0 read 8
  66. 000000\n\r
  67. 2023/06/27 10:31:29.288 /dev/ttyUSB0 write 7
  68. DA 0,0\n
  69. 2023/06/27 10:31:29.288 /dev/ttyUSB0 write 4
  70. S1H\n
  71. 2023/06/27 10:31:29.303 /dev/ttyUSB0 read 5
  72. 00000
  73. 2023/06/27 10:31:29.319 /dev/ttyUSB0 read 10
  74. 0\n\r08000\n\r
  75. 2023/06/27 10:31:29.320 /dev/ttyUSB0 write 6
  76. *IDN?\n
  77. 2023/06/27 10:31:29.335 /dev/ttyUSB0 read 6
  78. PCU 50
  79. 2023/06/27 10:31:29.351 /dev/ttyUSB0 read 6
  80. -300\n\r
  81. 2023/06/27 10:31:29.352 /dev/ttyUSB0 write 6
  82. *IDN?\n
  83. 2023/06/27 10:31:29.367 /dev/ttyUSB0 read 6
  84. PCU 50
  85. 2023/06/27 10:31:29.383 /dev/ttyUSB0 read 6
  86. -300\n\r
  87. 2023/06/27 10:31:29.384 /dev/ttyUSB0 write 5
  88. AD 0\n
  89. 2023/06/27 10:31:29.399 /dev/ttyUSB0 read 7
  90. 000000\n
  91. epics> 2023/06/27 10:31:38.767 /dev/ttyUSB0 read 1
  92. \r
  93. 2023/06/27 10:31:38.767 /dev/ttyUSB0 write 4
  94. S1H\n
  95. 2023/06/27 10:31:38.775 /dev/ttyUSB0 read 1
  96. 4
  97. 2023/06/27 10:31:38.791 /dev/ttyUSB0 read 7
  98. 08000\n\r
  99. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement