Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

XNET "Frame CAN convert to Signal" can not convert multi-frame

Solved!
Go to solution

Hello 

  There is a question about "Frame convert to Singal" API that can not convert multi frames to signal correctly.

  i attached the simple example to show this issue.

  There are three signal as input to the convert VI. and the 

  convert.jpg

0 Kudos
Message 1 of 2
(2,521 Views)
Solution
Accepted by topic author Danielweng

According to NI it is doing what it should.  Your code isn't performing a multi frame conversion, instead your code is doing a single frame conversion, N times.  The second time this loop runs it didn't have a frame associated with your signals so it holds the previously converted values since this more or less is a Single Point conversion taking place.

 

So the better way to handle a frame signal conversion (in my opinion) is to return the times and values for every reading by providing all frames to be converted at once.  This is how my Frame Signal conversion API works here.  Run the basic demo and you'll see there are two frames with the same ID so you get two values and the two times that each value happened.  If you add frames that are of a different ID you don't get additional readings.  In addition to this being a faster conversion it also handles muxed signals better, in some cases the conversion is faster, and you get NaNs when there is a signal when performing a single point read which in my opinion makes development easier.  Oh and it is pure G other than the database parsing which is done by using XNet.

0 Kudos
Message 2 of 2
(2,486 Views)