Skip to content
English
  • There are no suggestions because the search field is empty.

How do I configure the smartCore to send a CAN bus message?

The article explains how to configure the smartCore to send a message cyclically via a CAN bus interface on a smartRAIL or smartMini system.

To send a CAN message cyclically on a smartRAIL or smartMini device, for example as a stimulus message (CANOpen), the following two modules are required in the smartCore configuration:
  • canbus
  • fmconsumer
In the following configuration, a CAN bus message is sent cyclically every 100 ms via the system's first CAN interface. The ID of the CAN message is 999 and the payload with a length of two has the content “0100”.

{
            “config”: {
                “fmd”: “Canbus0”,
                “messages”: [
                    {
                        “defaultMessage”: “0100”,
                        “messageKey”: 999,
                        “sendIntervalMs”: 100,
                        “sendMode”: “OnTimer”
                    }
                ]
            },
            “factory”: “fmconsumer”,
            “module”: “Fmconsumer”
}

The configuration for the “canbus” module:

{
            “config”: {
                “bitrate”: 250000,
                “fmd”: “Canbus0”,
                “interface”: 0,
                “listenOnly”: false
            },
            “factory”: “canbus”,
            “module”: “Canbus0”
}

The view in the optiControl software is as follows: