|
67 | 67 | % 2017-10 MW updated |
68 | 68 |
|
69 | 69 | properties |
70 | | - DaqVendor = 'ni' % 'ni' is using National Instruments USB-6211 DAQ |
71 | | - DaqIds = 'Dev1' % Device ID can be found with daq.getDevices() |
72 | | - DaqSampleRate = 1000 % rate at which daq aquires data in Hz, see Rate |
73 | | - DaqSamplesPerNotify % determines the number of data samples to be processed each time, see Timeline.process(), constructor and NotifyWhenDataAvailableExceeds |
74 | | - Outputs = hw.TLOutputChrono % array of output classes, defining any signals you desire to be sent from the daq. See Also HW.TLOUTPUT, HW.TLOUTPUTCLOCK |
| 70 | + % 'ni' is using National Instruments USB-6211 DAQ |
| 71 | + DaqVendor = 'ni' |
| 72 | + % Device ID can be found with daq.getDevices() |
| 73 | + DaqIds = 'Dev1' |
| 74 | + % rate at which daq aquires data in Hz, see Rate |
| 75 | + DaqSampleRate = 1000 |
| 76 | + % determines the number of data samples to be processed each time, |
| 77 | + % see Timeline.process(), constructor and |
| 78 | + % NotifyWhenDataAvailableExceeds |
| 79 | + DaqSamplesPerNotify |
| 80 | + % array of output classes, defining any signals you desire to be |
| 81 | + % sent from the daq. See Also HW.TLOUTPUT, HW.TLOUTPUTCLOCK |
| 82 | + Outputs = hw.TLOutputChrono |
| 83 | + % All configured inputs. |
75 | 84 | Inputs = struct('name', 'chrono',... |
76 | | - 'arrayColumn', -1,... % -1 is default indicating unused, this is update when the channels are added during tl.start() |
| 85 | + 'arrayColumn', -1,... -1 is default indicating unused, this is update when the channels are added during tl.start() |
77 | 86 | 'daqChannelID', 'ai0',... |
78 | 87 | 'measurement', 'Voltage',... |
79 | 88 | 'terminalConfig', 'SingleEnded',... |
80 | 89 | 'axesScale', 1) % multiplicative vertical scaling for when live plotting the input |
81 | | - UseInputs = {'chrono'} % array of inputs to record while tl is running |
82 | | - StopDelay = 2 % currently pauses for at least 2 secs as 'hack' before stopping main DAQ session to allow |
83 | | - MaxExpectedDuration = 2*60*60 % expected experiment time so data structure is initialised to sensible size (in secs) |
84 | | - AquiredDataType = 'double' % default data type for the acquired data array (i.e. Data.rawDAQData) |
85 | | - UseTimeline = false % used by expServer. If true, timeline is started by default (otherwise can be toggled with the t key) |
86 | | - LivePlot = false % if true the data are plotted as the data are aquired |
87 | | - FigureScale = [0 0 1 1]; % figure position in normalized units, default is full screen |
88 | | - WriteBufferToDisk = false % if true the data buffer is written to disk as they're aquired NB: in the future this will happen by default |
| 90 | + % array of inputs to record while tl is running |
| 91 | + UseInputs = {'chrono'} |
| 92 | + % currently pauses for at least 2 secs as 'hack' before stopping |
| 93 | + % main DAQ session to allow |
| 94 | + StopDelay = 2 |
| 95 | + % expected experiment time so data structure is initialised to |
| 96 | + % sensible size (in secs) |
| 97 | + MaxExpectedDuration = 2*60*60 |
| 98 | + % default data type for the acquired data array (i.e. |
| 99 | + % Data.rawDAQData) |
| 100 | + AquiredDataType = 'double' |
| 101 | + % If true, timeline is started by default (otherwise can be toggled |
| 102 | + % with the t key in expServer) |
| 103 | + UseTimeline matlab.lang.OnOffSwitchState = 'off' |
| 104 | + % if true the data are plotted as the data are aquired |
| 105 | + LivePlot matlab.lang.OnOffSwitchState = 'off' |
| 106 | + % figure position in normalized units, default is full screen |
| 107 | + FigureScale = [0 0 1 1] |
| 108 | + % if true the data buffer is written to disk as they're aquired NB: |
| 109 | + % in the future this will happen by default |
| 110 | + WriteBufferToDisk matlab.lang.OnOffSwitchState = 'off' |
89 | 111 | end |
90 | 112 |
|
91 | 113 | properties (Dependent) |
92 | | - SamplingInterval % defined as 1/DaqSampleRate |
93 | | - IsRunning = false % flag is set to true when the first chrono pulse is aquired and set to false when tl is stopped (and everything saved), see tl.process and tl.stop |
| 114 | + % Sampling interval defined as 1/DaqSampleRate |
| 115 | + SamplingInterval |
| 116 | + % Switch set to true when the first chrono pulse is aquired and |
| 117 | + % set to false when tl is stopped (and everything saved), see |
| 118 | + % tl.process and tl.stop |
| 119 | + IsRunning matlab.lang.OnOffSwitchState = 'off' |
94 | 120 | end |
95 | 121 |
|
96 | 122 | properties (Transient, Access = protected) |
97 | | - Listener % holds the listener for 'DataAvailable', see DataAvailable and Timeline.process() |
98 | | - LastTimestamp % the last timestamp returned from the daq during the DataAvailable event. Used to check sampling continuity, see tl.process() |
99 | | - Ref % the expRef string. See tl.start() |
100 | | - AlyxInstance % a struct contraining the Alyx token, user and url for ile registration. See tl.start() |
101 | | - Data % A structure containing timeline data |
102 | | - Axes % A figure handle for plotting the aquired data as it's processed |
103 | | - DataFID % The data file ID for writing aquired data directly to disk |
| 123 | + % holds the listener for 'DataAvailable', see DataAvailable and |
| 124 | + % Timeline.process() |
| 125 | + Listener |
| 126 | + % the last timestamp returned from the daq during the DataAvailable |
| 127 | + % event. Used to check sampling continuity, see tl.process() |
| 128 | + LastTimestamp |
| 129 | + % the expRef string. See tl.start() |
| 130 | + Ref |
| 131 | + % a struct contraining the Alyx token, user and url for ile |
| 132 | + % registration. See tl.start() |
| 133 | + AlyxInstance |
| 134 | + % A structure containing timeline data |
| 135 | + Data |
| 136 | + % A figure handle for plotting the aquired data as it's processed |
| 137 | + Axes |
| 138 | + % The data file ID for writing aquired data directly to disk |
| 139 | + DataFID |
104 | 140 | end |
105 | 141 |
|
106 | 142 | properties (Transient, SetAccess = protected, GetAccess = {?hw.Timeline, ?hw.TLOutput}) |
107 | | - Sessions = containers.Map % map of daq sessions and their channels, created at tl.start() |
| 143 | + % Map of daq sessions and their channels, created at tl.start() |
| 144 | + Sessions = containers.Map |
108 | 145 | end |
109 | 146 |
|
110 | 147 | methods |
|
0 commit comments