Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
To measure the duration of a cycle, select Cycle Duration in the drop-down box:
Frequency can then be calculated using the following formula:
In this case, this frequency is NOT average frequency. It is instantaneous frequency.
The KBox will wait until the cycle measurement is finished before sending a CAN message with the duration. If the cycle duration is long, the messages may be sent slower than the selected Rate.
If the Cycle duration is shorter than the time between messages set by the Rate, the duration will be re-calculated before being sent.
You can change to the Digital Channel Configuration by clicking on the tab:
Pressing the Load icon tab loads the settings contained in the K-Box and displays them on the screen.
Here, you can configure the Digital Channels:
The CAN Ident and rates that the K-Box will broadcast channels used as input.
The CAN Ident and rates that the K-Box will receive data to be output.
In output mode, it should output 3.3V (Digital 1-3) or operate in Open Collector mode (Digiatl4).
PINs 1-3 can be configured to measure pulse duration, frequency, duty cycle, count events, cycle duration, or RPM when in’ Input’ mode.
PIN 4 can be used as an output for wake-up or to supply power, for example, to another daisy-chained K-Box.
The 4 Digital Pins can all be configured as outputs: If that mode is used, then they either act in open collector mode (the base of the internal NPN transistor is energised according to the data that the K-Box receives via CAN message to the Outputs CAN ident configured) or they can act in 3.3V mode in which case they will output 3.3V or 0V depending on the to the data that the K-Box receives via CAN message to the Outputs CAN ident configured. If using the pins as outputs, you must set up CAN Messages with the same IDents as you have set up that broadcast data to the K-Box… The data format required is specified in the DBC file, and you can use the DiaLog DBC Editor (in the Presets section) to look at this.
The first 3 Digital Pins can also be used as inputs and measure pulse duration, frequency, duty cycle, count events, cycle duration or RPM, and output. They calculated measurements as CAN messages on the CAN Ident configured for the Inputs.
Once you have configured the K-Box as desired, click Commit to send the configuration to the K-Box.
You will want to generate a new DBC file if you make any changes. This describes the configuration of the K-Box. You can load the file into DiaLog (or another tool that supports DBC files), allowing DiaLog to interpret the data broadcast by the K-Box correctly.
Clicking DBC Export generates the DBC file and prompts you for the location to save it.
How to using K-Cal (tutorial video).
To measure frequency, select ‘Frequency’ in the drop-down box:
Also, set the CAN ID where The K Box will transmit the result.
Set the Rate you wish to measure at:
The Rate parameter affects measurement precision.
The K Box measures frequency using a pulse counter for the selected rate and normalises it to 1 second to calculate the value in Hz = 1 s * N pulses / Rate.
The K-Box averages measured values if the frequency changes for a measurement interval (Rate).
The sensor sends at a frequency of 10kHz for 60ms, and the K-Box registers 600 pulses (60ms * 10kHz).
The sensor sends at a frequency of 8kHz. For 40ms and the K-Box registers 320 pulses (40ms * 8kHz).
For the whole measurement interval of 100ms, The K-Box registers a total of 920 pulses.
Normalised to Hz, the measured frequency is 9.2kHz (1 s * 920 pulses / 100ms).
If the Rate is set to 1000 ms, the measurement's accuracy will be 1Hz.
Notes:
The “Cycle duration” function should be used to measure low frequency with high precision.
To count digital events, select Event Counter in the drop-down box:
Also, set the CAN ID where The K Box will transmit the result.
Set the Rate you wish to measure at:
Select the edge on which you wish to start measuring the events.
Notes:
The Event counter will be reset if the K-Box is power cycled or loaded with a new configuration.
The Event counter will be incremented on any received registered event edge.
or according to whether the Modulation is on the rising or falling edge:
Digital 1-3 can be used to measure input signals, process them, and output the result as a CAN message with a Defined CAN ID (e.g. Pulse duration could be measured and output as a CAN message on CAN ID 0x310)
The K Box send CAN messages with a defined ID (in this example, 0x300 and rate 100 ms), containing information about the logical level of the Digital signals. This information is contained in the 1st byte of the message.
To measure Pulse duration, select Pulse duration in the drop-down box:
Also, set the CAN ID rate, where The K Box will transmit the result.
Set the Rate you wish to measure at:
Select the edge on which you wish to start measuring the pulse duration.
The KBox will not send CAN messages (although the rate is met) until the required measurement is finished.
The KBox will re-calculate the message and Rate to prevent CAN bus overloading.
Pulse frequency: 2000Hz (0.5ms). Rate: 50ms. CAN bus Speed: 125 kbps.
If there is no overloading of the CAN bus, a corresponding CAN Message will be sent every 50ms.
Pulse frequency: 2000Hz (0.5ms). Rate: 1ms. CAN bus Speed: 125 kbps.
If there is no overloading of the CAN bus, a corresponding CAN Message will be sent every 2ms.
To calculate the Duty cycle of a PWM signal, select Duty cycle/PWM in the drop-down box:
Also, set the CAN ID where The K Box will transmit the result.
Set the Rate you wish to measure at:
Select the edge you wish to start measuring the duty cycle on.
Notes:
The K-Box will change the CAN message Rate for this measurement to prevent CAN bus overloading.
oraccording to whether the modulation is on the rising or falling edge:
To calculate Revolutions per Minute, select RPM in the drop-down box:
Also, set the CAN ID where The K Box will transmit the result.
Set the Rate you wish to measure at:
Select the edge you wish to normalise measuring the revolutions on.
The Rate parameter affects the measurement precision.
The K-Box measures RPM using a pulse counter for the selected rate and normalises it to 1 minute to calculate the output value.
RPM = Ratenute * N pulses / Rate.
The K-Box averages the measured values if RPM changes over the measurement interval.
If a Sensor sends 2000rpm for 300ms (sensor generates 2000 pulses per minute)
The KBox registers 10 pulses (10 = 2000rpm * 0.3s/60s).
If it then sends 4800 rpm for 200ms (sensor generates 4800 pulses per minute).
The KBox registers a further 16 pulses (16 = 4800rpm * 0.2s/60s)
For the whole measurement interval (500ms), the KBox registers will register a total of 26 pulses.
The Normalised value calculated will be 3120 rpm (60s * 26 pulses/0.5s).
The increment size of 120rpm limits the accuracy of measurement.
If the parameter Rate were= 1000 ms, the measurement’s accuracy would be limited by the increment size of 60rpm.
Notes:
The “Cycle duration” function should be used to measure low RPM with high precision.
Frequency can then be calculated using the following formula:
In this case, this RPM is NOT average RPM; it is instantaneous RPM.
The KBox will wait until the cycle measurement is finished before sending a CAN message with the duration. If the cycle duration is long, the messages may be sent slower than what is selected as the Rate.
RateIf the Cycle duration is shorter than the time between messages set by the Rate, the duration will be re-calculated before being sent.
or according to whether the Modulation is on the rising or falling edge:
Unless you have special hardware, build your K-Box Digital 1, Digital 2 and Digital 3 MUST be configured as 3.3V if used in output Mode due to the Outputsign of the circuitry:
Unless you have a unique hardware build, your K-Box Digital 4 MUST be configured as Open Collector (if used in output Mode due to the design of the circuitry):
If any of the PINs are set to an “Output”, the output CAN ID becomes active, and you can select the CAN ID, which will receive messages that will be output on the appropriate pins of the K-BOX.
If the CAN ID were set to 0x400, when the Kbox receives a CAN message with Ident 0x400, the first byte is interpreted as an 8-bit command as follows:
b0: Dig1OutLevel
b1: Dig1OutSet
b2: Dig2OutLevel
b3: Dig2OutSet
b4: Dig3OutLevel
b5: Dig3OutSet
b6: Dig4OutLevel
b7: Dig4OutSet
OutLevel indicates whether the PIN should give output 1 or 0. “OutSet” sets the OutLevel on the PIN if it is = 1 (enable); if the OutLevel is 0 (disable), then the OutLevel value in the message is not set.
If the KBox receives a CAN message with DLC = 1 and CAN ID = 0x400.
Data byte = 0x30 (00110000 ) High Level on Digital 3, Digital 3 enabled. Outputbyte = 0x20 (00100000 ) don’t care about Digital 3; keep old level on Digital 3.
In this, the command controls all Digital Outputs at once and at any time.
The Output level can only be changed with a new CAN message with Ident 0x400, re-configuration with B-Box Cal, or turning the KBox power off.
If NONE of the PINs is set to Output, the Outputs CAN ID will become greyed out, and the K-Box will not enable the Output on the Digital pins when CAN messages are received.
To measure high frequency, select ‘High Frequency’ in the drop-down box:
Also, set the CAN ID where The K Box will transmit the result.
Set the Rate you wish to measure at:
The Rate parameter affects measurement precision.
The K Box measures high frequency using a pulse counter for the selected Rate and normalises it to 1 second to calculate the value in Hz = 1 s * N pulses / Rate.
The K-Box averages measured values if the high-frequency changes for a measurement interval (Rate).
The sensor sends at a frequency of 10kHz for 60ms, and the K-Box registers 600 pulses (60ms * 10kHz).
The sensor sends at a frequency of 8kHz. For 40ms, the K-Box registers 320 pulses (40ms * 8kHz).
For the whole measurement interval of 100ms, The K-Box registers a total of 920 pulses.
Normalised to Hz, the measured frequency is 9.2kHz (1 s * 920 pulses / 100ms).
If the Rate is set to 1000 ms, the measurement's accuracy will be 1Hz.