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: 

How to use NI CAN on a PXI chassis without using a FPGA or RT project

Hello,

           So im trying to automate some CAN READ/Write msgs. My hardware has a pxi chassis with some FPGA I/os and CAN cards. Im trying to read/write CAN msgs using the ni xnet can api's. When i do this from the fpga or RT project everything works fine but when i try to access the CAN ports outside of the fPGA project, it doesnt work.

When i create a constant session variable on the block diagram, i dont see the available ports. But the same thing works form inside of the FPGA project. I did create an xnet session for CAN1READ and CAN1Write from the FPGA project and tried using it outside the FPGA project. I still get an error XNET Read (Signal Single-point).vi:5730001. I'm sure there is a way to access the CAN ports in the pxi chassis without using the FPGA or RT project just dont know how. Can someone help me with this. If you have some examples that'll be even great.

 

Regards

Jay

 

 

0 Kudos
Message 1 of 4
(2,769 Views)

Where are you trying to access this from?  Are you looking to use MAX?  Are you looking to use a VI?

 

If you're looking at VI, are you on a host trying to talk to the PXI or do you have a Windows controller on the PXI?

 

If you don't have a Windows controller, why wouldn't you want to use the RT/FPGA to talk to the XNET device?

 

You mentioned both NI CAN and XNET.  These are two different drivers.  Which are you using?

0 Kudos
Message 2 of 4
(2,743 Views)

Hi Jay,

exactly what hardware are you using? What you are writing is a bit confusing - what do you mean by writing that you are doing something "from the FPGA". PXI controllers don't have built in FPGA targets so I am not sure what exactly is your hardware setup.

0 Kudos
Message 3 of 4
(2,728 Views)
So I'm using a rt project to control some fpga I/O's. The reason I wanted to be able to access can outside the project was because of XML decoding issue. I have a XML parsing code which would not work on the rt project because it uses the Dom object. Hence I was trying to take the can code outside of the rt project. But I realised it's not gonna work so I've decided to use the XML code outside of the project. Thanks for the response guys.
0 Kudos
Message 4 of 4
(2,712 Views)