LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Encoding/Decoding an XNET CAN Frame

Since frames/signals are constructed in the XNET Database editor, I'm assuming there is a tidy way to get at those for when you want to encode/decode frame payloads.

For example, assume I have a CAN frame called "FRAME" which has a payload size of 1 byte.

Additionally, FRAME has two signals called "UPPER" and "LOWER" which correspond to the upper and lower nibbles of the payload byte, respectively.

Is there some way that I can access this structure so that I can easily build this payload? Can I somehow read this info as a cluster and then bundle it to create my payload?

It seems there must be some more elegant way than doing a bunch of shifting/masking, etc, especially since the structure already exists inside the DB.

 

Thanks for your help.

0 Kudos
Message 1 of 2
(2,380 Views)

Hi Goonior,

 

This tutorial outlines how to use the database editor to setup your database and how to use it to build the payload that you are looking for.  Please feel free to post back if this does not answer your question.

 

Regards,

Kira T

0 Kudos
Message 2 of 2
(2,356 Views)