ISIS Logo
PIXELMAN
EPICS plugin for Pixelman
pixelman.cmd
Go to the documentation of this file.
1 ##
2 ## @file pixelman.cmd
3 ##
4 ## output from the running of this file is sent
5 ## to pixelman_iocout.log and pixelman_iocerr.log
6 ##
7 
8 ## Increase this if you get <<TRUNCATED>> or discarded messages warnings in your errlog output
9 errlogInit2(65536, 256)
10 
11 < $(EPICSPIXELMAN)/../iocBoot/iocpixelman/envPaths
12 
13 ## correct TOP in case we have moved location
14 epicsEnvSet("TOP","$(EPICSPIXELMAN)/..")
15 
16 epicsEnvSet("AUTOSAVEREQ","#")
17 
18 ## Register all support components
19 dbLoadDatabase "$(TOP)/dbd/pixelman.dbd"
20 pixelman_registerRecordDeviceDriver pdbbase
21 
22 ## ISIS common init
23 < $(IOCSTARTUP)/init.cmd
24 
25 # The search path for database files
26 epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(ADCORE)/db")
27 
28 asynSetMinTimerPeriod(0.001)
29 
30 ## "BeARQuT" is the real MCP detector, "dummy" is the simulation mode
31 ## PIXDET variable normally set in the config_local.bat invoked by run_pixelman.bat to run pixelman.exe
32 #pixelmanConfigure("MCP", "BeARQuT")
33 #pixelmanConfigure("MCP", "dummy")
34 pixelmanConfigure("MCP", "$(PIXDET=dummy)")
35 
36 ## pixelman picks up variables to write to the FITS header from a file
37 ## This configures the association between this file and the PVs
38 ## defined in FitsParameters.db
39 ## PIXELMANDIR is set in config_local.bat and then translated to EPIXELMANDIR
40 FileServerConfigure("fits", "${EPIXELMANDIR}/FitsHeaderParameters.txt")
41 
42 ## ISIS common init
43 < $(IOCSTARTUP)/dbload.cmd
44 
45 ## Load our record instances
46 ## At ISIS the MYPVPREFIX environment variable is already set externally
47 
48 ## areaDetector
49 
50 NDTransformConfigure("ADRawImage1", 3, 0, "MCP", 0, 0)
51 NDROIConfigure("ADROI1", 3, 0, "ADRawImage1", 0, 0)
52 NDStatsConfigure("ADStats1", 3, 0, "ADROI1", 0, 0)
53 NDStdArraysConfigure("ADImage1", 3, 0, "ADROI1", 0, 0)
54 NDPvaConfigure("ADPVA1", 3, 0, "ADROI1", 0, "$(MYPVPREFIX)PIXELMAN:AD:pva1:pvaData", 0)
55 
56 ## needs to fit in EPICS_CA_MAX_ARRAY_BYTES i.e. nx * ny * pixelsize
57 ## also NELEMENTS needs to at least nx * ny
58 ## 512 * 512 = 262144
59 ## 512 * 512 * 4 = 1048576
60 epicsEnvSet("EPICS_CA_MAX_ARRAY_BYTES", "1100000")
61 
62 ## This waveform
63 ## TYPE=Int8,FTVL=UCHAR for 8 bit integer
64 ## TYPE=Int32,FTVL=LONG,DATATYPE=4 for 32 bit integer
65 ## TYPE=Float32,FTVL=FLOAT,DATATYPE=6 for 32 bit float
66 dbLoadRecords("NDTransform.template", "P=$(MYPVPREFIX),R=PIXELMAN:AD:rawimage1:,PORT=ADRawImage1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=MCP,NDARRAY_ADDR=0,DATATYPE=4,ENABLED=1")
67 dbLoadRecords("NDROI.template", "P=$(MYPVPREFIX),R=PIXELMAN:AD:roi1:,PORT=ADROI1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=ADRawImage1,NDARRAY_ADDR=0,DATATYPE=4,ENABLED=1")
68 dbLoadRecords("NDStats.template", "P=$(MYPVPREFIX),R=PIXELMAN:AD:stats1:,PORT=ADStats1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=ADROI1,NDARRAY_ADDR=0,DATATYPE=4,ENABLED=1,NCHANS=1,XSIZE=1,YSIZE=1,HIST_SIZE=1")
69 dbLoadRecords("NDStdArrays.template", "P=$(MYPVPREFIX),R=PIXELMAN:AD:image1:,PORT=ADImage1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=ADROI1,NDARRAY_ADDR=0,DATATYPE=4,ENABLED=1,TYPE=Int32,FTVL=LONG,NELEMENTS=265000")
70 dbLoadRecords("NDPva.template", "P=$(MYPVPREFIX),R=PIXELMAN:AD:pva1:,PORT=ADPVA1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=ADROI1,NDARRAY_ADDR=0,DATATYPE=4,ENABLED=1")
71 
72 dbLoadRecords("$(TOP)/db/ADpixelman.template","P=$(MYPVPREFIX),R=PIXELMAN:AD:,PORT=MCP,ADDR=0,TIMEOUT=1,DATATYPE=4")
73 
74 dbLoadRecords("$(TOP)/db/pixelman.db", "P=$(MYPVPREFIX=),Q=PIXELMAN:")
75 dbLoadRecords("$(TOP)/db/FitsParameters.db", "P=$(MYPVPREFIX=),Q=PIXELMAN:")
76 
77 set_requestfile_path(".", "")
78 
79 ## ISIS common init
80 < $(IOCSTARTUP)/preiocinit.cmd
81 
82 iocInit
83 
84 ## ISIS common post init
85 < $(IOCSTARTUP)/postiocinit.cmd
86 
87 # Save motor positions every 5 seconds
88 #create_monitor_set("$(IOCNAME)_positions.req", 5, "P=$(MYPVPREFIX)$(Q)")
89 
90 # Save motor settings every 30 seconds
91 #create_monitor_set("$(IOCNAME)_settings.req", 30, "P=$(MYPVPREFIX)$(Q)")
92 
93 ## Start any sequence programs
94 #seq sncxxx,"user=faa59Host"
95 
96 dbpf $(MYPVPREFIX)PIXELMAN:AD:rawimage1:Type Rot270
97 
98 startPVAServer
99 
100 dbl
NDTransformConfigure("ADRawImage1", 3, 0,"MCP", 0, 0)
ISIS common init ;.
dbLoadDatabase(TOP)/dbd/pixelman.dbd"
Register all support components ;.
iocInit
ISIS common init ;.
Definition: pixelman.cmd:78
FileServerConfigure("fits","${EPIXELMANDIR}/FitsHeaderParameters.txt")
pixelman picks up variables to write to the FITS header from a file ; This configures the association...
dbpf(MYPVPREFIX) PIXELMAN
ISIS common post init ;.
Definition: pixelman.cmd:96
errlogInit2(65536, 256)
Increase this if you get &lt;&lt;TRUNCATED&gt;&gt; or discarded messages warnings in your errlog output ;...
pixelmanConfigure("MCP","$(PIXDET=dummy)")
&quot;BeARQuT&quot; is the real MCP detector, &quot;dummy&quot; is the simulation mode ; PIXDET variable normally set in ...
dbLoadRecords("NDTransform.template","P=$(MYPVPREFIX),R=PIXELMAN:AD:rawimage1:,PORT=ADRawImage1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=MCP,NDARRAY_ADDR=0,DATATYPE=4,ENABLED=1")
This waveform ; TYPE=Int8,FTVL=UCHAR for 8 bit integer ; TYPE=Int32,FTVL=LONG,DATATYPE=4 for 32 bit i...
epicsEnvSet("TOP","$(EPICSPIXELMAN)/..")
correct TOP in case we have moved location ;
Copyright © 2013 Science and Technology Facilities Council | Generated by   doxygen 1.8.5