Home > other >  Introduce how to use Python for Ginkgo USB - CAN send and receive data
Introduce how to use Python for Ginkgo USB - CAN send and receive data

Time:10-22

Python version: hardware version 3.5.3
Two sets of Ginkgo USB - CAN interface: VTG203B
Hardware connection:
ITEM1 ITEM2
CAN1 H & lt; - & gt; H.
CAN1 L & lt; - & gt; L.
CAN1 120 OHM resistor through a wire short circuit
CAN2 H & lt; - & gt; H.
CAN2 L & lt; - & gt; L.
CAN2 120 OHM resistor through a wire short circuit

Software:
For the first item:
Ginkgo USB - CAN Extend software
For 2 items (open source python project) :
Python CAN send and receive data
PC: 2 PCS (PC1, PC2)
Application:
1. Make sure all right in two PC installed Ginkgo driver (by checking the device manager, software or through "bootloader" read software version).
2. Run on PC1 Extend software
Click on the button (top left) "start" to open the Settings dialog (below) :
Set the baud rate to 500 k, first select "channel Inex" for "CAN1" or "CAN2", to provide the baud rate to choose
(this is a software error, in need of repair)

After select "500 k", choose "ALL" as the channel index


Click "ok", the main operating dialog box, enter the following data sending and receiving


3. Run the python code PC2:

4. If money is only a CAN interface, then please modify python code:
CAN_MODE_LOOP_BACK=1,
And then it can be used for self test,

In python code, have more description and document links,
  • Related