From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

multiple xnet sessions on one interface

Hello,

 

I'm looking for an example of creating multiple xnet sessions on one interface.  At the moment, I just want to create 1 "write" session and 1 "read" session.

 

I couldn't find an example that does this.

 

Any help is greatly appreciated.

 

Best regards,

Chris 

0 Kudos
Message 1 of 6
(5,169 Views)
Pardon my ignorance, but what is an xnet session and how does it relate to LabVIEW.
0 Kudos
Message 2 of 6
(5,165 Views)

Hello Altenbach,

 

XNET is the name that NI has given to the drivers that are used in the newest communications modules (e.g. cards) that use CAN, FlexRay, or LIN.  These drivers have been abstracted to a higher level to permit one set of driver vis (XNET driver vis) to be learned and applied to any of CAN, FlexRay, or LIN.  LabVIEW is one of the supported development environments for XNET.

 

Hopefully, this clarifies it a little bit.  Also, if I have posted this to the wrong area (which I have been known to (inadvertently) do before), I apologize.

 

Thanks,

Chris 

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

Well, It was not clear to me.... hopefully someone can answer... 😄

0 Kudos
Message 4 of 6
(5,158 Views)

Hi chassan.

 

The closest thing I could find is shown in the "Sessions" section of the document linked below.

 

Getting Started with the NI-XNET API for LabVIEW

http://zone.ni.com/devzone/cda/tut/p/id/12375#toc3

 

Hope this helps some.

 

Regards,

 

Michael G.

Michael G.
Applications Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Self-realization: I was thinking of the immortal words of Socrates, who said, "... I drank what?"
0 Kudos
Message 5 of 6
(5,143 Views)

Hello,

 

In LabVIEW, select Find Examples... from the Help menu. Open

   Hardware Input and Output : CAN : NI-XNET : Multiple Sessions : CAN Frame Input Output Same Port Single Point

This example shows how to read and write individual frames on the same port. You essentially just create two sessions.

 

If you are looking for behavior similar to the old NI-CAN Network Interface, open these two examples:

   Hardware Input and Output : CAN : NI-XNET : Frame Sessions : CAN Frame Input Stream

   Hardware Input and Output : CAN : NI-XNET : Frame Sessions : CAN Frame Output Stream

Copy the diagram from one of these VIs, and paste it below the other. Wire the two calls to XNET Create Session so that they execute first, and keep the rest as is. The result will read and write arbitrary traffic.

0 Kudos
Message 6 of 6
(5,131 Views)