The Counter ChannelsThe 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 ModesThe 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 TypesThe counter type identifiers for the low speed counters, high speed counters and the phase encoder counter are detailed in the table below
Low Speed CountersThe 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 CountThe 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 where n is a single counter 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 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 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 RangeThe 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 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) 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 CountThe 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 CountersThe low speed counters are specified in a schedule list in the formats nC where n is a single 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 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 CountersThe 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 InputIn 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 P27=2 external frequency input via C1 terminal, , and the gate is set by the P27=3 an internal 1024 Hz frequency is input to high speed counter 1, and 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 CountThe 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 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 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 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 RangeHigh 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 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) 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 CountThe 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 CountersThe high speed counters are specified in a schedule list in the formats nHSC where n is a single 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 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 OutputHigh 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 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, mode = 3 the output is high for N/2 pulse widths on the input, then mode = 4 the output is held high for N pulse widths 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 which will produce a square wave output at a frequency of 400Hz on C1out. 'Input frequency 19.2KHz 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 EncoderThe 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 CountThe 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 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 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 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 RangeIt 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 EncoderThe 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 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 InputsThe 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 ContentSection 1Construction of the dataTaker 50 Construction of the dataTaker 500 600
Section 2Powering Sensors from the dataTaker The RS232 COMMS Serial Interface Measuring 4-20mA Current Loops Measuring Frequency and Period 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 Installing The Panel Mount Display
Section 3Communication Protocols and Commands Entering Commands and Programs |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||