Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

XNET Frame In Queue Read returns single data byte.

Solved!
Go to solution

Hi,

PFA. attached screenshot. In this, I have created a  simple .dbc file containing a single Frame.

While reading the CAN data sent by Arduino code (highlighted in red color box), it only shows only Signal 1 data using Frame input Queue i.e 0E but not getting other data bytes. 

Also, Frame Input Single-Point has the same issue as Frame Input Queue.

 

While Frame Input in Streams returns all data bytes. NO issue with it. 

 

In my final application, there will be an N number of frames in the .dbc file, So I am planning to use Frame in Queue to send a particular frame (as per the Test specifications) to DUT and will read the CAN response from DUT to that particular sent frame using Frame Read API. Well the Entire CAN Engine will be the DQMH module.

 

Any idea? 

Frame in Queue return single data.PNGxnet api bug.PNG

 

2. While using Frame Input Streams, the interface-->CAN--> Setbaudrate64. This property node label (heightened in red box ) is different from what shown in the NI Example finder example (ref to Read Frame input streams example Ref highlighted blue box). Seems like minor bug. but creates confusion. Any thought?

PFA. Screenshot

0 Kudos
Message 1 of 7
(2,559 Views)
Solution
Accepted by topic author Voyager7277

Hi,

 

are you working with an RT system?

If yes, can you try redeploying your database to the system using the File - Manage Aliases dialog in the Database Editor?

0 Kudos
Message 2 of 7
(2,508 Views)

Hi,

I am using NI CRIO 9054 with NI 9862 CAN module and using MCP2515 can sensor + Arduino.

more details here

https://forums.ni.com/t5/Automotive-and-Embedded-Networks/NI-9862-CAN-module-communication-with-MCP2... 

 

yes, I have deployed this dbc file to CRIO. PFA screenshot. As I mentioned earlier, FRAME input Streams shows complete data sent by arduino. While in case of Single Point and Queued Read. I am receiving only 1st data byte. 

Voyager7277_0-1616761516246.png

 

Voyager7277_1-1616761689929.png

Voyager7277_2-1616761728509.png

 

 

 

0 Kudos
Message 3 of 7
(2,501 Views)
Solution
Accepted by topic author Voyager7277

The database you have deployed shows only one byte in the message, opposed to the first screenshot. So the behavior is expected.

Message 4 of 7
(2,492 Views)
Solution
Accepted by topic author Voyager7277

Hi all,

 

So I have deployed the dbc file. Added all 8 signals in a single frame. While deploying I selected the correct baud rate to 125KBPS, as Arduino CAN sensor MCP2515 is set to 125KBPS.

Now getting all the Frame data using Frame Queued Input and Single point Read. 

Voyager7277_0-1616763802728.png

 

0 Kudos
Message 5 of 7
(2,483 Views)

 

WaldemarM

So, in the original query I posted I did included all 8 signals in Frame. but didn't get any data. later I changed to 1 signal to see the effect. but same no data while using queued and single point Fram in sessions.

 

but I wonder how Frame in Stream still gave me all data without any issue as compared to Queue and single point read? I am still learning XNET APIs. Can guess? 

 

Thanks!

0 Kudos
Message 6 of 7
(2,467 Views)

The Frame Input Stream session does no evaluate the frames in the database and read them like they arrive physically.

The problem with your deployed database was not the missing signals but the Payload Length. The Frame Input Queued session assumes that the frame has the specification defined in the database and truncates payload exceeding the limit given in the database.

0 Kudos
Message 7 of 7
(2,463 Views)