This repository has been archived by the owner on Nov 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetint.cmd
129 lines (119 loc) · 13.5 KB
/
detint.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
drvAsynSerialPortConfigure "$(COM1)", "/dev/ttyUSB2"
asynOctetSetInputEos ("$(COM1)",0,"\r\n")
asynOctetSetOutputEos ("$(COM1)",0,"\r\n")
asynSetOption ("$(COM1)", 0, "baud", "230400")
asynSetOption ("$(COM1)", 0, "bits", "8")
asynSetOption ("$(COM1)", 0, "parity", "none")
asynSetOption ("$(COM1)", 0, "stop", "1")
dbLoadRecords("detector_controls.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), SYNC_EVNT=16, TSU-OFF=53, CLK_RST_EVNT=15, TSL-OFF=54, EVR=EVR-01, PRO=ics-dg.proto")
dbLoadRecords("ro_hex_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=0, SCAN=Passive, REG=GIT, DESC=git hash, PRO=ics-dg.proto")
dbLoadRecords("ro_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=1, REG=BUILD, DESC=build time, PRO=ics-dg.proto")
dbLoadRecords("ro_hex_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=2, SCAN=Passive, REG=ID-H, DESC=device ID_H, PRO=ics-dg.proto")
dbLoadRecords("ro_hex_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=3, SCAN=Passive, REG=ID-M, DESC=device ID_M, PRO=ics-dg.proto")
dbLoadRecords("ro_hex_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=4, SCAN=Passive, REG=ID-L, DESC=device ID_L, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=5, REG=LPBK, DESC=loopback test register, PRO=ics-dg.proto")
dbLoadRecords("reset_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=6, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=7, REG=ADC-SEL, DESC=ADC channel select, PRO=ics-dg.proto")
dbLoadRecords("oversampling.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=8, PRO=ics-dg.proto")
dbLoadRecords("sampling_mode.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=9, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=10, REG=CH0-T, DESC=ADC Ch0 Threshold, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=11, REG=CH1-T, DESC=ADC Ch1 Threshold, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=12, REG=CH2-T, DESC=ADC Ch2 Threshold, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=13, REG=CH3-T, DESC=ADC Ch3 Threshold, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=14, REG=RH-B2, DESC=Rising Hold B2, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=15, REG=FH-B2, DESC=Falling Hold B2, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=16, REG=SMPSB, DESC=Samples B B2, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=17, REG=SMPSA, DESC=Samples A B2, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=18, REG=MING, DESC=ADC min gap b2, PRO=ics-dg.proto")
dbLoadRecords("rw_mac_address.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=19, DIR=SRC, PRO=ics-dg.proto")
dbLoadRecords("rw_mac_address.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=21, DIR=DST, PRO=ics-dg.proto")
dbLoadRecords("rw_ip_address.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=23, DIR=SRC, PRO=ics-dg.proto")
dbLoadRecords("rw_ip_address.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=24, DIR=DST, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=25, REG=UDPS, DESC=UDP Source Port, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=26, REG=UDPD, DESC=UDP Destination Port, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=27, REG=PTO, DESC=Packet Timeout, PRO=ics-dg.proto")
dbLoadRecords("channel_gain.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=28, CH=1, PRO=ics-dg.proto")
dbLoadRecords("channel_gain.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=29, CH=2, PRO=ics-dg.proto")
dbLoadRecords("channel_gain.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=30, CH=3, PRO=ics-dg.proto")
dbLoadRecords("channel_gain.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=31, CH=4, PRO=ics-dg.proto")
dbLoadRecords("ch_offset.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=32, CH=1, PRO=ics-dg.proto")
dbLoadRecords("ch_offset.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=33, CH=2, PRO=ics-dg.proto")
dbLoadRecords("ch_offset.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=34, CH=3, PRO=ics-dg.proto")
dbLoadRecords("ch_offset.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=35, CH=4, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=36, REG=SPI, DESC=ADC SPI, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=37, REG=SI570-B, DESC=SI570 base, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=38, REG=SI570-D, DESC=SI570 data, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=39, REG=SI570-T, DESC=SI570 trig, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=40, REG=LEDSEL, DESC=LED select, PRO=ics-dg.proto")
dbLoadRecords("ro_2x16bit_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=41, NR2=2, NR1=1, REG=PCNT, DESC=Pulse count ch, PRO=ics-dg.proto")
dbLoadRecords("ro_2x16bit_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=42, NR2=4, NR1=3, REG=PCNT, DESC=Pulse count ch, PRO=ics-dg.proto")
dbLoadRecords("ro_2x16bit_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=43, NR2=2, NR1=1, REG=FCNT, DESC=Frame count ch, PRO=ics-dg.proto")
dbLoadRecords("ro_2x16bit_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=44, NR2=4, NR1=3, REG=FCNT, DESC=Frame count ch, PRO=ics-dg.proto")
dbLoadRecords("ro_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=45, REG=PKCNT, DESC=Packet Count, PRO=ics-dg.proto")
dbLoadRecords("ro_2x16bit_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=46, NR2=2, NR1=1, REG=SNAP, DESC=ADC snap value ch, PRO=ics-dg.proto")
dbLoadRecords("ro_2x16bit_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=47, NR2=4, NR1=3, REG=SNAP, DESC=ADC snap value ch, PRO=ics-dg.proto")
dbLoadRecords("ro_hex_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=48, SCAN=10 second, REG=STATUS0, DESC=Status 0, PRO=ics-dg.proto")
dbLoadRecords("ro_hex_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=49, SCAN=10 second, REG=STATUS1, DESC=Status 1, PRO=ics-dg.proto")
dbLoadRecords("ro_register.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=50, REG=STATUS2, DESC=Status 2, PRO=ics-dg.proto")
dbLoadRecords("clock_select.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=51, PRO=ics-dg.proto")
dbLoadRecords("payload_select.db", "SYS=$(SYS), DEV=$(DEV1), COM=$(COM1), OFF=52, PRO=ics-dg.proto")
drvAsynSerialPortConfigure "$(COM2)", "/dev/ttyUSB3"
asynOctetSetInputEos ("$(COM2)",0,"\r\n")
asynOctetSetOutputEos ("$(COM2)",0,"\r\n")
asynSetOption ("$(COM2)", 0, "baud", "230400")
asynSetOption ("$(COM2)", 0, "bits", "8")
asynSetOption ("$(COM2)", 0, "parity", "none")
asynSetOption ("$(COM2)", 0, "stop", "1")
dbLoadRecords("detector_controls.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), SYNC_EVNT=16, TSU-OFF=53, CLK_RST_EVNT=15, TSL-OFF=54, EVR=EVR-01, PRO=ics-dg.proto")
dbLoadRecords("ro_hex_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=0, SCAN=Passive, REG=GIT, DESC=git hash, PRO=ics-dg.proto")
dbLoadRecords("ro_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=1, REG=BUILD, DESC=build time, PRO=ics-dg.proto")
dbLoadRecords("ro_hex_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=2, SCAN=Passive, REG=ID-H, DESC=device ID_H, PRO=ics-dg.proto")
dbLoadRecords("ro_hex_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=3, SCAN=Passive, REG=ID-M, DESC=device ID_M, PRO=ics-dg.proto")
dbLoadRecords("ro_hex_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=4, SCAN=Passive, REG=ID-L, DESC=device ID_L, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=5, REG=LPBK, DESC=loopback test register, PRO=ics-dg.proto")
dbLoadRecords("reset_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=6, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=7, REG=ADC-SEL, DESC=ADC channel select, PRO=ics-dg.proto")
dbLoadRecords("oversampling.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=8, PRO=ics-dg.proto")
dbLoadRecords("sampling_mode.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=9, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=10, REG=CH0-T, DESC=ADC Ch0 Threshold, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=11, REG=CH1-T, DESC=ADC Ch1 Threshold, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=12, REG=CH2-T, DESC=ADC Ch2 Threshold, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=13, REG=CH3-T, DESC=ADC Ch3 Threshold, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=14, REG=RH-B2, DESC=Rising Hold B2, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=15, REG=FH-B2, DESC=Falling Hold B2, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=16, REG=SMPSB, DESC=Samples B B2, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=17, REG=SMPSA, DESC=Samples A B2, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=18, REG=MING, DESC=ADC min gap b2, PRO=ics-dg.proto")
dbLoadRecords("rw_mac_address.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=19, DIR=SRC, PRO=ics-dg.proto")
dbLoadRecords("rw_mac_address.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=21, DIR=DST, PRO=ics-dg.proto")
dbLoadRecords("rw_ip_address.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=23, DIR=SRC, PRO=ics-dg.proto")
dbLoadRecords("rw_ip_address.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=24, DIR=DST, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=25, REG=UDPS, DESC=UDP Source Port, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=26, REG=UDPD, DESC=UDP Destination Port, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=27, REG=PTO, DESC=Packet Timeout, PRO=ics-dg.proto")
dbLoadRecords("channel_gain.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=28, CH=1, PRO=ics-dg.proto")
dbLoadRecords("channel_gain.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=29, CH=2, PRO=ics-dg.proto")
dbLoadRecords("channel_gain.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=30, CH=3, PRO=ics-dg.proto")
dbLoadRecords("channel_gain.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=31, CH=4, PRO=ics-dg.proto")
dbLoadRecords("ch_offset.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=32, CH=1, PRO=ics-dg.proto")
dbLoadRecords("ch_offset.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=33, CH=2, PRO=ics-dg.proto")
dbLoadRecords("ch_offset.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=34, CH=3, PRO=ics-dg.proto")
dbLoadRecords("ch_offset.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=35, CH=4, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=36, REG=SPI, DESC=ADC SPI, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=37, REG=SI570-B, DESC=SI570 base, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=38, REG=SI570-D, DESC=SI570 data, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=39, REG=SI570-T, DESC=SI570 trig, PRO=ics-dg.proto")
dbLoadRecords("rw_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=40, REG=LEDSEL, DESC=LED select, PRO=ics-dg.proto")
dbLoadRecords("ro_2x16bit_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=41, NR2=2, NR1=1, REG=PCNT, DESC=Pulse count ch, PRO=ics-dg.proto")
dbLoadRecords("ro_2x16bit_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=42, NR2=4, NR1=3, REG=PCNT, DESC=Pulse count ch, PRO=ics-dg.proto")
dbLoadRecords("ro_2x16bit_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=43, NR2=2, NR1=1, REG=FCNT, DESC=Frame count ch, PRO=ics-dg.proto")
dbLoadRecords("ro_2x16bit_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=44, NR2=4, NR1=3, REG=FCNT, DESC=Frame count ch, PRO=ics-dg.proto")
dbLoadRecords("ro_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=45, REG=PKCNT, DESC=Packet Count, PRO=ics-dg.proto")
dbLoadRecords("ro_2x16bit_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=46, NR2=2, NR1=1, REG=SNAP, DESC=ADC snap value ch, PRO=ics-dg.proto")
dbLoadRecords("ro_2x16bit_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=47, NR2=4, NR1=3, REG=SNAP, DESC=ADC snap value ch, PRO=ics-dg.proto")
dbLoadRecords("ro_hex_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=48, SCAN=10 second, REG=STATUS0, DESC=Status 0, PRO=ics-dg.proto")
dbLoadRecords("ro_hex_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=49, SCAN=10 second, REG=STATUS1, DESC=Status 1, PRO=ics-dg.proto")
dbLoadRecords("ro_register.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=50, REG=STATUS2, DESC=Status 2, PRO=ics-dg.proto")
dbLoadRecords("clock_select.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=51, PRO=ics-dg.proto")
dbLoadRecords("payload_select.db", "SYS=$(SYS), DEV=$(DEV2), COM=$(COM2), OFF=52, PRO=ics-dg.proto")
dbLoadRecords("evr_detector_controls.db", "SYS=$(SYS), EVR=$(EVR), TSEVT=$(SYNC_EVNT_LETTER),SYNC_EVNT=$(SYNC_TRIG_EVT)")