Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending CAN signals and needing to change the value within the VI

I'm VERY new to CAN so please excuse my minimal knowledge,

 

I have 3 signals that need to be sent to my controller. I need to change each of these signals values and they all have different values. I understand I would have the 3 signals be in one session, and that I can use XNET write, but how do I tell XNET write which of the signals to change which value? 

 

Also, I've noticed the terminology "frame" a lot in the forums but can't seem to get a definite answer. Does one signal equate to a frame?

 

Thanks for the help.

0 Kudos
Message 1 of 3
(2,894 Views)

The term "Frame" abstraction of the CAN 2.0 frame that was physically transmitted on the CAN bus. It will include details such as the arbitration ID and payload from the physical layer in addition to other frame related properties such as timing type and I/O mode.

 

The payload (data) in a CAN frame can also be divided into logical units and we call these logical units signals. Signals are mapped to specific bits of the payload and given scaling values to help them represent physical values.

 

To get a better understanding of the relationship, you can open up the NI-XNET Database editor in the Start Menu ->  All Programs -> National Instruments -> NI-XNET folder. Open the NIXNET_example database which is used in all the shipping examples. When you click on a signal (a child of a frame), it will provide you with a visual representation of the payload area to help demonstrate this concept.

Signals.PNG

 

XNET uses the database to associate signals with their parent frames. When you write your 3 signals, XNET will create a frame with the appropriate bits in the payload and transmit it out on the bus. The 3 values you provide XNET write are matched with the 3 signals in the session by the index of the Array they are in. I.e index 1 of your write array will be written to the index 1 of your create signal array.

 

Jeff L
National Instruments
0 Kudos
Message 2 of 3
(2,813 Views)

This seems like as good of time as any to mention my new series of blog posts on CAN. I'm not done yet but here is the first post on a series where i talk about CAN. One post talks about what it means to read and write data which is a frame in most raw cases. 

Message 3 of 3
(2,800 Views)