K-BOXK-CALManual

K-BOX: configuring analogue, thermocouple and digital channels

Updated

Set up K-BOX in K-CAL so each analogue, thermocouple and digital channel goes out on the CAN ID and at the rate you need. Then control the digital outputs over CAN.

Before you start

The K-CAL toolbar and tabs

K-CAL arranges the module settings in tabs: General, Measurement, Analog Channels, Digital Channels, Calibration, Reprogramming and Manufacturer. The toolbar above them works on the module that is connected.

K-CAL toolbar buttons
Button What it does
Load Reads the settings stored in K-BOX and shows them on screen.
Commit Writes the settings on screen to the flash memory of K-BOX.
Node Selects another module. Active only when several K-Series modules share the CAN bus.
Default Sets the default values.
Export Exports the signals to a DBC file.
Import Imports signals from a DBC file.
Scope Del Removes the selected channels from the oscilloscope.
Tables Manages conversion tables.
Formula Assigns a formula to a channel.
Interface Initialises the selected CAN interface.
Notes Shows the release notes.
Help Opens the software documentation.

For the Measurement tab and the oscilloscope, see K-CAL: viewing live data on the oscilloscope.

Set the CAN bus and tool options

Open the General tab. Its settings apply to the whole module.

The K-CAL General tab with Baud Rate 500 kbit/s, Byte Order Intel, Sleep Mode No Sleep, the tool options and the CAN interface list
The General tab. This build's title bar still reads K-Box Cal.
Baud Rate
The bit rate at which K-BOX communicates on the CAN bus. Match it to the bus you connect to.
Byte Order
The byte order K-BOX uses in its CAN messages, for example Intel.
Sleep Mode
After Time sends K-BOX to sleep when there is no CAN activity. No Sleep keeps it on while it has power.
Time
How long K-BOX waits without CAN activity before it sleeps.
Load at startup
Loads the channel settings from the module when K-CAL starts.
Load at export
Reloads the channel settings from the module when you export a DBC file.
Auto assign ID
Assigns CAN IDs automatically. Use it when several K-Series modules share the bus.
ADC Units
The unit K-CAL shows for analogue and digital channels, for example mVolts.
TC Units
The unit K-CAL shows for thermocouples, for example deg C.
Interface
The CAN interface K-CAL uses. It can be a Kvaser interface, a REXGEN through J2534 or a REBEL CT or LT.

For how the bit rate is chosen on a bus, see CAN bus baud rate and its calculation.

Watch: How to assign the baud rate using K-CAL (0:42)

Set up the analogue and thermocouple channels

K-BOX sends its analogue inputs in two CAN messages, ADC 0 to 3 and ADC 4 to 7, and its thermocouples in two more, TC 0 to 3 and TC 4 to 7. Each message has its own CAN ID and rate.

The K-CAL Analog Channels tab with CAN IDs 0x181 and 0x182 for the ADC groups, the hardware and software ranges, and CAN IDs 0x281 and 0x282 for the thermocouple groups
The Analog Channels tab with the default CAN IDs.
  1. Open the Analog Channels tab. Select Load. K-CAL reads the current settings from K-BOX.
  2. Leave Additional Board at Not Connected. The setting is for add-on boards that are not currently sold.
  3. Set the ADC CAN IDs and rates. Choose a CAN ID and Rate for ADC(0-3) and for ADC(4-7).
  4. Choose the voltage range for each channel. Select it under Software Ranges. The smallest range that covers your signal gives the best resolution.
  5. Set the thermocouple CAN IDs and rates. Choose a CAN ID and Rate for TC(0-3) and for TC(4-7).
  6. Choose the thermocouple type. Set Type to K, J or T.
  7. Select Commit. K-CAL writes the settings to K-BOX.

Ranges and sampling limits

K-BOX offers software switchable ranges of ±80 V, ±40 V, ±20 V and ±10 V. In K-CAL, Hardware Range decides which three of them the channel lists show. Range 1 gives ±10, ±20 and ±40 V. Range 2 gives ±20, ±40 and ±80 V.

  • Analogue channels sample at up to 1 kHz on all eight, 2 kHz on four or 10 kHz on two.
  • Thermocouples sample at up to 10 Hz on all eight.
  • Never apply a voltage outside the range set for the channel.

Set up the digital channels

Open the Digital Channels tab and select Load. Each of the four digital pins has its own panel.

The K-CAL Digital Channels tab with the Digital Inputs Status and Digital Outputs Control panels and the settings for Digital 1 to 4
The Digital Channels tab. The output CAN ID stays grey until a pin is set as an output.
Digital Inputs Status
The CAN ID and rate of a message whose first byte carries the logic level of the digital inputs.
Function
For Digital 1 to Digital 3, choose Not Use, Output or one of the measurement modes (pulse duration, frequency, high frequency, duty cycle/PWM, event counter, cycle duration or RPM).
Edge
The edge, Rising or Falling, on which a measurement starts.
CAN ID and Rate
Where and how often K-BOX sends the result of a measurement.
Out Mode
For a pin set as an output, 3.3 V or Open collector.
Digital 4 / +4.5V inst
The fourth pin has no measurement modes. It works as a digital output or as the +4.5 V instrumentation supply on pin 1 of the CAN connectors.

For the measurement modes, see K-BOX: digital measurement modes.

Watch: How to set the CAN ID and transmission rate for analogue, thermocouple and digital channels (1:20)

Drive the digital outputs over CAN

Set the Function of a pin to Output and choose its Out Mode:

  • 3.3 V: the pin outputs 3.3 V or 0 V.
  • Open collector: an internal NPN transistor switches the pin to ground. The open collector outputs are rated 45 V and 10 mA.
Switching a relay coil from an open collector output DIGITAL OUTPUT · WIRING Switching a relay coil from an open collector output Logger or I/O module open collector output Logic Output GND Output limits: Vmax, Imax Relay coil ≤ Imax Flyback diode + − Load supply +V, up to Vmax Common ground: supply negative to the GND pin Vmax and Imax are the output ratings in the product specification. The diode across the coil carries the switch-off spike so it never reaches the output.

Once a pin is an output, the Digital Outputs Control CAN ID becomes active. K-BOX listens on that ID. When it receives a message there, it reads the first data byte as a command for all four outputs at once. If no pin is set as an output, the ID stays grey and K-BOX ignores those messages.

Output command byte, first data byte of the Digital Outputs Control message
Bit Name Meaning
0 Dig1OutLevel Output level for Digital 1, 1 or 0
1 Dig1OutSet 1 applies bit 0 to Digital 1. 0 leaves Digital 1 as it is.
2 Dig2OutLevel Output level for Digital 2, 1 or 0
3 Dig2OutSet 1 applies bit 2 to Digital 2. 0 leaves Digital 2 as it is.
4 Dig3OutLevel Output level for Digital 3, 1 or 0
5 Dig3OutSet 1 applies bit 4 to Digital 3. 0 leaves Digital 3 as it is.
6 Dig4OutLevel Output level for Digital 4, 1 or 0
7 Dig4OutSet 1 applies bit 6 to Digital 4. 0 leaves Digital 4 as it is.
Worked examples, Digital Outputs Control CAN ID 0x400, DLC 1
Data byte Bits 7 to 0 Result
0x30 0011 0000 Bits 4 and 5 are set, so Digital 3 goes to level 1. Digital 1, 2 and 4 keep their levels.
0x20 0010 0000 Bit 5 is set and bit 4 is clear, so Digital 3 goes to level 0
0x00 0000 0000 No Set bit is on, so every output keeps its level.

An output keeps its level until K-BOX receives a new message on the output ID, you reconfigure it in K-CAL or the power goes off. The DBC file defines the message format. To check it, open the file in the DIALOG DBC editor.

Save the configuration and export a DBC

  1. Select Commit. K-CAL writes the configuration to K-BOX, which keeps it when the power is off.
  2. Select Export. K-CAL generates a DBC file and asks where to save it. Export a new DBC file after every change.
  3. Load the DBC into your logger software. DIALOG, or any tool that reads DBC files, then decodes the K-BOX messages.

For the DIALOG side, see K-Series: logging module data with REBEL and DIALOG. For what a DBC file contains, see Understanding CAN DBC.

Next: K-BOX: digital measurement modes.

Products in this guide

K-BOX

Multi-sensor data acquisition

View K-BOX Ask an engineer

K-CAL

Sensor setup & calibration

View K-CAL Ask an engineer

Still stuck?

Our engineers answer support questions on every Influx Technology product.