NI Home > Community > NI Discussion Forums

Automotive and Embedded Networks

Reply
Member
gpalmeri
Posts: 2
0 Kudos

CAN: Standard and Extended Frames/Wake up nodes

Hello, my name is Gerardo Palmeri . I need ask you questions about CAN BUS and USB-8473.

 

I´m programming an application in wich I´ll abble to meassure Voltages, currents and CAN BUS codes from a NODE into Steering Wheel of Truck.

The NODE is "sleeping" and i need wake up it. At the moment I can´t do it.

 

The system use Extended frames (29 bits) and I made the next Net Topology to find out the problem:

 

Node A (CAN 1): USB-8473 write msg in the net.

Node B (CAN 0): USB-8473 listen the bus activity.

Node C (ID: C012171): Node into the steering wheel. (Target) Note that C012171 is an extended address (frame)

 

I use 2 tools to manage the bus activity:

transmit: I use CAN_Transmit.vi (from examples library) to send messages

Receive: NI CAN BusMonitor from "Measurement and automation explorer" to read messages from de bus.

 

When I write a message to ID: C012171, NI CAN BusMonitor listen it and show me correctly the data but the ID =171 (with out C012, the system ignore the most significant part of the ID). NI CAN BUS Monitor indicates are receiving Standard Frames.

 

1. Do Someone know why the ID is truncated?

2. Could have a mistake in the Extended Comparator and Extended mask selected? I defined 0 for both.

 

Thanks for your atention!!!! I´ll expect for your answer.

 

Active Participant
GPIB_Guru
Posts: 536
0 Kudos

Re: CAN: Standard and Extended Frames/Wake up nodes

I don't have the manual in front of me, but you need to set another bit (0x20000000 or 0x40000000) to indicate that the ID is extended when transmitting. You should be able to find the value in the manual. 

Trusted Enthusiast
Trusted Enthusiast
JB
Posts: 2,731
0 Kudos

Re: CAN: Standard and Extended Frames/Wake up nodes

It is the 30th bit --> logical OR with 0x20000000. See here for more details.

Member
gpalmeri
Posts: 2
0 Kudos

Re: CAN: Standard and Extended Frames/Wake up nodes

Hi!! Yes, you´re rigth!!...i just wired the CAN ID to a pin of an OR instruction and in the other pin I conected x20000000. This means that the 29th bit is one and the write can instruction is able to write data to devices with extended Frames.

 

Thanks for your help and keep in touch!!!

Trusted Enthusiast
Trusted Enthusiast
JB
Posts: 2,731
0 Kudos

Re: CAN: Standard and Extended Frames/Wake up nodes

Counting the bit 0 as the first, it is not the 29th but the 30th bit which is one.