-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c7f6b5
commit 00fb566
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#- INSTANCE - Used for Camera Port Name and detector pv name | ||
#- CAM_IP | ||
#- MODEL - Model name to identify correct database file to pull from genicam | ||
#- XSIZE - Image Width | ||
#- YSIZE - Image Height | ||
#- TYPE - Image Datatype, default: Int8 | ||
|
||
epicsEnvSet("GENICAM_GENTL64_PATH", "$(ADVIMBA)/bin/$(ARCH)") | ||
epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(ADCORE)/db:$(ADGENICAM)/db:$(ADVIMBA)/db") | ||
|
||
ADVimbaConfig("$(PORT)", "$(CAM_IP)", 0, 0, 0) | ||
asynSetTraceIOMask($(PORT), 0, 2) | ||
|
||
set_requestfile_path("$(ADGENICAM)/GenICamApp/Db") | ||
set_requestfile_path("$(ADVIMBA)/vimbaApp/Db") | ||
|
||
dbLoadRecords("$(ADVIMBA)/db/vimba.template", "P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE)") | ||
dbLoadRecords("$(ADGENICAM)/db/$(MODEL).template", "P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE)") | ||
|
||
# Create a standard arrays plugin | ||
NDStdArraysConfigure("Image1", 5, 0, "$(INSTANCE)", 0, 0) | ||
|
||
# Need to determine certain values from input parameters | ||
iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") | ||
iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") | ||
luaCmd("epicsEnvSet('__SIZE', tostring((XSIZE*YSIZE)|0))", "XSIZE=$(XSIZE), YSIZE=$(YSIZE)") | ||
|
||
dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") | ||
|
||
epicsEnvUnset("__FTVL") | ||
epicsEnvUnset("__TYPE") | ||
epicsEnvUnset("__SIZE") | ||
|
||
# Load all other plugins using commonPlugins.cmd | ||
iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5") |