How to manage CAN communication with PUZZLE
CONFIGURING AND USING A MASTER PUZZLE IN CAN
In this example, we want to use a puzzle master that communicates with a Linux P10 system device. Three cartridges with three different input types were used on the master for demonstration purposes. In the start.c file, you can see how the following have been declared:
The dedicated library "puzzle6.h" is initially included in the common.h file.
In the example, in addition to modifying the digital outputs and reading both the digital and analog inputs, evaluations are made on the average value of the analog data. You will see the following values on the display:
Ing_Anal = read analog input
Ing_Anal_max = maximum value read at the input (next to it there is a number which represents the samples above the average value of 10 tik)
Ing_Anal_min = minimum value read at input (next to it there is a number which represents the samples below the average value of 10 tik)
Ing_Anal_mediato = averaged analog input reading
Ing_Anal_mediato_max = maximum averaged value
Ing_Anal_mediato_min = minimum averaged value The reset button resets these values
The example has been tested on a Syel P10 device and a master puzzle via CAN bus and can be downloaded freely from the following link: download
February 2025, 4th author: Simone De Santis. For further inquiries, please contact simone.desantis@syel.it


