Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending counter value over CAN using XNET

Solved!
Go to solution

qqq.PNGHi,

I'm new to this forum so the question might be trivial, but...

 

I've a message which consist of three signals:

--data,

--counter,

--checksum.

 

I'm using this vi to send the data over.

qqq.PNG

 

 

 

 

It works with in while loop.

 

However, along with the data signal - which value of can send on demand (explicit call) - I have to send the checksum signal and counter signal EVERY frame sent (implicit calls) out from XNET.

 

How I can do it? How I can tell to XNET: every signal frame sent has to increment the counter in particular way?

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

If you need to send custom frame bytes (such as checksum), and it is not defined as a signal in your database, you will need to explicitly send the frame with the checksum computed in your code. There is no inherent XNET functionality for doing this as youve described.

Dan Haugen
Certified LabVIEW Developer
CLD Instructor
0 Kudos
Message 2 of 3
(1,855 Views)
Solution
Accepted by topic author MimiKLM

You can do this with XNet but it takes some trickery.  I've posted a blog post on the subject and describe how to do this with some XNet examples.

 

https://hooovahh.blogspot.com/2017/07/can-part-9-crcs-and-incrementing.html

 

Basically you can define the payload for each frame that will be sent out on a hardware timer.  So you queue up a bunch of frames to be sent out, and then when the queue is getting empty, queue up a bunch more.  There is also a lesser known (not fully supported) method I'm working on packaging up but isn't quite ready.

Message 3 of 3
(1,844 Views)