Case study: how to use the event counters in NOVA? 1 Event counter support NOVA Technical Note 22 Event counters in NOVA Most of the measurement commands, like CV staircase or Record signals (> 1 ms) provide support for so-called Event counter option, or counter in short. This option can be used during a measurement to perform dedicated actions whenever a condition associated with the counter is triggered. This option provides the means to create a measurement during which events are accurately timed and executed, without interfering with the experiment. Since the counter is intrinsically linked to the measured data, the events triggered by the counters are directly correlated to the data points. In this technical note, the use of the counters will be described. 2 Parameters of a counter Counters are defined in the Options, in the Autolab control tab (see Figure 1). Figure 1 Event counters are defined in the Options dialog (Autolab control tab) The frame on the left hand side shows the event counters used during the measurement. To add an event counter to the list, click the button (see Figure 1). 1 Page
NOVA Technical note 22 The frame on the right hand side show the properties of the selected event counter. The following settings can be specified: Action triggered when counter (=, >, <): specifies the conditions required for the event counter to trigger the action. This property is used in combination with the Counter property. Counter: specifies the counter value used in combination with the previous property. When this property combination is met during the measurement, the event counter will trigger the specified Action. Reset counter: specifies if the event counter is reset after it is triggered. Action: specifies the action executed by the event counter when it is triggered. A few examples of event counters will be illustrated in the next sections. 2.1 Simple event counter A simple event counter is an option which is triggered once a predefined condition is met. To illustrate this, we will assume that the scope of the measurement is to switch the Autolab RDE on and set the rotation rate to 2400 RPM during a Record signals (> 1 ms) command, after 100 points have been measured. The procedure used for this experiment is shown in Figure 2. In this procedure, the RDE rotation rate is first set to 0 RPM (using the Autolab control command). The potential is then set to 0.5 V and the current is measured by the Record signals (> 1 ms) command for 2 seconds, using an interval time of 0.01 s. This will result in 200 data points. 2 Page
NOVA Technical Note 22 Figure 2 The procedure used to illustrate a simple event counter To define a simple event counter, open the Options window and add an Event counter as explained in the first part of this technical note. The properties of the Event counter can be set as shown in Figure 3. The following settings are used: Action triggered when counter: > Counter: 100 Reset counter: false 3 Page
NOVA Technical note 22 Figure 3 Setting up a simple event counter The combination of these properties means that when the Record signals (> 1 ms) command starts, the counter will start running. When the counter reaches a value of more than 100, it will trigger the specified action. The reset counter property is set to false, which means that the action will only be triggered once. To specify the action, click the button next to the Action property (see Figure 4). 4 Page
NOVA Technical Note 22 Figure 4 Specifying the action for the event counter (1/3) A new window, similar to the previous one, will be displayed (see Figure 5). Note The default action defined for an Event counter is a DIO pulse. 5 Page
NOVA Technical note 22 Figure 5 Specifying the action for the event counter (2/3) Click the button, as shown in Figure 5, to remove the default action and use the dropdown list to select an Autolab control action and click the button to add the Autolab control action to the Event counter (see Figure 6). 6 Page
NOVA Technical Note 22 Figure 6 Specifying the action for the event counter (3/3) Click the button next to the Autolab control property in the frame on the right hand side to open the Autolab control dialog and change the instrument settings (see Figure 7). 7 Page
NOVA Technical note 22 Figure 7 Setting the rotation rate to 2400 RPM in the Autolab control Click the specify properly. button to close the open windows. The event counter is now When this procedure is now executed, at the beginning of the Record signals (> 1 ms) command the counter will start running. When the counter reaches a value larger than 100 (effectively at data point number 101), the rotation rate of the Autolab RDE will be adjusted to 2400 RPM by Autolab control action defined for the Event counter. This will not interrupt the measurement. 2.2 Repeated event counter A repeated event counter is an option which is triggered each time a predefined condition is met. To illustrate this, we will assume that the scope of the measurement is to send a DIO pulse to an external device during a Record signals (> 1 ms) command, every time (the counter reaches) 10 points have been measured. The procedure used for this experiment is shown in Figure 2. To define a repeated event counter, open the Options window and add an Event counter as explained in the first part of this technical note. The properties of the Event counter can be set as shown in Figure 8. The following settings are used: 8 Page
NOVA Technical Note 22 Action triggered when counter: = Counter: 10 Reset counter: true Figure 8 Setting up a repeated event counter The combination of these properties means that when the Record signals (> 1 ms) command starts, the counter will start running. Each time the counter reaches a value of 10, it will trigger the specified action. The reset counter property is set to true, which means that the counter will be reset to 0 when the action is triggered. The counter will then increment until it triggers the action again. To specify the action, click the button next to the Action property (see Figure 9). 9 Page
NOVA Technical note 22 Figure 9 Specifying the action for the repeated event counter A new window, similar to the previous one, will be displayed (see Figure 10). Note The default action defined for an Event counter is a DIO pulse. 10 Page
NOVA Technical Note 22 Figure 10 Setting up the DIO pulse In this example, the default Pulse action will be used. The following properties can be adjusted: Connector (P1 or P2): the DIO connector used to send the pulse. Port (A, B, or C): the DIO port used to send the pulse. Pulse value: the decimal expression of the 8 bit pulse state of the DIO port. Duration (µs): the duration of the DIO pulse, in µs. Final value: the decimal expression of the 8 bit pulse state of the DIO port. Note For more information on the use of DIO triggers, please refer to the External devices tutorial, available from the Help menu in NOVA. In the example shown in Figure 10, the properties are set in such a way that when the action is triggered, pin 1 of port A 1, located on connected P1, will transition 1 The binary expression of this DIO status is 00000001, which corresponds to 1 in decimal. 11 Page
NOVA Technical note 22 from its current state to high state (1). 10 ms later, the same pin will return to its low state (0). This will result in a 10 ms long DIO pulse. When this procedure is now executed, at the beginning of the Record signals (> 1 ms) command the counter will start running. When the counter reaches a value of 10 (effectively at data point number 10), a 10 ms long pulse is sent through the specified pin. The counter is reset to 0 and the measurement continues. At data point number 20, the action is triggered again, and so on until the end of the measurement. The timing of the experiment is not affected. 2.3 Complex event counters It is possible to use the strategy illustrated in the previous sections to create complex counter combinations. To illustrate this, the same procedure as shown in Figure 2 will be used in combination with the Autolab LED Driver kit. The duration of the Record signals (> 1 ms) command is modified to 120 seconds and the interval time is modified to 1 second. During the Record signals (>1 ms) command, event counters will be used in such a way that the light source is switched on (at a driving current of 300 ma) and off at regular intervals, as shown in Figure 11. Figure 11 The light intensity profile The exact scope of the measurement is to start the measurement with the light off (0 ma driving current). After 5 seconds, the light should be switched on and switched off again at 10 seconds. This is then repeated during the measurement, as shown in Figure 11. 12 Page
NOVA Technical Note 22 To setup this experiment according to the specifications, a total of four event counters must be used. The settings of each event counter are the following: Event counter #1 o Action triggered when counter: = o Counter: 5 o Reset counter: False o Action: Autolab control, LED Driver current to 300 ma Event counter #2 o Action triggered when counter: = o Counter: 10 o Reset counter: True o Action: Autolab control, LED Driver current to 0 ma Event counter #3 o Action triggered when counter: > o Counter: 5 o Reset counter: False o Action: Event counter #4 Event counter #4 o Action triggered when counter: = o Counter: 10 o Reset counter: True o Action: Autolab control, LED Driver current to 300 ma The implementation of these counter is shown in Figure 12. Figure 12 Implementation of the four event counters The first three event counters are running in parallel, the fourth event counter only starts when the third event counter is triggered. 13 Page
NOVA Technical note 22 When this measurement is executed, the counters start as soon as the Record signals (> 1 ms) command starts. The first three counters are executed in parallel. After five data points, Event counter 1 is triggered. This counter is not reset and it is therefore only triggered once. This counter set the LED Driver current to 300 ma, using the Autolab control as action. This means that the light is switched on after 5 data points. When the number of points is higher than 5, Event counter 3 is triggered and a new Event counter (Event counter 4 starts running). When the number of points reaches 10, Event counter 2 is triggered. Before resetting the counter, the LED Driver current is set to 0 ma. This means that the light is switched off after 10 data points. This will be repeated every 10 data points since the counter is reset. Meanwhile, Event counter 4 is running. When the number of points reaches 15, this counter is triggered. Before resetting the counter, the LED Driver current is set to 300 ma. This means that the light is switched on again after 15 points. This will be repeated every 10 data points since the counter is reset. Using this complex combination of counters, the light can be switched on and off continuously without interfering with measurement. 3 Conclusion Event counters can be used with any measurement command that supports options in order to carry out carefully timed actions without interfering with the rest of the experiment. It is a flexible solution that can be used to control external device and accessories in a single experiment. 14 Page