04-30-2017 04:38 PM
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.
05-01-2017 08:29 AM
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.
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.
05-02-2017 10:14 AM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord