05-13-2011 12:06 PM
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
05-13-2011 12:14 PM
05-13-2011 03:43 PM - edited 05-13-2011 03:44 PM
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
05-13-2011 03:58 PM
Well, It was not clear to me.... hopefully someone can answer... 😄
05-18-2011 10:19 AM
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.
05-25-2011 01:56 PM
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.