LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-XNET Database Editor

I am working on creating a CAN Database using the NI-XNET Database Editor.

 

I wonder about :

How can I write the Data Input using  NI-XNET Database Editor.(It gives me the ability to enter the ARBITRATION ID, PAYLOAD LENGTH,TRANSMIT TIME,...).But I couldn't find a way to enter the Data Input like :  "13 02 13 00 00 00 00 00","05 31 01 FD 0F 05","10 26 31 01 FD 0D 05 20"...

 

Thanks in advance,

 

OTAI Lotfi. 

 

Screenshot 2022-05-18 121151.pngScreenshot 2022-05-18 121325.pngScreenshot 2022-05-18 121021.pngScreenshot 2022-05-18 121434.png

0 Kudos
Message 1 of 4
(1,345 Views)

CAN database files do not have any data in them. 

The Database file is only for describing the structure of the CAN messages that can appear on the CAN bus. 

 

It is your program that has to have the data to send. It can use the Database to encode and/or decode a CAN message. 

 

What you have seems to be raw CAN data. What du you want to do with that data? 

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

I successfully completed the same application but using NI-CAN. 

Now I want to do the same application but using NI-XNET Database Editor ( Write Frames/ Read Frames): 

How do I enter the Frames (surrounded in black in the image below) using NI-XNET Database Editor ?

Screenshot 2022-05-18 163759.pngScreenshot 2022-05-18 164231.png

0 Kudos
Message 3 of 4
(1,313 Views)

what you are doing with Ni-CAN is writing and reading raw CAN messages.

To be able to do the same with NI-XNET you need to use the Raw Frame functions. 

 

You should not use the XNET Database Editor, as this is just for CAN databases, with information about CAN messages structures.  

 

In LabVIEW, if you open the example finder,  you can search for the XNET Frame Raw examples. They should be able to show you how to read and write raw CAN messages. 

 

Something like this: https://www.ni.com/docs/en-US/bundle/ni-xnet-20.5/page/nixnet/modeframeinputqueued.html

 

Or just getting started: https://www.ni.com/docs/en-US/bundle/ni-xnet-20.5/page/nixnet/gettingstarted.html

Use the CAN Frame Input Queue.

 

(I currently don't have any PC installed with XNET, so I can't show you the examples) 

 

For your current application, it could do with a remake. There are so many things wrong with that image of the code. 

0 Kudos
Message 4 of 4
(1,301 Views)