This widget could not be displayed.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

converting hex to dec

Solved!
Go to solution

Hi everybody,

 

I want to join this two numbers and convert them from hex to dec. I have tried using joint and conversion but I still couldn't work it. In the following screen shot I took it suppose to be 3E8 in hex which equals to 1000 in dec. I need suggestion from you how to approach this.

 

 

 

 

 

 

Thanks

0 Kudos
Message 1 of 9
(3,834 Views)

Post what you did that isn't work for you.

 

Taking those two array elements and using Join Numbers will give you an integer use value is 1000.  Assuming those elements are U8 integers.

0 Kudos
Message 2 of 9
(3,831 Views)

This is my program.

0 Kudos
Message 3 of 9
(3,827 Views)

Your code makes no sense. What's the purpose of the while loops?

There are missing subVIs.

I cannot locate your failed attempts to join two numbers. Do you want to join the two specific elements you mentioned?

Message 4 of 9
(3,823 Views)
Solution
Accepted by topic author gltfrs

Try this:

 

 

You don't need to "convert" from hex to dec. This is a cosmetic property of the indicator, and has nothing to do with the underlying data.

Download All
Message 5 of 9
(3,817 Views)

Your code makes no sense. What's the purpose of the while loops?

There are missing subVIs.

I cannot locate your failed attempts to join two numbers. Do you want to join the two specific elements you mentioned?

 

I guess I can get rid of the while loop, but the whole purpose of this program is to read a value from the device I'm using which Laurels tachometer. It is reading the tachometer as long as I use the right address. Do you want to join the two specific elements you mentioned? Yes I want to join both those two specific elements and convert them to decimal. 

0 Kudos
Message 6 of 9
(3,815 Views)

Thank you very much

0 Kudos
Message 7 of 9
(3,811 Views)

As I was reading all the answers about converting Hex to Dec,I found out that many of you are making it so complicated.To make it easier for a learner or beginner,this is what it takes:

 

  1. Open a blank VI
  2. Click on numeric control
  3. Right click on the same numeric control
  4. Scroll down to "Representation"
  5. Click on "U8"
  6. Go to numeric indicator and repeat step 4 and 5
  7. Then right click again on numeric control
  8. Scroll down to "Properties" and click
  9. Click on "Data entry",if necessary,change the minimum and maximum
  10. Pass to "Display format
  11. Click on "Hexadecimal" then you are done.The rest is to go on the block diagram to wire the numeric control to the numeric indicator and it works.

You can do the same process reverse for dec to hex.But you must know that what we did for "numeric control" on (Hex to Dec) will be done to "numeric indicator" on (Dec to Hex).This same process can apply to octal and binary without the use of complicated array,string while loop and so on...

 

I'm a beginner in Labview and I understand that you need to explain more to understand better.

 

 

 

0 Kudos
Message 8 of 9
(3,709 Views)

@SOBGA wrote:

As I was reading all the answers about converting Hex to Dec,I found out that many of you are making it so complicated.To make it easier for a learner or beginner,this is what it takes:

 

  1. Open a blank VI
  2. Click on numeric control
  3. Right click on the same numeric control
  4. Scroll down to "Representation"
  5. Click on "U8"
  6. Go to numeric indicator and repeat step 4 and 5
  7. Then right click again on numeric control
  8. Scroll down to "Properties" and click
  9. Click on "Data entry",if necessary,change the minimum and maximum
  10. Pass to "Display format
  11. Click on "Hexadecimal" then you are done.The rest is to go on the block diagram to wire the numeric control to the numeric indicator and it works.

You can do the same process reverse for dec to hex.But you must know that what we did for "numeric control" on (Hex to Dec) will be done to "numeric indicator" on (Dec to Hex).This same process can apply to octal and binary without the use of complicated array,string while loop and so on...

 

I'm a beginner in Labview and I understand that you need to explain more to understand better.

 

 

 


If you really read all of the comments, you would see that Altenbach already stated this (saying it is just a cosmetic property for the indicator).



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 9 of 9
(3,692 Views)