Download Hytec EPICS Driver User Manual
Transcript
Hytec Electronics Ltd
Hytec EPICS Driver User Manual
DRV/2011/EPICS
# int ipSlotNum, /* 0 ~ 5 for slot 'A' to 'F' */
# int vectorNum, /* 88 */
# int mode,
/* 0: histogram normal, 1:histogram coincidence, 2: straight scaler, 3 = preset scaler */
# int hwtrigger, /* 0: no hardware trigger, 1: allow hardware trigger */
# int hwreset, /* 0: no hardware reset, 1: allow hardware reset */
Hy8522AsynInit("SCALER8522", 0, 4, 88, 3, 1, 0 )
#int Hy8522AsynExtInit(
# portName = asyn port name
# gateIntv = Histogram mode (both normal and coincidence): When extadvance setting is 0 , this is the gate
#
interval as below:
#
If timeunit = 0, i.e. 1ms, this defines the interval in mini-second
#
If timeunit = 1, i.e. 100us, this defines the interval in 100us steps.
#
When extadvance = 1, it is number of pulses to advance the memory location
#
Straight scaler mode: This is used as the time interval as per timeunit setting. It doesn't
#
support external advancing
#
Preset scaler mode: not used.
# timeunit = Histogram mode (both normal and coincidence): interval time unit. 0 = 1ms, 1 = 100us
#
Straight scaler mode: same as histogram mode.
#
Preset scaler mode: not used.
# nocycles = Histogram mode (both normal and coincidence): defines the number of cycles. If set to 0, it
#
doesn't do anything.
#
Straight scaler mode: the number of triggers or the number of counting in memory. Up to 32K
#
for each channel
#
Preset scaler mode: not used.
#
nogates = Histogram mode (both normal and coincidence): defines the number of gates (bins), i.e. How
#
many gates in a cycle. Each gate stores counting of pulses in one memory location.
#
Next cycle adds up to the same location to form histogram.
#
Straight scaler mode: not used.
#
Preset scaler mode: not used.
#
mask = Histogram mode (both normal and coincidence): mask bit (set to 1) to DISABLE channels.
#
Straight scaler mode: same as histogram mode.
#
Preset scaler mode: ARM bit. Set to 1 to ARM the correspondent channel
# extadvance = Histogram mode (both normal and coincidence): 0:internal interval for bin advancing,
#
1:external pulses to control the memory advancing
#
Straight scaler mode: not used.
#
Preset scaler mode: not used.
#
freq = For all modes: internal clock. 0: 25MHz, 1:50MHz, 2:100MHz, 3:200MHz
#
source = For all modes: bit0~bit15 represent channel0~channel15. 0: use external source. 1: use
#
internal clock source defined by freq
#Hy8522AsynExtInit("SCALER8522", 3, 0, 4, 6, 0x0000, 1, 0, 0xffff) #for histogram and straight scaler
modes. Comment this out when it is preset mode
Hy8522AsynExtInit("SCALER8522", 0, 0, 0, 0, 0xffff, 0, 0, 0x7FFF)
#for preset scaler mode. Comment
this line out when it is not preset mode
# The following settings are for histogram mode with coincidence. They are ignored by other modes.
Issue 12
Page 81 of 205