05-18-2022 05:04 AM
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.
05-18-2022 07:45 AM
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?
05-18-2022 08:55 AM
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 ?
05-18-2022 02:37 PM - edited 05-18-2022 02:46 PM
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.