dataTaker - Data Loggers, Powerful and Flexible Data Acquisition & Data Logging Systems

The Counter Channels

The dataTaker supports three different types of counters as follows

Low speed counters

High speed counters

Phase encoder counter

The counters are all 16 bit counters, and count upwards over the range of 0 to 65535. When the maximum count is reached, the next transition on the input causes the counters to 'roll over' to 0.

The counters begin counting at zero by default, however an initial count other than zero can be defined for individual counters. The counter begins counting from the initial count and 'rolls over' to zero when the maximum count is reached.

The count range for individual counters can be redefined within the range of 1 to 65535, such that the counter 'rolls over' at maximums of less than 65535.

The phase encoder counter is a special purpose counter, which has two inputs. The counter increments when the two pulse trains are in one phase, and decrements when the pulse trains are in the reverse phase. By default the phase encoder counter counts over the range of 0 to 65535 beginning at zero, however the start count and range can also be changed.

The dataTaker counters run automatically, and do not need to be specifically enabled. The counters can be included in Schedules and Alarms, and can be singularly read by the Immediate Schedule.

When counters are included in a Schedule, or as inputs in Alarms, they are not automatically cleared to zero. The counters begin at whatever count they contain, and so if a zero initial count is required then the counters must firstly be set to zero before scanning begins.

All counters are cleared to zero by the RESET command.

The low speed counters are software counters and have a maximum frequency of 10Hz. The low speed counters are associated with the digital input channels of the dataTaker.

The dataTaker 50 has 5 low speed counters. The dataTaker 500/600 series loggers have 4 low speed counters.

The high speed counters are hardware counters, with a maximum frequency of 1KHz or 1MHz. All of the dataTakers have 3 high speed counters.

The Channel Expansion Module has no counters.

All counter inputs are compatible with TTL and CMOS logic inputs, and are compatible with voltage free contact closure inputs.

Counter Modes

The dataTaker counters can be used in either of two modes

accumulating or totalising counters, which increment counts and when read return the current accumulation of counts. Successive reads return the progressive accumulation of counts.

resetting or interval counters, which increment counts and when read return the current accumulation of counts, and are reset to zero again. Successive reads return the number of counts recorded during the period since the last scan.

Individual counters can be used either as accumulating counters or as resetting counters, but cannot be used both as accumulating and resetting counters in the same application.

Counter Types

The counter type identifiers for the low speed counters, high speed counters and the phase encoder counter are detailed in the table below

Counter Types

   

Number of Counters

 

Counter

Input Type Identifier

DT50

DT500

DT600

CEM

Units

Text

Low Speed Counters

       

- accumulating

C

5

4

0

Counts

- resetting

C(R)

5

4

0

Counts

High Speed Counters

       

- accumulating

HSC

3

3

0

Counts

- resetting

HSC(R)

3

3

0

Counts

Phase Encoder Counter

- accumulating

PE

1

1

0

Counts

- resetting

PE(R)

1

1

0

Counts

Low Speed Counters

The low speed counters are software counters, which share the digital input channels of the dataTaker. The counters increment whenever a negative transition occurs on the digital input channel.

The low speed counters count upwards, with a maximum frequency of 10Hz default. The maximum frequency is determined by the digital input sample period, which defaults to 50mS. The sample period can be changed by the Parameter13 command, however if this is set too fast then the dataTaker will become slow in other functions.

These low speed counters are 16 bit counters, with a count range of 0 to 65535. They can be used as accumulating counters, or as resetting counters.

The dataTaker 50 has 5 low speed counters, dataTaker 500/600 loggers have 4 low speed counters.

Note 1: The low speed counters are powered down whenever the dataTaker drops to the low power mode, and cannot be used for counting during these periods.

Note 2: The digital channels used for the low speed counters are bi-directional, and cannot be used as counters if they have previously been used as digital outputs and left switched ON. The digital channels can be used as counters only if their output state is OFF.

Setting the Low Speed Counter Initial Count

The low speed counters normally begin counting from zero, and increment to the maximum count. However the counters can be set to an initial count as follows

nC=count
n..mC=count

where

n              is a single counter
n..m          is a sequence of counters
C             is the low speed counter identifier
count        is the initial count

The initial count can be specified as a constant, a channel variable or an expression. If the value of the initial count is a decimal value, then the value is rounded to the nearest integer.

If the value of the initial count is greater than 65535, then an ìE15-assignment errorî is returned and the counter is initialised to 99999.9 which is the universal dataTaker error value.

The counter begins counting from the initial count and 'rolls over' to zero when the maximum count is reached.

Using DeTransfer, the initial count of low speed counters is set by the commands for example

1C=120
3C=4CV
5C=(8CV+9CV)/2

Whenever the initial count of the low speed counters is set, the counter is read and the new value is returned.

Using DeLogger, the initial count for low speed counters is set in the Pre Schedule Initialization Commands under the Settings tab of the Program Builder. Commands in this position are executed once when the logger is initially programmed.

 

 

The return of the new count can be disabled by including the W (Working)or NR (No Return) channel options in the counter specification as follows

1C(W)=120
3C(NR)=4CV
5C(W)=(8CV+9CV)/2

Commands to set the initial count of low speed counters should not be included in Schedules, since this will cause the counters to be set to the initial count each time the Schedule runs.

Setting the Low Speed Counter Range

The low speed counters normally have a count range of 0 to 65535. However a different count range can be specified by including the required range as a channel option to the counter as follows

nC(range)

where

n              is the counter number
C             is the low speed counter identifier
range        is a value in the range of 0 to 65535

If the value of the range specified is greater than 65535, then the range is set to 65535. If the value for the range is a decimal value, then this is truncated to an integer.

The counter counts from the initial value, and then 'rolls over' to zero when the range is reached.

Using DeTransfer, the count range of low speed counters is set by the commands for example

1C(50)

BEGIN
 RA1M
  3C(100)
END

The command to set the range of low speed counters can either be used directly as an initialization, or within Schedules.

Using DeLogger, the count range for low speed counters can be set in a Schedule using the User channel in the Program Builder (requires DeLogger Ver 4.2.16 or later), or can be initialised in the Pre Schedule Initialization Commands under the Settings tab of the Program Builder (see above for example of this).

 

 

Setting the Low Speed Counter Range and Initial Count

The range and initial count can be set in the same command if required. Using DeTransfer, this can be done by the command for example

2C(200)=50

which starts the counter at 50 counts, and sets the rollover at 200 counts.

Reading the Low Speed Counters

The low speed counters are specified in a schedule list in the formats

nC
nC(R)
n..mC
n..mC(R)

where

n              is a single counter
n..m          is a sequence of counters
C             is the low speed counter type identifier
R              is the channel option for a resetting counter

The low speed counters function as accumulating counters unless the R channel option is included specifying a resetting counter.

The low speed counters can be used either as accumulating counters or as resetting counters. They cannot be used both as accumulating and resetting counters in the same application.

Using DeTransfer, the low speed counters is read by the command for example

BEGIN
 RA1M
  1C  2C(100)  3..4C(R)
END

which instructs the dataTaker to read the low speed counters every minute as follows

counter 1 is read as an accumulating counter, range is 65535

counter 2 is read as an accumulating counter, range 100

counters 3 and 4 are read as resetting counters, that are reset to zero each time they are read.

Using DeLogger, the low speed counters is read by the program for example in the Program Builder

 

 

Data from the low speed counters is returned as integers with units of Counts. When the counters are averaged, the data is returned as floating point data to two decimal places.

The low speed counters can also be used to produce counter events, for triggering Schedules (See Section III ñSchedules Triggered by Counter Events).

High Speed Counters

The three high speed counters of the dataTaker have a maximum frequency of 1 KHz by default, which can be increased to 1 MHz by removing a capacitor from the counter input circuits (contact your dataTaker supplier for this modification).

The high speed counters count upwards, and increment whenever a negative transition occurs on the input terminal.

These counters remain powered at all times, including whenever the dataTaker is operating in the low power mode. Therefore they are suitable for counting pulses when the dataTaker is battery powered and frequently sleeps down to conserve power.

These high speed counters are 16 bit counters, with a count range of 0 to 65535. They can be used either as accumulating counters, or as resetting counters.

High speed counter number 1 also has an output function, which can be used to generate a user definable frequency in the range of 1 to 19200Hz.

High Speed Counter 1 Input

In Series 3 dataTakers, the input to high speed counter 1 can be configured in a number of ways depending on the setting of Parameter27 as follows:

   P27=0       external frequency input via C1 terminal, gate is permanently enabled

   P27=1       an internal 32767 Hz frequency is input to high speed counter 1, and
                   the gate is set by the state on C2, the input for high speed counter 2

   P27=2       external frequency input via C1 terminal, , and the gate is set by the
                   state on C2, the input for high speed counter 2

   P27=3       an internal 1024 Hz frequency is input to high speed counter 1, and
                   the gate is permanently enabled

The gate for high speed counter 1 is active low, and can be enabled by a contact closure to dataTaker ground.

Setting the High Speed Counter Initial Count

The high speed counters normally begin counting from zero, and increment to the maximum count. However the counters can be set to an initial count as follows

nHSC=count

n..mHSC=count

where

n              is a single counter
n..m          is a sequence of counters
HSC         is the high speed counter identifier
count        is the initial count

The initial count can be specified as a constant, a channel variable or an expression. If the value is a decimal value, then it is rounded to the nearest integer.

If the value of the initial count is greater than 65535, then an ìE15-assignment errorî is returned and the counter is initialised to 99999.9 which is the universal dataTaker error value.

The counter begins counting from the initial count and 'rolls over' to zero when the maximum count is reached.

Using DeTransfer, the initial count of high speed counters is set by the commands for example

1HSC=220
2HSC=56CV
3HSC=(8CV-9CV)*25.5

When the initial count of the high speed counters is set, the counter is read and the new value is returned.

Using DeLogger, the initial count for high speed counters is set in the Pre Schedule Initialization Commands under the Settings tab of the Program Builder. Commands in this position are executed once when the logger is initially programmed.

 

 

The return of the new count can be disabled by including the W (Working)or NR (No Return) channel options in the counter specification as follows

1C(W)=120
3C(NR)=4CV
5C(W)=(8CV+9CV)/2

Commands to set the initial count of high speed counters should not be included in Schedules, since this will cause the counters to be set to the initial count each time the Schedule runs.

Setting the High Speed Counter Range

High speed counters normally have a count range of 0 to 65535. However a different count range can be specified by including the required range as a channel option to the counter as follows

nHSC(range)

where

n              is the counter number
HSC         is the high speed counter identifier
range        is a value in the range of 0 to 65535

If the value of the range specified is greater than 65535, then the range is set to 65535. If the value for the range is a decimal value, then this is truncated to an integer.

The counter counts from the initial value, and then 'rolls over' to zero when the range is reached.

Using DeTransfer, the count range of high speed counters is set by the command for example

1HSC(75)
BEGIN
 RA5M
  3HSC(500)
END

The command to set the range of high speed counters can either be used directly as an initialization, or within Schedules.

Using DeLogger, count range for high speed counters can be set in a Schedule using the User channel in the Program Builder (requires DeLogger Ver 4.2.16 or later), or can be initialised in the Pre Schedule Initialization Commands under the Settings tab of the Program Builder (see above for example of this).

 

 

Setting the High Speed Counter Range and Initial Count

The range and initial count can be set in the same command if required. Using DeTransfer, this can be done by the command for example

3HSC(5000)=155

which starts the counter at 155 counts, and sets the rollover at 5000 counts.

Reading the High Speed Counters

The high speed counters are specified in a schedule list in the formats

nHSC
nHSC(R)
n..mHSC
n..mHSC(R)

where

n              is a single counter
n..m          is a sequence of counters
HSC         is the high speed counter type identifier
R              is the channel option for a resetting counter

The high speed counters function as accumulating counters unless the R channel option is included specifying a resetting counter.

The high speed counters can be used as accumulating counters or as resetting counters. They cannot be used both as accumulating and resetting counters in the same application.

Using DeTransfer, the low speed counters is read by the command for example

BEGIN
 RA15M
  1HSC  2HSC(500)  3HSC(R)
END

which instructs dataTaker to read the high speed counters every 15 minutes as follows

counter 1 is read as an accumulating counter, range is 65535

counter 2 is read as an accumulating counter, range 500

counter 3 is read as a resetting counter, which is reset to zero each time it is read.

Using DeLogger, the high speed counters is read by the program for example in the Program Builder

 

 

Data from the high speed counters is returned as integers with units of Counts. When the counters are averaged, the data is returned as floating point data to two decimal places.

The high speed counters can also be used to produce counter events, for triggering Schedules (See Section III ñ Schedules Triggered by Counter Events).

High Speed Counter 1 Output

High speed counter 1 has an output function, which can be used as a programmable prescaler or frequency divider to produce a variable frequency on the output terminal C1out of high speed counter 1. The frequency can be used directly, or fed to frequency to voltage or frequency to 4-20mA converters to produce an analog output.

The output function requires that a reference frequency is applied to the input terminal of high speed counter 1, and the dataTaker program assigns a divisor to the counter to provide the desired output frequency. The output frequency is a sub-frequency of the input frequency, and cannot be greater than the input frequency.

The reference frequency can either be provided in various ways as follows:

All Series of dataTaker Connect a suitable frequency from an external source to C1, the input terminal of 1HSC

Series 1 and Series 2 of dataTaker - internally connect the 19200 Hz frequency from the baud rate generator to the input of 1HSC (this modification can be performed by your dataTaker supplier)

Series 3 of dataTaker – input to 1HSC is determined by the setting of Parameter27. See High Speed Counter 1 Input above.

If the input frequency is greater than 1KHz, then a capacitor must be removed from the counter input circuits to increase the sensitivity of the counter. This modification can be performed by your dataTaker supplier.

The output function of high speed counter 1 is defined by the general command format

1HSCO(mode)=N

where

1HSCO     is the high speed counter output type identifier
mode        defines the output waveform
N             counter range as a constant, channel variable or expression

The mode defines the frequency waveform output on the C1out terminal, for which the settings are as follows

mode = 0            output switches high after N pulses are received on the input

mode = 2            the output is held high for N-1 pulse widths on the input,
                      and low for 1 pulse width on the input

mode = 3            the output is high for N/2 pulse widths on the input, then
                      low for N/2 pulse widths on the input

mode = 4            the output is held high for N pulse widths on the input,
                      and low for 1 pulse width on the input

The range value N can be specified as a constant, a channel variable or an expression.

The most common use of the output is mode 3, which is effectively a frequency divider, where N is the divisor

Fout = Fin / N

If the divisor is a channel variable or an expression, then the divisor can be changed dynamically during the course of an application thereby producing a variable output.

The divisor must not be greater in value than the input frequency. If the divisor is a decimal value, then this is rounded to the nearest integer.

Using DeTransfer, the high speed counter 1 can be used as a frequency divider by the commands for example

'Input frequency 19.2KHz
1HSCO(3)=48

which will produce a square wave output at a frequency of 400Hz on C1out.

'Input frequency 19.2KHz
BEGIN
  R1S
   5TT(=1CV,W)                   'Temperature 1
   6TT(=2CV,W)                   'Temperature 2
   1HSCO(3)=ABS(1CV-2CV)*100
END

will produce a square wave output at a variable frequency which is proportional to the difference in the two temperatures.

The output from high speed counter 1 can be connected to the input of another high speed counter, and used to measure the output frequency if necessary.

DeLogger does not directly support the high speed counter 1 output, however the commands shown above for DeTransfer can be produced in the Program Builder using the User channel (requires DeLogger Ver 4.2.16 or later).

High speed counter 1 functions as a normal counter when not being used for output. However if the input frequency has been internally connected from the 19.2KHz baud rate generator, then high speed counter 1 will not be available for use as a normal counter.

Phase Encoder 

The phase encoder counter is a special purpose counter, which has two inputs. The counter increments when the two pulse trains are in one phase, and decrements when the pulse trains are in the reverse phase.

Phase encoders are used either to measure rotary motion directly, or to measure linear motion which is translated to rotary motion by a wheel or pulley.

Applications for phase encoders include measurement of rotation, distances, and levels such as river height, tank level, etc.

By default the phase encoder counter counts over the range of 0 to 65535 beginning at zero, however the initial count can be changed. Maximum input frequency is 10Hz.

The phase encoder is implemented via digital input channels 3 and 4 of the dataTaker (See Section II - The Phase Encoder).

Note 1:  The phase encoder is powered down when the dataTaker drops to the low power mode, and cannot be used for counting during these periods.

Note 2 :  The digital channels used for the phase encoder are bi-directional, and cannot be used for phase decoding if they have previously been used as digital outputs and left switched ON. The digital channels can be used for phase encoding only if their output state is OFF.

Setting the Phase Encoder Initial Count

The phase encoder counter normally begins counting from zero, and increments or decrements from this value. However the counter can be set to an initial count as follows

1PE=count

where

1PE           is the phase encoder counter identifier
count        is the initial count

The initial count can be specified as a constant, a channel variable or an expression. If the value of the initial count is a decimal value, then the value is rounded to the nearest integer.

If the value of the initial count is greater than 65535, then an ìE15-assignment errorî is returned and the counter is initialised to 99999.9 which is the universal dataTaker error value.

Generally the phase encoder counter should be set to the mid-range (32,767), and the rotation geared such that the counter will not 'roll over' in either direction.

Using DeTransfer, the phase encoder can be set up using the following commands for example

1PE=32767
1PE=8CV/2

Whenever the initial count of the phase encoder is set, the counter is read and the new value is returned. The return of the new count can be disabled by including the W or NR channel options in the counter specification as follows

1PE(W)=32767
1PE(NR)=8CV/2

DeLogger does not directly support the phase encoder, however the commands shown above for DeTransfer can be produced in the Program Builder using the User channel (requires DeLogger Ver 4.2.16 or later).

Commands to set the initial count of phase encoder should not be included in Schedules, since this will cause the phase encoder to be set to the initial count each scan.

Setting the Phase Encoder Counter Range

It is generally not appropriate to set the range for the phase encoder counter.

However if setting the range is required, then this can be done in the same manner as for the low and high speed counters.

Reading the Phase Encoder

The phase encoder is specified in a schedule list by the general format

1PE

where PE is the phase encoder type identifier

The phase encoder is an up-down counter, and using it as a resetting counter 1PE(R) is generally not appropriate to the application.

Using DeTransfer, the phase encoder is initialised and read by the commands for example

1PE=32767
BEGIN
 RA1H
  1PE
END

which sets the initial count to the mid-range, and reads the phase encoder every hour.

DeLogger does not directly support the phase encoder, however the commands shown above for DeTransfer can be produced in the Program Builder using the User channel (requires DeLogger Ver 4.2.16 or later).

Counter Event Inputs

The low speed and high speed counters of the dataTaker can also be used to generate counter events to trigger Schedules (See Section III ñ Schedules Triggered by Counter Events).

Low speed counter events cannot be used while the dataTaker is operating in the low power mode, since during this period the digital input channels are powered down and incoming pulses are ignored.

The high speed counter events can be used while the dataTaker is operating in the low power mode. The incoming event is detected and counted, however the incoming pulse train must also be diode connected to the Wake terminal to wake the logger to respond to the event.

Page Content


Home

Title and Waranty

Go to: Section 2 | Section 3

Section 1


Construction of the dataTaker 50

Construction of the dataTaker 500 600

Construction of the CEM

Getting Started

 

Section 2


Interfacing

Powering the dataTaker

Powering Sensors from the dataTaker

The Serial Interfaces

The RS232 COMMS Serial Interface

The NETWORK Interface

Analog Process

Connect Analog

Analog Chns

Measuring Low Level Voltages

Measuring High Level Voltages

Measuring Currents

Measuring 4-20mA Current Loops

Measuring Resistance

Measuring Frequency and Period

Measuring Analog Logic State

Measuring Temperature

Measuring Temperature with Thermocouples

Measuring Temperature with RTDs

Measuring Temperature with IC Temperature Sensors

Measuring Temperature with Thermistors

Measuring Bridges and Strain Gauges

Measuring Vibrating Wire Strain Gauges

The Digital Input Channels

Monitoring Digital State

The Low Speed Counters

The Phase Encoder Counter

The High Speed Counters

The Digital Output Channels

The Channel Expansion Module

Installing The Panel Mount Display

 

Section 3


Programming the dataTaker

Communication Protocols and Commands

Entering Commands and Programs

Format of Returned Data

Specifying Channels

The Analog Input Channels

The Digital Input Channels

The Counter Channels

The Digital Output Channels

The Real Time Clock

The Internal Channels

Channel Options

Schedules

Alarms

Scaling Data - Polynomials, Spans and Functions

CVs Calcs and Histogram

Logging Data to Memory

Programming from Memory Cards

STATUS RESET TEST

Switches and Parameters

Networking

Writing Programs

Keypad and Display

Error Mess Text

Appendix A - ASCII

Appendix B - ADC Timing