LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Number count of bytes

Solved!
Go to solution

Hey there I have a doubt if labview have a function for 2 numeric numbers  with lenght 0-65535 each, One number is high so have 65536 value but between 32768 and 65535 the value is negative , and other just sum after , so I would like to know if have a simple way to get exact decimal number I had made part of VI to do this , I just want a simplyfied mode.

Chris9823Alb_0-1709829185061.png

 

0 Kudos
Message 1 of 8
(630 Views)

Hi Chris,

 


@Chris9823Alb wrote:

Hey there I have a doubt if labview have a function for 2 numeric numbers  with lenght 0-65535 each, One number is high so have 65536 value but between 32768 and 65535 the value is negative , and other just sum after , so I would like to know if have a simple way to get exact decimal number I had made part of VI to do this , I just want a simplyfied mode.


All your explanations are quite unclear: why don't you provide an example with real numbers?

 

I guess oyu want to work with I16 entities!?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(628 Views)

Example

High number = 0  Low number= 1 Result number = 1

High number = 65535  Low number= 65535 Result number =-1

High number = 1  Low number= 0 Result number = 65536

 

 

0 Kudos
Message 3 of 8
(613 Views)

Hi Chris,

 


@Chris9823Alb wrote:

High number = 0  Low number= 1 Result number = 1

High number = 65535  Low number= 65535 Result number =-1

High number = 1  Low number= 0 Result number = 65536


So you have two U16 values and you want to join them to an I32 entity?

Use JoinNumbers and ToI32 and you're done!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(604 Views)

I had used join numbers before and give me just positive integer numbers but where is tool 32 to convert that

0 Kudos
Message 5 of 8
(600 Views)
Solution
Accepted by topic author Chris9823Alb

Hi Chris,

 

when you want to convert between different numeric formats then you should look at the numerics->conversion palette!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 8
(596 Views)
Solution
Accepted by topic author Chris9823Alb

@Chris9823Alb wrote:

Hey there I have a doubt if labview have a function for 2 numeric numbers  with lenght 0-65535 each, One number is high so have 65536 value but between 32768 and 65535 the value is negative , and other just sum after , so I would like to know if have a simple way to get exact decimal number I had made part of VI to do this , I just want a simplyfied mode.

 

 


So you seem to have an array of two U16 number (we cannot tell from the picture how big the array is or what the datatype is!)

You are operating in integers (input and result!), so there should not be any orange anywhere, right?

 

If the array has exactly two U16 elements and the first element is LO (guessing from your convoluted code), Here's all you probably need (two possibilities, but there are many more, of course).

 

altenbach_1-1709845055635.png

Message 7 of 8
(530 Views)

Thank you for suport! it worked both

0 Kudos
Message 8 of 8
(476 Views)