Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-8502 CAN fail to read

We are using USB-8502 for CAN communication with our motor. we have write some code to write and read the can data.

the code runs fine at first, but the USB-8502(Port2) fail to read after 10 minute.

we try to read the data from X-Net Monitor instead of using the code, but USB-8502 fail to read data with X-Net as well.

Below is the application for our code:

Port1: reading and write alternately .(No failure found)

Port2: reading and write alternately with a background thread.(fail to read after some time.)

Attached is some test we do to analysis the failure(Monitor the CAN data with another Peak-System CAN):

Picture1: Write with X-Net using Port2, the data send out normal. and we get reply (0x581h).

Picture2: Write with Peak-System CAN, check the if there is data received from USB-8502.(there is reply from the monitor but the X-NET fail to read)

This situation continue until we plug off/on the USB connector.

We know that this should have something related to our code, but we are wondering: 

What kind of error would cause USB-8502 fail to read till a reset?

 

 

 

 

Download All
0 Kudos
Message 1 of 6
(3,970 Views)
Closed.
0 Kudos
Message 2 of 6
(3,912 Views)

Hi,

Does the LED on your USB-8502 turn red?

If yes, this means your device has entered the "Bus OFF State" and will stop trying to read frames from the CAN network.

0 Kudos
Message 3 of 6
(3,887 Views)

I have a similar issue. My 8502 stops functioning when I plug a thumb drive in any other USB port. The thumb drive is fully functional (used in many other computers), has no virus (all computers scan the thumb drive), and in all failure situations the 8502 must be plugged off/on before functionality is restored.

 

NI-MAX sees the device as "inactive". Reset and Self-Tests both fail.

Following the plug off/on, NI-MAX sees the device as active and Reset and Self-Test work normally.

 

The 8502 need not be sending or receiving for this failure mode to occur.

0 Kudos
Message 4 of 6
(3,828 Views)

The Led has not turn red, the led is green and on for all the time until USB-8502 plug off/on.

Actually, I have got the code from our software engineer, and he was using a streamframeoutput mode and got the payload wrong. So, every time the code try to send out one message, there is a few uninitialized data following. I think the device may has got some error or entered some mode after running for a while.

We have correct the payload and it is fine now. Thanks for your help.

0 Kudos
Message 5 of 6
(3,817 Views)

Could it be something wrong about the USB Bus, something like voltage drop when you plug the thumb drive or there are too many device?

0 Kudos
Message 6 of 6
(3,803 Views)