Home > other >  Loto practice dry (3) measurement of CAN bus communication data
Loto practice dry (3) measurement of CAN bus communication data

Time:09-19

Doing the movement control CARDS project recently, in the process of debugging prototype, the correctness of the need to verify a CAN bus communication function, previously confined to theoretical understanding CAN bus, using the CANbus communication card is a PC routines, basically simply configured PC software CAN work normally, this process needs further testing CAN communication interface, just before the understanding of the CAN revise again to deepen,





Using CAN bus, because it only needs two twisted-pair cable CAN connect to multiple communication nodes, and it CAN transfer the relative distance, in the industrial field is also very strong anti-jamming capability, below is my according to the requirements of CAN bus do a twisted-pair, yellow and green are respectively CAN_High line and line of the CAN_Low, requirements of lay 20 mm, not twisted distance of not more than 50 mm,





Regulation of twisted-pair transmission distance relationship with CAN bus transmission rate in the following table, our transmission distance is very short, so CAN use very high transmission rate, even the highest transmission rate, to 25 m OSC802 oscilloscope bandwidth, and debugging with enough,




Below is my design control panel of the driver CAN communication interface part of the schematic diagram, using SN65HVD230 transceiver:




Proofing after motion control board is like this:





Use the USB oscilloscope OSC802 LOTO of CAN communication signal capture, fetching data parsing,




Using USB oscilloscope OSC802 single trigger function, easy to CAN bus on the level signal of capture, but now we still don't understand it, need to understand what CAN the level of logic and transfer protocol,

Not send and receive signals, the two wires at the same level (about 2.5 V), the level of contact state, also called the recessive level, is the logic 1, and have a signal, CAN_H conductor increased level of at least 1 V. And the corresponding CAN_L lead level down the same value, the level of visualization, also known as dominant level, is the logic 0, 5 V and 3.3 V CAN transceiver logic level will be slightly different,




We issued by the program, after a string of CAN data with OSC802 capture the waveform is as follows:








According to the waveform data decoding need to be aware of two things:
1: in the CAN protocol will CAN_H and CAN_L difference for high power is defined as the dominant at ordinary times, logically said to 0, for low power is defined as a recessive at ordinary times, logically said 1,
2: in the protocol of the CAN when appeared five consecutive dominant will need to insert a recessive,
CAN the standard frame and extended frame agreement format:





So, waveform data read:




Figure in Red Cross out for the CAN protocol interested in five consecutive dominant single recessive, after it so take out, so, via USB oscilloscope OSC802 fetching the data as follows:




The data from the data frame is:
1010101111001101
0 xab, 0 XCD
Analytical results and the upper receive results verify correct each other, so the motion control board CAN debug interface function completed successfully,




  • Related