Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Want to display only display specific received CAN messages, filter by arbitration ID

Hello there,

 

I am trying to filter my CAN output by modifying the NetClusterArrayto2DstringArray built in VI, so that I only will display results in my output array when my arbitration ID is "657".  I put the entire loop in a case structure, but I get nothing in my output (my default case is 0, so this is expected), but when I send my appropriate CAN message that should cause this ID to be received and the display to update.  I've also tried throwing in a write to excel spreadsheet to see if its just writing it really fast but that spreadsheet is blank.

Is there something about the way that I am identifying the arbitration ID in the case statement?  Is there an easier way to filter out what I want to display?

 

Thank you!!
Crystal

Download All
0 Kudos
Message 1 of 3
(6,699 Views)

I also want to note that in the filterbyArbID.gif, case 657 is set to default. (this causes it to display everything.  Setting the other case 0 to default causes nothing to show up)

0 Kudos
Message 2 of 3
(6,698 Views)

if you want to read back the messages you transmitted there are two options:

1) transmit message on your second port (instead of Tx and Rx on same port) and use a loop back cable from Port 1 to Port 2

2) set the attribute Interface Self Reception? = TRUE, this mode mirrors back the transmitted messages on the same port

 

refer the manual for details

 

For CAN, this specifies whether to echo successfully transmitted CAN frames into the read queue of the CAN Network Interface and/or CAN
Objects. Each reception occurs just as if the frame were received from another CAN device. For self reception to operate properly, another CAN device must receive and acknowledge each transmit. If a transmitted frame is not successfully acknowledged, it is not echoed into the read queue.

0 Kudos
Message 3 of 3
(6,672 Views)