Good afternoon D. Dantas,
The counters in the dataTaker can be preset to a value at any time.
The command 1C=10 will load the value of 10 into the counter and when the counter start it will count from that point. i.e With the next pulse the counter will increase to 11 and so on.
The approach you may want to use is to put the command 1C=0 into a schedule and then call that schedule when you want to reset the counter.
For example
BEGIN"cnt_tst"
RA1S 'Read counter every second
1C
RBX 'Reset the counter
1C=0
END
When ever you send a XB to the dataTaker it will reset the counter.
Or if you want you can use an alarm statement. By wiring a switch between digital input 1 and the digital ground you can have the counter clear when the switch is toggled.
BEGIN"cnt_tst"
RA1S 'Read counter every second
1C
ALARM1(1DS>0.5){[1C=0]}
END
Cheers,
Roger
Good afternoon D. Dantas,
The counters in the dataTaker can be preset to a value at any time.
The command 1C=10 will load the value of 10 into the counter and when the counter start it will count from that point. i.e With the next pulse the counter will increase to 11 and so on.
The approach you may want to use is to put the command 1C=0 into a schedule and then call that schedule when you want to reset the counter.
For example
BEGIN"cnt_tst"
RA1S 'Read counter every second
1C
RBX 'Reset the counter
1C=0
END
When ever you send a XB to the dataTaker it will reset the counter.
Or if you want you can use an alarm statement. By wiring a switch between digital input 1 and the digital ground you can have the counter clear when the switch is toggled.
BEGIN"cnt_tst"
RA1S 'Read counter every second
1C
ALARM1(1DS>0.5){[1C=0]}
END
Cheers,
Roger