From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN Read Overflow

Solved!
Go to solution

What is the difference between an XNET project session (an xnet session setup in the project list) and an XNET create session VI (frame input stream)?

 

My code is continuously reading for CAN frames. When I use the XNET create session.VI (frame input stream), I get read Queue overflow after a minute or so.

 

Whenever I use a project level XNET session (setup in the project file list), it works fine for as long as I want.

 

I am using:

Labview 2014

NI-XNET 14.5

NI-9862   NI-XNET High-Speed CAN Module

.dbc file with an incoming cyclic signal at 10ms (8 byte payload)

 

I need to use the create session VI because I need the session to be setup after my program is started (user input decides parameters). Otherwise I would just use the project level and be done with it.

 

I've already referred to the extensive help manuals but cannot get the two methods of XNET session creation to behave the same.

0 Kudos
Message 1 of 4
(3,515 Views)

Would you be able to attach the project you have defined this XNET session out of or the dbc (or simplified dbs/vi) you are using for your session?  As far as I know there are no differences but to be honest I never really use the project defined XNET sessions.

Matt J | National Instruments | CLA
Message 2 of 4
(3,378 Views)

Unfortunately the program I am working on has some aspects I am not allowed to share. I am working on an example that doesn't show anything but reproduces the problem I am having, I'll post if I can get it done.  As an update to what I am troubleshooting, I have set up a property node to show a bunch of the session properties, and I was monitoring specifcally the "number of items pending" and "number of items unused" properties. When the bus is not transmitting the number of unused items is 4000 and items pending is 0 (which I gather that means the buffer/queue is empty). When running, Items pending sits at 40, the unused items at 3960. Seems like there is plenty of queue space,  but then I get the queue overflow (still at 40 and 3960), and the items pending jumps back to 0 and unused to 4000. No more data comes in after that. It is really strange.  The project level that normally works also sits at 40 and 3960 the same way, but no overflow still...

 

 

0 Kudos
Message 3 of 4
(3,297 Views)
Solution
Accepted by topic author JSeif

I think I have figured it out, I defined the session in a state machine. The state I defined it in was supposed to be a one-time state, but one of my other states looped the whole thing over, over and over again. After a few stacked session definitions, it gives up. It's always something you wouldn't expect. I appreciate the help!

0 Kudos
Message 4 of 4
(3,285 Views)