Deploying to gh-pages from @ Klipper3d/klipper@d725dfd309 🚀
This commit is contained in:
@@ -1216,6 +1216,13 @@
|
||||
Modalità bridge da USB a CAN bus
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#tips-for-troubleshooting" class="md-nav__link">
|
||||
Tips for troubleshooting
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -1233,8 +1240,8 @@
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="CANBUS_Troubleshooting.md" class="md-nav__link">
|
||||
None
|
||||
<a href="CANBUS_Troubleshooting.html" class="md-nav__link">
|
||||
CANBUS Troubleshooting
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -1356,6 +1363,13 @@
|
||||
Modalità bridge da USB a CAN bus
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#tips-for-troubleshooting" class="md-nav__link">
|
||||
Tips for troubleshooting
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -1378,25 +1392,20 @@
|
||||
<h1 id="canbus">CANBUS<a class="headerlink" href="#canbus" title="Permanent link">¶</a></h1>
|
||||
<p>Questo documento descrive il supporto del CAN bus di Klipper.</p>
|
||||
<h2 id="hardware-del-dispositivo">Hardware del dispositivo<a class="headerlink" href="#hardware-del-dispositivo" title="Permanent link">¶</a></h2>
|
||||
<p>Klipper attualmente supporta CAN su chip stm32, same5x e rp2040. Inoltre, il chip del microcontrollore deve trovarsi su una scheda dotata di un ricetrasmettitore CAN.</p>
|
||||
<p>Klipper currently supports CAN on stm32, SAME5x, and rp2040 chips. In addition, the micro-controller chip must be on a board that has a CAN transceiver.</p>
|
||||
<p>Per compilare per CAN, eseguire <code>make menuconfig</code> e selezionare "CAN bus" come interfaccia di comunicazione. Infine, compila il codice del microcontrollore e flashalo sulla scheda di destinazione.</p>
|
||||
<h2 id="hardware-host">Hardware Host<a class="headerlink" href="#hardware-host" title="Permanent link">¶</a></h2>
|
||||
<p>Per utilizzare un bus CAN, è necessario disporre di un adattatore sul host. Attualmente ci sono due opzioni comuni:</p>
|
||||
<ol>
|
||||
<li>Usa un <a href="https://www.waveshare.com/rs485-can-hat.htm">Waveshare Raspberry Pi CAN</a> o uno dei suoi tanti cloni.</li>
|
||||
<li>Utilizzare un adattatore CAN USB (ad esempio <a href="https://hacker-gadgets.com/product/cantact-usb-can-adapter/">https://hacker-gadgets.com/product/cantact-usb-can-adapter/</a>). Sono disponibili molti adattatori diversi da USB a CAN: quando ne scegli uno, ti consigliamo di verificare che possa eseguire il <a href="https://github.com/candle-usb/candleLight_fw">candlelight firmware</a>. (Sfortunatamente, abbiamo riscontrato che alcuni adattatori USB eseguono firmware difettoso e sono bloccati, quindi verifica prima dell'acquisto.)</li>
|
||||
</ol>
|
||||
<p>In order to use a CAN bus, it is necessary to have a host adapter. It is recommended to use a "USB to CAN adapter". There are many different USB to CAN adapters available from different manufacturers. When choosing one, we recommend verifying that the firmware can be updated on it. (Unfortunately, we've found some USB adapters run defective firmware and are locked down, so verify before purchasing.) Look for adapters that can run Klipper directly (in its "USB to CAN bridge mode") or that run the <a href="https://github.com/candle-usb/candleLight_fw">candlelight firmware</a>.</p>
|
||||
<p>È inoltre necessario configurare il sistema operativo host per utilizzare l'adattatore. Questo viene in genere fatto creando un nuovo file chiamato <code>/etc/network/interfaces.d/can0</code> con il seguente contenuto:</p>
|
||||
<div class="highlight"><pre><span></span><code>auto can0
|
||||
<div class="highlight"><pre><span></span><code>allow-hotplug can0
|
||||
iface can0 can static
|
||||
bitrate 500000
|
||||
bitrate 1000000
|
||||
up ifconfig $IFACE txqueuelen 128
|
||||
</code></pre></div>
|
||||
|
||||
<p>Nota che il "Raspberry Pi CAN hat" richiede anche <a href="https://www.waveshare.com/wiki/RS485_CAN_HAT">modifiche a config.txt</a>.</p>
|
||||
<h2 id="resistori-di-terminazione">Resistori di terminazione<a class="headerlink" href="#resistori-di-terminazione" title="Permanent link">¶</a></h2>
|
||||
<p>Un bus CAN dovrebbe avere due resistori da 120 ohm tra i cavi CANH e CANL. Idealmente, un resistore situato a ciascuna estremità del bus.</p>
|
||||
<p>Si noti che alcuni dispositivi hanno un resistore integrato da 120 ohm (ad esempio, il "Waveshare Raspberry Pi CAN" ha un resistore saldato che non può essere rimosso facilmente). Alcuni dispositivi non includono affatto un resistore. Altri dispositivi hanno un meccanismo per selezionare il resistore (in genere collegando un "ponticello jumper"). Assicurati di controllare gli schemi di tutti i dispositivi sul bus CAN per verificare che ci siano due e solo due resistori da 120 Ohm sul bus.</p>
|
||||
<p>Note that some devices have a builtin 120 ohm resistor that can not be easily removed. Some devices do not include a resistor at all. Other devices have a mechanism to select the resistor (typically by connecting a "pin jumper"). Be sure to check the schematics of all devices on the CAN bus to verify that there are two and only two 120 Ohm resistors on the bus.</p>
|
||||
<p>Per verificare che i resistori siano corretti, è possibile rimuovere l'alimentazione alla stampante e utilizzare un multimetro per controllare la resistenza tra i cavi CNH e CANL: dovrebbe riportare ~60 ohm su un bus CAN cablato correttamente.</p>
|
||||
<h2 id="trovare-canbus_uuid-per-nuovi-microcontrollori">Trovare canbus_uuid per nuovi microcontrollori<a class="headerlink" href="#trovare-canbus_uuid-per-nuovi-microcontrollori" title="Permanent link">¶</a></h2>
|
||||
<p>A ogni microcontrollore sul bus CAN viene assegnato un ID univoco basato sull'identificatore del chip di fabbrica codificato in ciascun microcontrollore. Per trovare l'ID di ciascun dispositivo del microcontrollore, assicurati che l'hardware sia alimentato e cablato correttamente, quindi esegui:</p>
|
||||
@@ -1416,20 +1425,31 @@ canbus_uuid: 11aa22bb33cc
|
||||
</code></pre></div>
|
||||
|
||||
<h2 id="modalita-bridge-da-usb-a-can-bus">Modalità bridge da USB a CAN bus<a class="headerlink" href="#modalita-bridge-da-usb-a-can-bus" title="Permanent link">¶</a></h2>
|
||||
<p>Alcuni microcontrollori supportano la selezione della modalità "USB to CAN bus bridge" durante "make menuconfig". Questa modalità può consentire di utilizzare un microcontrollore sia come "adattatore bus da USB a CAN" che come nodo Klipper.</p>
|
||||
<p>Quando Klipper utilizza questa modalità, il microcontrollore appare come un "adattatore bus CAN USB" sotto Linux. Lo stesso "Klipper bridge mcu" apparirà come se fosse su questo bus CAN - può essere identificato tramite <code>canbus_query.py</code> e configurato come altri nodi Klipper del bus CAN. Apparirà insieme ad altri dispositivi che sono effettivamente sul bus CAN.</p>
|
||||
<p>Some micro-controllers support selecting "USB to CAN bus bridge" mode during Klipper's "make menuconfig". This mode may allow one to use a micro-controller as both a "USB to CAN bus adapter" and as a Klipper node.</p>
|
||||
<p>When Klipper uses this mode the micro-controller appears as a "USB CAN bus adapter" under Linux. The "Klipper bridge mcu" itself will appear as if it was on this CAN bus - it can be identified via <code>canbus_query.py</code> and it must be configured like other CAN bus Klipper nodes.</p>
|
||||
<p>Alcune note importanti quando si utilizza questa modalità:</p>
|
||||
<ul>
|
||||
<li>Il "bridge mcu" non è effettivamente sul bus CAN. I messaggi in entrata e in uscita non consumano larghezza di banda sul bus CAN. L'mcu non può essere visto da altri adattatori che potrebbero essere sul bus CAN.</li>
|
||||
<li>È necessario configurare l'interfaccia <code>can0</code> (o simile) in Linux per comunicare con il bus. Tuttavia, Klipper ignora la velocità del bus CAN di Linux e le opzioni di temporizzazione del bus CAN. Attualmente, la frequenza del bus CAN viene specificata durante "make menuconfig" e la velocità del bus specificata in Linux viene ignorata.</li>
|
||||
<li>Ogni volta che il "bridge mcu" viene ripristinato, Linux disabiliterà l'interfaccia <code>can0</code> corrispondente. Per garantire una corretta gestione dei comandi FIRMWARE_RESTART e RESTART, si consiglia di sostituire <code>auto</code> con <code>allow-hotplug</code> nel file <code>/etc/network/interfaces.d/can0</code>. Per esempio:</li>
|
||||
<li>Whenever the "bridge mcu" is reset, Linux will disable the corresponding <code>can0</code> interface. To ensure proper handling of FIRMWARE_RESTART and RESTART commands, it is recommended to use <code>allow-hotplug</code> in the <code>/etc/network/interfaces.d/can0</code> file. For example:</li>
|
||||
</ul>
|
||||
<div class="highlight"><pre><span></span><code>allow-hotplug can0
|
||||
iface can0 can static
|
||||
bitrate 500000
|
||||
bitrate 1000000
|
||||
up ifconfig $IFACE txqueuelen 128
|
||||
</code></pre></div>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p>The "bridge mcu" is not actually on the CAN bus. Messages to and from the bridge mcu will not be seen by other adapters that may be on the CAN bus.</p>
|
||||
<ul>
|
||||
<li>The available bandwidth to both the "bridge mcu" itself and all devices on the CAN bus is effectively limited by the CAN bus frequency. As a result, it is recommended to use a CAN bus frequency of 1000000 when using "USB to CAN bus bridge mode".Even at a CAN bus frequency of 1000000, there may not be sufficient bandwidth to run a <code>SHAPER_CALIBRATE</code> test if both the XY steppers and the accelerometer all communicate via a single "USB to CAN bus" interface.</li>
|
||||
<li>A USB to CAN bridge board will not appear as a USB serial device, it will not show up when running <code>ls /dev/serial/by-id</code>, and it can not be configured in Klipper's printer.cfg file with a <code>serial:</code> parameter. The bridge board appears as a "USB CAN adapter" and it is configured in the printer.cfg as a <a href="#configuring-klipper">CAN node</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="tips-for-troubleshooting">Tips for troubleshooting<a class="headerlink" href="#tips-for-troubleshooting" title="Permanent link">¶</a></h2>
|
||||
<p>See the <a href="CANBUS_Troubleshooting.html">CAN bus troubleshooting</a> document.</p>
|
||||
|
||||
|
||||
</article>
|
||||
</div>
|
||||
@@ -1463,13 +1483,13 @@ iface can0 can static
|
||||
|
||||
|
||||
|
||||
<a href="TSL1401CL_Filament_Width_Sensor.html" class="md-footer__link md-footer__link--next" aria-label="Prossimo: Sensore TSL1401CL di larghezza del filamento" rel="next">
|
||||
<a href="CANBUS_Troubleshooting.html" class="md-footer__link md-footer__link--next" aria-label="Prossimo: CANBUS Troubleshooting" rel="next">
|
||||
<div class="md-footer__title">
|
||||
<div class="md-ellipsis">
|
||||
<span class="md-footer__direction">
|
||||
Prossimo
|
||||
</span>
|
||||
Sensore TSL1401CL di larghezza del filamento
|
||||
CANBUS Troubleshooting
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-footer__button md-icon">
|
||||
|
||||
Reference in New Issue
Block a user