Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 66787

Build/join a number out of an array

$
0
0

Hi!

 

I believe it is a very simple problem, but I can't find a proper simple solution.

The example attached (in addtion to a screenshot below) illustrates a simulated array of bytes I am getting from a device (it corresponds to a velocity in LSB that I have to translate in RPM at the very end, 1 LSB corresponds to 0,25 RPM).

My array will always be made of 4 bytes (6 if I enable the checksum function) and the method I have to extract the velocity out of it doesn't convince me:

 

First method works fine, but it's kinda uggly and if ever tomorrow a new device uses more than 4Bytes, I'll have to change my code.

Second one just doesn't work, translating my lack of knowledge and skills in using Join Numbers.

Third method seems to work, but is it the right way to proceed?

 

Thanks in advance for any tips and advices.

Vinny

 

VinnyLaTaupe_1-1594369442139.png


Viewing all articles
Browse latest Browse all 66787

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>