Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquire simultaneously two CAN signal (XNET)

Hi to all!

From a wattmeter i acquire AC_ActivePower (WtmMeas2Val) and DC_ActivePower (WtmMeas1Val). Then i want to trasmit to CAN line both signal.

This is the Database of XNET

180418_NI02.jpg

The gKERSsync is in one CAN message but the PWtmAC and PWtmDC are in the same CAN message.

This is my VI.

180418_NI01.jpg

When i acquire the CAN signal i have this strange behaviour

180418_NI03.jpg180418_NI04.jpg

When the PWtmAC signal is trasmitted the PWtmDC is 0 and viceversa. In the other hand the gERSsync is always trasmitted..

If i delete the XNET write from PWtmAC or PWtmDC the remaing signal is trasmitted continuosly.

What can i do!?

0 Kudos
Message 1 of 3
(2,594 Views)

I think it is probably because you are clearing the Error -1074384752. If the data you pass to the write doesn't match the size specified in the create session VI it won't transmit any data at all. Stop clearing this error and ensure you are supplying the appropriately sized data to see if this fixes the issue.

 

Also, why perform two write operations? Why not put both signals into the same session and perform a single write which updates both signals?

 

 

Jeff L
National Instruments
0 Kudos
Message 2 of 3
(2,570 Views)

I fix the error putting both signal in the same XNET session. 

Thanks for the tip!

180418_NI05.jpg

 

Also i removed all cancel error on match!

0 Kudos
Message 3 of 3
(2,564 Views)