Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

trouble transmitting commands to CAN device with USB-8473

I'm using a USB-8473 to control a actuator with CAN capabilities. I am new to programming CAN applications so this may be a bit basic.

I am using the Transmit Receive same Port VI given in the labview examples to communicate with the device and I am able to receive data fine, but when I try to transmit I am getting no response from the actuator. I'm thinking it may be something as simple as not inputting the data correctly in the Data to Write field.

 

I'm using a baudrate of 500000 as specified by the manufacturer, using a arbitration ID of 0x235, motorola byte order, J2284 structure. The manufacturer said that I need to transmit messages every 30ms at the 500kbaud rate so I changed the looping speed in the block diagram to 30ms.

the two commands on that ID are to turn on the actuator and move it to its desired position.

Desired Position is 16bits, starting at Pos 0, min value of 0x0 and max of 0x3E8

command ON is 1 bit starting position 16, min value of 0x0 max of 0x1

I've tried putting values into the data values but get no response from the actuator. I would assume that I just put a value of 1 into the third byte of data to command ON to the device and then some value into the 1st and 2nd byte to command a position, but I get no response. I've also tried just putting a value of 1 in all the fields and get no response. Is there something that I'm missing here.
 
When I probe the error line I get a code when trying to write to the device:
Warning 1073094763 occurred at NI-CAN ReadMult
Network Interface Object
(ncReadNetMult.vi)
Possible reason(s):
NI-CAN:  (Hex 0x3FF6206B) CAN bus problems detected (no ack), but communication is proceeding. This warning corresponds to CAN Error Passive state. Solutions: Verify that cabling is correct, devices are connected and operational, and proper bus power is applied.
 
and
 
Warning 1073094763 occurred at NI-CAN Write
CAN Network Interface Object (ncWriteNet.vi)
Possible reason(s):
NI-CAN:  (Hex 0x3FF6206B) CAN bus problems detected (no ack), but communication is proceeding. This warning corresponds to CAN Error Passive state. Solutions: Verify that cabling is correct, devices are connected and operational, and proper bus power is applied.
 
The cabling from what I can see looks to be fine, and isn't the bus power applied by the 5V connection from the USB connection? I do a self test on the device and it passes so it is operational.
 
Appreciate any help.
0 Kudos
Message 1 of 15
(10,119 Views)

Is your cabling correct? A 120Ohm resistor at each end?

Also, is your actuator sending some alive message or sth. so that you can test communication with the bus monitor?

0 Kudos
Message 2 of 15
(10,113 Views)

The error messages indicate that your motion device is not active on the bus.The USB device only powers his transceiver and not the BUS. You need to power your motion device as well, or the bus if the device needs buspower externally.

DirkW

0 Kudos
Message 3 of 15
(10,106 Views)
Thanks for getting back to me guys, in response to your queries:
 
Is your cabling correct? A 120Ohm resistor at each end?
I have one 121Ohm resistor between the CAN_H and CAN_L lines. Do I need two of these termination resistors?
 
Also, is your actuator sending some alive message or sth. so that you can test communication with the bus monitor?
When I am in MAX I can check the bus monitor and I am receiving messages from the correct Arbitration ID.
 
The error messages indicate that your motion device is not active on the bus.The USB device only powers his transceiver and not the BUS. You need to power your motion device as well, or the bus if the device needs buspower externally
I supply the motion deivce with a 12VDC power supply. I also have the V- (reference for the CAN_H and CAN_L) connected to the 12VDC return. I do see see bus activity via the bus monitor in MAX.
0 Kudos
Message 4 of 15
(10,102 Views)
I put on a second termination resistor but still have the same issue.
0 Kudos
Message 5 of 15
(10,099 Views)

Just as a reference I've attached a diagram showing how I am connecting to the device.

 

0 Kudos
Message 6 of 15
(10,098 Views)

That sounds weird. You can see communication with the Bus Monitor, but at the same time have the NO Ack warning, what means that there is no note at the bus acknowledging the frame. On your drawing i missed the V+ connection between Bus and power supply. Is that something you just forgot to mention?

With your current configuration I can only think about a wrong Baudrate for your Application compared to the Bus Monitor that works fine with the same cable.

DirkW

0 Kudos
Message 7 of 15
(10,080 Views)

On the bus monitor it tells me I'm communicating at 500kbaud which is the same I have set up in the VI. In the VI I can receive data as well, but get those error messages when I try to write the data.

As for the the V+ connection between Bus and power supply; I thought I didn't require one from what I was reading in the hardware description for the USB-8473:

V+ supplies bus power to the CAN physical layer if external power is required. All High-Speed Series 2 PCI, PXI, and USB hardware is powered internally, so it is not necessary to supply V+, unless you have configured the VBAT jumper for EXT.

0 Kudos
Message 8 of 15
(10,077 Views)

That is true for our board, but could not be true for your drive. Normaly the CAN transceiver is isolated from the rest of the board and needs power from internaly or externaly.

If the drive s transceiver is not supplied internaly it would need power from external.

But since it is sending something, the transceiver must have power. But it ios still weird that he is not acking the frame send by your application.

DirkW

0 Kudos
Message 9 of 15
(10,068 Views)
I'll try applying the bus power to the USB via the V+ terminal.
The V+ is normally 12V? Do I need to configure the VBAT jumper for EXT? is this something that is even an available option on the USB devices?
 
0 Kudos
Message 10 of 15
(10,062 Views)