NI VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Issues reading CAN from NI 9862 to veristand 2017

Hello,

I am using a CRio 9024, running veristand 2017, outfitted with an NI 9862 CAN card to communicate with a pair of pump controllers using J1939 CAN protocol. Due to conflicts between the 9862 and several 94xx digital cards, the system is running using an FPGA personality for everything except the 9862, which uses Xnet. The CAN network that the 9862 communicates with consists of two pump controllers, setup through firmware on their end to appear as distinct controllers. The network is terminated at the further of the two, and I have turned the internal termination of the 9862 on through the port options menu in veristand. 

 

The issue I am encountering is that when reading CAN values (in this case an angle sensor reading) into veristand, both signals read the same value, twitching randomly back and forth between the true value of one and the other. It looks, as far as I can tell, like the two CAN signals are entangled, then passed to both veristand channels, with the two signals fighting for dominance. I have been unable to get the two channels to read values independent of one another.

 

I have tried a few things for troubleshooting thus far. I have connected the CAN system to an external CAN reader (Vector CANalyzer) and validated that using the same DBC file as I have passed into veristand yields two distinct, un-entangled CAN signals that behave as I would expect. I have then done the same using the CAN monitor built into NI MAX, showing that the 9862 is receiving the correct signals as well. My interpretation of these results so far is that the issue is likely in my handling of the signal within veristand, and the settings I have used to setup the port in that software. 

 

I would greatly appreciate any thoughts as to avenues of troubleshooting to pursue, or settings to check that you all can provide.

0 Kudos
Message 1 of 4
(48 Views)

There is a special property node you need to enable when receiving two frames with same Destination Address (DA or PGN) or Source Address (SA).

For first case, j1939-addon exposes this property

ZY_Ong_1-1634171940219.png

For second case, I have a modified version for this property but only built for VeriStand 2019. I can share with you on the modification that needs to be done but you would need to build the Custom Device on your own.

 

Staff Technical Support Engineer | CLD CTA
National Instruments
0 Kudos
Message 2 of 4
(31 Views)

Thank you so much! I have changed the firmware of the pump controllers to send two signals with distinct SAs; I will need to look into the DA question. Could you share with me the changes that would need to be made, so I can take a crack at creating the custom device to fix it? Thanks.

0 Kudos
Message 3 of 4
(12 Views)

Here you go on the change note. The first four steps are for System Explorer. The last is for RT Driver.

 

1. Add "Enable Address Filter" to J1939 Addon Shared.lvlib:Monitor Settings.ctl.
2. Add "Enable Address Filter" on Monitor Tool Page and Simulated Device Page. Modify the Initialization code and event structure.
3. Add "EnableAF" to J1939 Addon Shared.lvlib:Constants.vi
4. Modify J1939 Addon Shared.lvlib:Node.Settings.vi to include EnableAF for both get and set.
5. Add VI snippet to J1939 Addon Engine.lvlib:Main.Create XNET Data Sessions.vi
Browse Source\Shared\J1939 Utilities\SubVIs\Convert CAN Arb ID to J1939 ID.vi for the subVI.

 

EnableAddressFilterSnippet.png

Staff Technical Support Engineer | CLD CTA
National Instruments
0 Kudos
Message 4 of 4
(6 Views)