LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XNET Linbus application - how to set up with cDaq and NI 9866?

Hi folks,

 

I am new to LIN Bus and to XNet and I am trying to to control an linear motor with LabView (2015) The motor only has two "Commands" and I would think this is a very simple task. Is there any beginners documentation? My motor remains quiet and I have already tried al lot. I looked also at the examples, but this was also not helpful.

 

I defined frames of different length in the database. I told my ecus which frame has to be send and which one has to be recceived. And I created sessions to do queued input or output.

 

I seem to misunderstand something, since I get error messages about property values which are not set correctly (do I have to check al property values?) and no data from my linbus device.

 

Ho can I send a frame to a slave which is filled up by it and how can I address a telegram to a slave which works as static command? Do I have to provide the checksum myself or is this done automatically?

 

 

0 Kudos
Message 1 of 5
(3,284 Views)

Hi,

 

the most comprehensive information source for XNET ist the NI-XNET Hardware and Software Manual:
http://www.ni.com/pdf/manuals/372840h.pdf

Best regards,
Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
Message 2 of 5
(3,246 Views)

Thank you for you answer. I have already found it although it was not linked in the manuals section of the NI 9866 on the NI website. I should have updated my post. It was not easy to find and due to this your suggestion is helpful also for others which have the same problem.

 

Also helpful was the NI Whitepaper on LIN Bus (http://www.ni.com/white-paper/9733/en/) although i does not cover the XNet programming stuff.

 

I was looking for something more like a quickstart guide. There are three on the product page but the seem to cover more quick installation issues.

 

By know I defined everything which is needed to solve my problem in the database. For my taste it was quite complicated but not so complicated that a 1200 page manual is needed.

 

1200 pages seem to be very comprehensive to me to send a 4 byte payload Lin Bus telegram and to recceive a 5 byte payload LINBus telegram.

 

 

Regards

 

Michael

0 Kudos
Message 3 of 5
(3,243 Views)
A few important things come to my mind:

1) Do you have a valid ldf-File, defining the frames and the LIN schedule?
2) Don't forget that the transceiver of the 9866 needs an external power supply.
3) Is the motor controller the LIN slave or the LIN master.
4) Start with one of the easy examples from the NI example finder. There's a VI for reading and writing frames on the same port, which can either be started as LIN master or LIN slave.

Regards, Jens
Kudos are welcome...
Message 4 of 5
(3,236 Views)

 Good afternoon Jens,

 

thanks for your reply. I already solved my problems. 

 

1. I didn't have a LDF file.

2. I knew that external power is needed. This is one of the helpful information of the three quickstart guides on the product page. Unfortunately I knew it before.

3. The 9866 is master, the motor works passively. What I did not know was that the master needs a schedule and all frames which are send to the slave have to have their timeslot in the masters schedule.

4. This was one of my problems. It took a long time to find out how the "easy" examples put something on the bus. Which of the easy examples would you prefer to start with? Generally it is a good idea to start with examples from the example finder and something I try always first.

 

Meanwhile I got an oscilloscope connected to analyze the signal which is on the bus. This helped me, for example, to find the protected identifier and the checksum.

 

 

Finally I figured out (by trial and error) how to build everything from the scratch. Even the easy examples where to difficult for me and I felt somehow lost in the 1200 page comprehensive manual.

 

I found out that I do not like polymorphic VIs.

 

I will write a quickstart guide for my specific problem, when I have some time.

 

Regards

 

Michael

0 Kudos
Message 5 of 5
(3,235 Views)