08-04-2021 12:59 PM
Hello NI community members,
I want to create a vi that does the following 2 tasks:
1) write CAN signals to a CAN bus (interface CAN1)
2) read all frames on that same CAN bus - including the ones that it wrote
(Note that all the signals I am reading/writing in the vi are listed as both Rx (recieve) and Tx (transmit) on the dbc file for them. You can find more information about the database in the block diagram for the vi.)
This seems pretty straightforward and creating 2 XNET sessions - one to write signals and one to read in stream frames - both with CAN1 as their interface should work.
So far I am able to write the signal data successfully. I am attaching a snippet of the CAN bus trace I captured on CANalyzer and you will see that the messages from "LabVIEW_node" are present on it. These are the messages that I created on LabVIEW (vi attached below) through an XNET write signal single-point session.
The CAN bus has additional frames (from nodes such as vcu) that you will also see on this trace.
I am able to read these messages on LabVIEW - through an XNET read frame CAN in stream session. Here is a snippet of the front panel of the vi after I ran it for a few seconds. You will notice that the input frames display the x61x messages from nodes such as vcu, ipcimVie and becmA123.
The issue is that I cannot read the frames that I created on LabVIEW. If I disconnect other CAN enabled devices, and only have the LabVIEW vi running, the input frame array is completely blank.
Would anyone happen to know why I can read frames from external nodes, but not the ones that I wrote through LabVIEW even though they are being transmitted to the CAN bus?
I would extremely appreciate any insight on this issue.
Also, I went through other NI community posts regarding similar issues, but was unable to find a solution that works for me. The vi that I created is, in fact, very close to one that I found as solution to a similar problem. Here is the link to that post - https://forums.ni.com/t5/Automotive-and-Embedded-Networks/Reading-and-Writing-to-the-same-Signal/td-...
Looking forward to hearing from you all.
Thank you!
08-05-2021 02:22 AM
Hi,
try to set Echo Transmit to True:
Regards, Jens
08-05-2021 10:59 AM
Thank you for your feedback.
I set the eco transmit to true but it is resulting in the following error.
I tried setting some other properties too to help resolve the error but it's still not working.
Would you happen to know what is going wrong here?
Thank you!