Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

ECU M&C Toolkit: Timeout error -301058 while running Multiple Measurement example

Hello!

I'm trying to use 2x cRIOs for running the 'CCP Test ECU' and 'Multiple Measurements' examples and I receive error -301058 (timeout error while waiting for response from ECU) from 'MC DAQ Initialize.vi'.

'CCP Test ECU' is running on a cRIO 9035 using a NI 9862 XNET CAN module with no issues (no error is returned, 'ECU Connected' LED remains ON). 'Multiple measurements' example is running on a cRIO 9068 with a NI 9853 CAN module connected on slot3. I've created the bitfile using the 'CAN Bridge' compiled for 9068 and copied it on the target root folder.

The CAN ports from both modules (9862 and 9853 CAN0) are connected together with a NI CAN cable with termination resistors of 120 ohms on both sides and supply pins connected to a 14V power supply. I have an oscilloscope connected on CAN_H and CAN_L but cannot see any activity - both signals are constant at ~1.5V.

Does anyone know what might be the problem? I want to make this example running before I start acquiring from a real ECU.

Thanks in advance!

Lucian
CLA
0 Kudos
Message 1 of 16
(7,038 Views)

It sounds like the ECUMC application running on the RT side of the 9068 is not able to get frames out on the bus for the Demo ECU to receive.

 

We can try running the XNET bus monitor on the 9862 to see if it detects any frames or error frames. Make sure to have "Listen Only" unchecked and "Log Bus Error Frames" checked. We would expect to see a single frame from the 9853 trying to initiate a connection. If we don't receive that frame the demo ECU would not respond and the error would be thrown.

 

If a bus error is detected we can analyze the error to help give us clues as to the problem. It sounds like everything is set up properly on the physical layer but perhaps there is a baud rate mismatch.

 

The CAN Bridge project that you attached looks like it is setup properly. Ensure that we are calling the open FPGA reference properly and starting the FPGA. We might try adding a small wait after the FPGA is started to ensure that the FPGA is running before starting the ECUMC code.

Jeff L
National Instruments
0 Kudos
Message 2 of 16
(7,001 Views)

Thanks JefeL for the quick response!

I added now the CAN Bridge FPGA VI to Multiple Measurement project and changed the slot of the module to slot1 to be exactly like the example and recompiled. I opened the FPGA Reference in RT.vi and used different delays before ECU M&C code starts but with the same timeout error. Again, on the oscilloscope I see no CAN signals. It seems that the 9853 is not sending any messages. Is there a way to debug this example VI?

 

 

Lucian
CLA
0 Kudos
Message 3 of 16
(6,986 Views)

Your CAN bridge project appeared to be configured correctly. The FPGA nodes were all set to Mod3/CAN0 and the module was configured as expected. Moving all the constants to Mod1/CAN0 is a good troubleshooting step and we might try using CAN1 as well.

 

Lets try ruling out a problem with the hardware first by running the CAN Basic shipping example located in the example finder:

Hardware Input and Output -> CompactRIO -> Module Specific IO -> CAN -> Basic.

 

Use that example to try and transmit an arbitrary CAN frame. By default, this simpel loopback example uses slot 1, will try to transmit on CAN1, and receive on CAN0. The ports can easily be swapped with a recompile. If the loopback test fails, we can try to isolate which CAN port is causing the problem by transmitting a frame from one port on the 9853 and trying to receive it with the bus monitor or stream input example on the other cRIO.

Jeff L
National Instruments
0 Kudos
Message 4 of 16
(6,969 Views)

 

 

I removed the CAN cable from the 9862 side (which is inserted in the cRIO 9035) and I ran the CAN basic example on the 9068. I measured with the oscilloscope at the other end of the terminated cable and I could see the signals which I sent. So the 9853 module is working properly. I also modified the CAN Bridge FPGA VI to switch USER FPGA1 LED green at the beginning of the execution, red when CAN is started (and FIFO is flushed) and then green again when CAN messages are sent. I copied the new bitfile on the target and executed the Multiple Measurement example and I could see the LED switching as expected (green, red and then green again) but no signal detected by the oscilloscope. How is that possible? Can you give me more details about the code behind MC DAQ Initialize.vi?

Lucian
CLA
Download All
0 Kudos
Message 5 of 16
(6,959 Views)

I have setup a pair of cRIO devices to duplicate your setup and see the same problem when it should be working. I am currently investigating and will keep you posted as soon as I have additional information.

Jeff L
National Instruments
Message 6 of 16
(6,945 Views)

Thanks a lot @JefeL for looking deeper into this. I'm looking forward to your conclusions.

Lucian
CLA
0 Kudos
Message 7 of 16
(6,931 Views)

Hi LucianM,

So far I have been able to determine that we are most likely looking at a bug but it remains unclear where exactly the bug lies. I am facing some staffing challenges at the moment with the holidays and appologize for the delay.

 

Can you tell me what versions of software you are using including LabVIEW, RIO, XNET, and ECUMC?

Jeff L
National Instruments
0 Kudos
Message 8 of 16
(6,912 Views)

Hi JefeL,

 

That's OK as I am also in my last working days for this year.

LabVIEW 2015 SP1f3

ECU M&C Toolkit 15.0 (15.0.0f1)

XNET 15.5 (15.5.0f0)

NI RIO 15.5.0

Lucian
CLA
0 Kudos
Message 9 of 16
(6,905 Views)

Hi JefeL,

Have you managed to find out anything new?

Lucian
CLA
0 Kudos
Message 10 of 16
(6,800 Views)