# CMM 2CH / 3CH

URL: https://irs.systems/en/docs/cmm-2ch-3ch

The CMM-xCH modules (CMM-2CH and CMM-3CH) are equipped with an Ethernet-CAN-Gateway and independent microcontrollers for each measurement channel. Both variants share the GUI, the firmware and the CAN protocol; they differ in current range, current paths and backplane pinning (see [Datasheet CMM-2CH](/en/docs/cmm-2ch-3ch/datasheet-cmm-2ch) and [Datasheet CMM-3CH](/en/docs/cmm-2ch-3ch/datasheet-cmm-3ch)).



## Getting started

<figure>
  <img src="/docs/assets/cmm-2ch-3ch/images/cmmx-board-overview.jpg" alt="CMM-2CH board with marked CAN 120R termination, IP and Board-ID config, CAN default jumper, 24V supply, CAN front D-Sub9, Ethernet-CAN gateway, CAN backplane, channels 0 and 1 with range LEDs">
  <figcaption>CMM-2CH board overview</figcaption>
</figure>

### Download IRS-CMM-xCH-GUI

You can download the latest GUI on the download page.

### IP address

At delivery the IP address of the module is set to `192.168.222.1`. You can configure the IP address in a limited range with the DIP switch on the PCB. The switches are treated as a binary number and marked with their place value (1, 2, 4). Depending on the set binary number an IP address between `192.168.222.1` and `192.168.222.7` is used. If all three switches are "off" the default IP address is used.

You can change the default IP address of the module with *Tools -> DiscoveryTool* in the IRS-CMM-xCH GUI. See [GUI Manual](/en/docs/cmm-2ch-3ch/gui-manual#changing-the-ip-address) for details.

### Setup CAN-Bus

The Ethernet-CAN-Gateway and the two Channels are connected via CAN-FD. At delivery the CAN-FD is configured to 1000 kBit/s without bit rate switching. If necessary, the baudrate settings can be changed in the IRS-CMM-xCH-GUI. The settings can be reset to their default values with the "CAN default jumper". See [GUI Manual](/en/docs/cmm-2ch-3ch/gui-manual#configuring-internal-can-bus) for more details. A single termination resistor is installed on the board and is activated with the "CAN 120R jumper". This single termination resistor is sufficient for one single CMM-2CH without bit rate switching. If you want to connect multiple CMM-2CH or use bit rate switching a proper external termination of the CAN bus with two resistors at both ends of the CAN harness is highly recommended. Without proper termination a reliable communication between the Gateway and the Channels may not be possible.

### Configure board and channel

Multiple CMM-xCH boards can be connected via CAN bus. To address the individual boards, each board needs to be configured with a unique Board ID. The configuration of the Board ID is done with the DIP switch on the board marked with "CAN ID". The switches are treated as a binary number and marked with their place value (1, 2, 4, ...). The switches are read at power up. So after changing the Board ID a power cycle is required.

### How to read measured current values

#### Use the CMM-xCH-GUI

In the GUI switch to the tab "Measurement" and either use the Button "MIN/AVG/MAX" or enable cyclic messages. For details see [GUI Manual](/en/docs/cmm-2ch-3ch/gui-manual#reading-measured-values).

#### Use the MesSy CMM API

If the CMM-2CH is connected to a MesSy-II or MesSy-II-FD you can use the integrated MesSy CMM API to read min, max and average values. For details see MesSy documentation.

#### Directly send and receive CAN messages

You can either query min, max and average values with a CAN message or enable cyclic messages. You can use the IsoTP protocol which is known from CMM III and CMM IV or a new protocol which is based on CAN-FD. For the details of the new protocol see [Documentation of CAN messages](/en/docs/cmm-2ch-3ch/can-messages); we can send you a DBC or SYM file on request.
