LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

X-NET I/O Session cannot be read

Hello,

 

I cannot use a XNET Session IO Constant Name as input of the X-NET read .vi, according to the error message I should be able to use it to read the signals in the session. Anybody knows what is missing in my code attached?

 

Thanks

0 Kudos
Message 1 of 3
(1,913 Views)

Q: I got the following error message on the XNET CAN Setup Window upon enabling the CAN_Run button:
"NI-XNET: (Hex 0xBFF63020) An invalid reference has been passed to a NI-XNET session function. Solution:
Only pass reference retrieved from Create Session, or from an IO name of a session in LabVIEW project.".
What do I do?
A: Follow these debugging steps:
a) Verify that the XNET module is appropriately powered on the Vsup pin (pin 9) and COM pin (either pin 3 or
6).
b) Disable the CAN_Run button. Ensure that the CAN Interface and deployed databases, clusters and
ECUs all show up on the XNET CAN Setup Window. Click the Refresh Database button and ensure that the
appropriate database, cluster(s) and ECU(s) are selected. Click the CAN_Run button again. If the error still
persists, follow step c)
c) Download and install NI-RIO 14.0: http://www.ni.com/download/ni-rio-14.0.1/4862/en/. This should install
NI MAX (Measurement and Automation Explorer) if you don't already have it installed.
Open up NI MAX, then under remote systems, find your controller and expand the tree. Under Devices and
Interfaces, you should see NI 9862 "CAN1". There should be a warning mark next to it which indicates a
incompatibility issue between the XNET CAN module and the controller. Click on the NI 9862 "CAN1" device
and push Update Firmware on the right window and click OK. You don't have to stop the user interface or the
application that is running on the controller while the firmware is updating. Click the CAN_Run button again
on the XNET CAN Setup Window. If the error still persists, please contact the National Instruments support
team.

0 Kudos
Message 2 of 3
(1,787 Views)

You are missing the Open function.  You are saying to read something, then pass in a constant, which is a pointer to a session that probably was closed long ago.  Open one of the examples by going to Help >> Find Examples and search for an XNet example there.  There are plenty for reading single point frames, and signals.  The open function is needed to say what hardware is used, what baud rate to use, what database to use, are you reading or writing, is it frames or signals, etc.  And after you are done reading, be sure and call the XNet Clear function on that session, which will tell the program to release that session, and free up that resource and memory.  Again examples should show this.

 

Also you may find my CAN blog useful.  Here is Part 3, and Part 6 that talk about XNet and give some examples.

0 Kudos
Message 3 of 3
(1,780 Views)