A method for controlling the machining of panels with a substantially parallelepiped-like shape in a machine for machining panels, in particular a sanding machine for sanding/finishing panels, comprising a processing system, which is designed to control the operation of the machine; the machine being provided with: - a control unit, which is suited to control the machining process of the panels and the operation of the different components of the machine; - a thickness detection device for detecting the thickness of the panels, which is obtained by means of a digital caliper with a slider; - a support for the thickness detection device; and - a wireless data communication system; the method includes: a) a step in which to measure the thickness of the panel undergoing the machining by means of the slider digital caliper; b) a step in which to transmit, in digital format, the measurement obtained by the slider digital caliper to the control unit; and c) a step in which the control unit controls the machining process of the panels and the operation of the different components of the machine depending on the thickness of the panel undergoing the machining; the method is characterised in that it comprises: d) a preliminary step, in which a presence sensor, preferably an inductive one, is housed on the support and connected to the control unit, with which it communicates in order to provide information on the presence or absence of the thickness detection device; when the digital caliper is removed from the support a measuring procedure is enabled and the control unit is configured to receive a measurement of the thickness of a panel undergoing the machining within a time interval of a predetermined length; and e) a step in which to detect, by means of the presence sensor, when the detection device is removed from the support; and in that the step in which to transmit, in digital format, the measurement obtained by the slider digital caliper to the control unit is implemented using two Bluetooth communication modules (29, 30), which are housed respectively in the thickness detection device and in the control unit. - a control unit, which is suited to control the machining process of the panels and the operation of the different components of the machine; - a thickness detection device for detecting the thickness of the panels, which is obtained by means of a digital caliper with a slider; - a support for the thickness detection device; and - a wireless data communication system; the method includes: a) a step in which to measure the thickness of the panel undergoing the machining by means of the slider digital caliper; b) a step in which to transmit, in digital format, the measurement obtained by the slider digital caliper to the control unit; and c) a step in which the control unit controls the machining process of the panels and the operation of the different components of the machine depending on the thickness of the panel undergoing the machining; a) a step in which to measure the thickness of the panel undergoing the machining by means of the slider digital caliper; b) a step in which to transmit, in digital format, the measurement obtained by the slider digital caliper to the control unit; and c) a step in which the control unit controls the machining process of the panels and the operation of the different components of the machine depending on the thickness of the panel undergoing the machining; the method is characterised in that it comprises: d) a preliminary step, in which a presence sensor, preferably an inductive one, is housed on the support and connected to the control unit, with which it communicates in order to provide information on the presence or absence of the thickness detection device; when the digital caliper is removed from the support a measuring procedure is enabled and the control unit is configured to receive a measurement of the thickness of a panel undergoing the machining within a time interval of a predetermined length; and e) a step in which to detect, by means of the presence sensor, when the detection device is removed from the support; and in that the step in which to transmit, in digital format, the measurement obtained by the slider digital caliper to the control unit is implemented using two Bluetooth communication modules (29, 30), which are housed respectively in the thickness detection device and in the control unit. d) a preliminary step, in which a presence sensor, preferably an inductive one, is housed on the support and connected to the control unit, with which it communicates in order to provide information on the presence or absence of the thickness detection device; when the digital caliper is removed from the support a measuring procedure is enabled and the control unit is configured to receive a measurement of the thickness of a panel undergoing the machining within a time interval of a predetermined length; and e) a step in which to detect, by means of the presence sensor, when the detection device is removed from the support; and in that the step in which to transmit, in digital format, the measurement obtained by the slider digital caliper to the control unit is implemented using two Bluetooth communication modules (29, 30), which are housed respectively in the thickness detection device and in the control unit.