Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

XNET Error

Solved!
Go to solution

I started a new thread for this problem so it will not be confused with my previous question.

 

Background:

PXI, Labview RT 8.6

converting previous CAN commands to XNET ("compatibility layer" is installed)

 

In my project, I have set up 2 NI-XNET "sessions", 41 signals OUT, 61 signal IN (both linked to the same .dbc database)

 

Without posting my project, which is large and contains some confidential info, all I'm trying to do is the following:

 

Use "XNET Read-Signal Single-point" to read the 61 signal in....works fine.

Use "XNET Write-Signal Single-point" to write the 41 signals out...does not work. I've tried reducing down to one or two signal but still receive the following error (-1074384752):

 

"The buffer specified is too small to hold all the data for the read/write function. Solution: determine the size of the buffer from the session and read/write parameters and specify a big enough buffer."

 

I've tried setting different "queue sizes", since I can find no documentation regarding "buffers", to no avail. I've tried reading and writing at different intervals.

I'm not sure what I'm missing. Any suggestions and/or examples (other than the NI examples, which I've already looked at) would be appreciated. I know it's probably something simple but a solution escapes me right now!

Thanks in advance!

0 Kudos
Message 1 of 6
(8,039 Views)
Solution
Accepted by topic author teritask

Alrighty then...figured it out. Unlike my previous program using CAN, you have to make sure ALL signals have some value in them. I have "optional" equipment that can be hooked up to the machine that may or not be present. If it is not present, I do not try to read the values from it (via modbus). Therefore, the values are blank. Now I check to see if it is there, if not write zero values to those signals.

 

Obviously the error message I was receiving had absolutely nothing to do with the problem which is why I was way off course. I guess it was better than the one that states "No one has written an explanation for this error..."

 

 I have noticed that using the XNET vi's has sped up my transfer processes which is a good thing.

 

 

Message 2 of 6
(8,036 Views)
Thanks for sharing your solution. Good to hear that you have noticed a performance boost with NI-XNET. Good luck!
---

Peter Flores
Applications Engineer
0 Kudos
Message 3 of 6
(8,020 Views)
My customer just brought me an older CAN card to see if I can boost the performance (with software) for older machines. We'll see. If not, hopefully they'll spring for the newer boards.
0 Kudos
Message 4 of 6
(8,005 Views)

You do know that NI-XNET will not work on the older cards, right?

 

There is an NI-CAN compatibility layer available, but it works the other way around (older NI-CAN application software with new NI-XNET hardware). If you haven't seen it, take a look at this DevZone article. This other article touches on some of the notable performance improvments with the new platform that you can share with your customer...

 

If you are just going to try and improve and optimize existing NI-CAN code, then have fun! Let us know what you find.

 

Cheers!

---

Peter Flores
Applications Engineer
0 Kudos
Message 5 of 6
(7,981 Views)

Yes, I'm aware that XNET will not work on older cards...I'm looking at software that I wrote previous to this version using the PXI-8512.

Thanks for the input.

0 Kudos
Message 6 of 6
(7,979 Views)