Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Can Signal-Frame Conversion Issues

Hello,

Having issues with converting a signal (float) to a can frame using a dbc file. I am using two methods, xnet and Hooovahhs. Using xnet I can convert the positive and negative to a correct can frame. Using code inspired by Hoovahhs example I can only convert positive signals correctly and negative signals are converted to all zeros. Including example project/code/dbc file. Any ideas on what I am doing wrong?

 

J-

 

jpo_beta_0-1695345276975.png

jpo_beta_1-1695345281929.png

 

jpo_beta_2-1695345295331.png

jpo_beta_3-1695345301632.png

 

 

0 Kudos
Message 1 of 6
(1,482 Views)

If you don't get a response, I suggest you post your example in a version of LV prior to 2023 to allow more users to open it.

0 Kudos
Message 2 of 6
(1,453 Views)

Sorry I only have access to LabVIEW 2022 Q3, so I can't open it.  Still you aren't the only one that suggested my frame signal conversion had an issue with negative numbers.  I made a post where the code was originally developed.

 

https://forums.ni.com/t5/Example-Code/CAN-Frame-Signal-Conversion/tac-p/4189168/highlight/true#M1489...

 

I was waiting for feedback from other users to tell me if that fix addressed their issue.  If it does I planned on releasing a new version with the fix.  Assuming this is the correct method, I need to make a new release of the package, and that example post.

0 Kudos
Message 3 of 6
(1,414 Views)

Sorry went on vacation. Here is a modified version

Thanks for you blog. I have learned so much.

 

J.-

 

Positive number

john_or_0-1697240989022.png

 

Negative

john_or_1-1697241014817.png

 

0 Kudos
Message 4 of 6
(1,302 Views)

Thanks so much for the demo, it was very helpful.  I did find a bug in the conversion but now I have a working set of code that functions correctly. I just need some time to update packages and test a few things.  The last post I made had a set of code that mostly works but has one edge case not handled correctly.

0 Kudos
Message 5 of 6
(1,237 Views)

Thanks

0 Kudos
Message 6 of 6
(1,191 Views)