03-05-2024 03:13 PM
Hi Folks
I have a setup with two motors/inverters communicating on one canbus. Things like motor temp and torque share the same PGN, but are supposed to be parsed by the source address.
Currently my attempts to display and record these parameters are resulting in the messages getting mixed up. For example, motor 1 and motor 2 temps are reading the same value and appear to be toggling back and forth between their respective temps.
Any suggestions or help on how to parse out these two messages on the same PGN would be much appreciated.
03-05-2024 05:59 PM
If you are using NI-XNET, you can set J1939.AddFltr property.
XNET J1939 Support: Devices with the same PGN but Different Source Address
03-06-2024 12:22 PM
Thanks for the reply!
In terms of using this XNET Session Property Node, do I just need to copy exactly as shown in the link for a two source address setup?
Or, do I need to replace "SourceAddress1Sig1" with an actual source address?
If it's the latter, does it need to be the Arbitration ID or the Hex equivalent?
03-06-2024 05:43 PM
You need to wire an actual signal from your DBC to the Frame.Active node and its Arbitration ID to the Frame.J1939.AddressFilter node. You need to do the same for all the signals that need filtering.
03-12-2024 04:34 PM
Thanks for the reply ZYOng!
So, I've given this a try, but it is not working. I have a 2 canbus setup...one is an ECU CAN and the other is electronic implement CAN.
The electronic implement is the one that has left and right side sharing same PGN with different source addresses.
For some reason when I insert the XNET Node, my engine speed on my ECU CAN no longer reads. Other than my messy block diagram, can you see any errors I'm making in the picture below with how I'm using the node?
03-12-2024 06:46 PM
Those property nodes can only be used before XNET Start VI. If you try to set those properties in a loop, it might return an error, causing the remaining VI to stop working.
03-13-2024 04:35 PM
OK, I can move the XNET property node to outside of my case structure pretty easily.
However, I'm not using XNET Start...instead I've just been using XNET Create and XNET Read.
Can you explain the difference between Start and Read...in the context help the Read VI has data line out.
If I move the node outside my case structure and put an XNET Start before my XNET Read, should that work?
03-14-2024 04:57 PM
If you call XNET Read VI after XNET Create VI without calling XNET Start VI, the driver will call XNET Start VI automatically.
Using XNET Start VI will give you better control.
What matters in your case is that you should put the property node after XNET Create VI in the initialization subVI.
03-22-2024 05:05 PM
Thanks for your continued suggestions.
I moved the property node to be after my XNET Create as you suggested...and no longer within a case structure.
My other CAN channels from the ECU canbus now read properly.
However, the property node is not yielding a successful parse of my CAN channels sharing the same PGN but from different source addresses.
I've tried using both the arbitration id as well as the hex equivalent, and neither yield a change.
Is there anything else you can think of which I could check/change?
03-22-2024 07:06 PM
Are you setting the Frame or Signal name for the Frm.Active property node?