The Arduino Portenta Machine Control has the TJA1049T CAN transceiver which allows to use the Controller Area Network (CAN) protocol communication.
CAN is the acronym used for Controlled Area Network. This protocol was developed to be used on automotive and industrial applications to communicate with precise and critical demanding sensors.
The main advantages of the CAN bus protocol are:
Reduced wiring: The CAN communication only uses two wires, creating a bus communication where all the devices of the network are connected. This is a huge advantage for industrial applications, like the automotive one, where we can connect all the electronic components of a car to the same network using only two wires, saving cost, materials, and simplifying the programming and manufacturing process.
Fast speed communication: The CAN protocol is one of the most used communication protocols in the industry not only for its simplicity but also for its speed rates.
Strength and reliability: Thanks to the twisted pair cables and the differential signal between them, the CAN bus protocol protects the data against electrical noise in industrial environments keeping the critical information safe and without data losses.
Structure of a CAN network:
CAN has built-in error detection so the application can handle its own errors in case of data loss (like CRC).
In order to configure the Portenta Machine Control you will need to connect to the device through the Arduino PLC IDE:
The device needs to be activated with a license, check the steps on the PLC IDE Set-up tutorial
In order to use the CAN communication, you will need to:
Inside the Arduino PLC IDE navigate to the left side panel and click on the "Resources" tab.
To configure in depth the settings you need to add the Generic CANopen device from the item's catalog.
Once the Generic CANOpen device has been added you can customize the configuration to comply your needs.
This window allows to create objects and set the addresses, this is called a mapped variable table.
This table customize the PDO (Process Data Object) dictionary, so you will set the variables for the information that you want to have usually cause they are time-critical, any device can overwrite those addresses, so it acts like shared variables.
You can edit the table by adding, removing new variables, you can also assign and unassign existing variables on your programs (Global Variables) to this table.
Now that you have completed the setup of the Portenta Machine Control and its CAN bus communication with the Arduino PLC IDE, you can continue with: