LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2’complement hex convert

Solved!
Go to solution

Hi alex,

 

if you would actually read other posts of this thread you would have set your string to hex display. But you selected "\ code" instead...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 21 of 40
(2,518 Views)

HI nathand,

I tried to drag the image but it is not coming in my bolck diagram. It is showing thred reference instead. Is there a settings to do it??

Labview user
Message 22 of 40
(2,513 Views)

HI nathand,

I tried to drag the image but it is not coming in my block diagram. It is showing thred reference instead. Is there a settings to do it??

Labview user
Message 23 of 40
(2,512 Views)

Drag it to your hard drive, e.g. desktop, first. Then drag it from there to your block diagram.

Message 24 of 40
(2,510 Views)

You may need to drag it to your desktop first, then drag it from there to the block diagram.

 

I apologize for the harsh tone of my earlier comment.  It is great that you are contributing to the forum.  As a less-experienced LabVIEW user, you may want to limit your posts when you do not know the answer, or at least spend more time testing your solutions before you suggest them publicly.

Message 25 of 40
(2,504 Views)

Thank you all,

My solution could be lengthy or complicated but they are working.

I have tested them. By the way the comarision has to be done with (8000) hex i.e.(1000 0000 0000 0000) in binary. it is the basis of signed notation.

Labview user
Message 26 of 40
(2,513 Views)

Glad it's working...but what comparison?

Message 27 of 40
(2,504 Views)

No comparision,

I am also learning new ways to doing things like typecasting and flattening unflatenning

Thank you all.

Labview user
Message 28 of 40
(2,495 Views)

@Aojha wrote:

My solution could be lengthy or complicated but they are working.


No.  Try coding the solution you initially proposed to this question:

 

"Use string subset Vi to get lower and upper bytes.

Use concanet string to swap upper and lower bytes.

Use hexadecimal string to number conversion to convert it in decimal.

check the condition if it is greater than 65535 then subtract no. with this value to get negative no."

 

If you do, you'll quickly discover that this solution cannot possibly work.  Similarly, in another thread, you posted a solution that did not produce the results the poster requested, even though the desired output was clearly given in the post.

 

I don't mean to sound too harsh here.  Trying to solve other people's problems can be a great way to learn LabVIEW, and we're all happy to try to help you.  However, you're not helping anyone by hastily posting poor solutions - your time would be better spent testing your code first.

Message 29 of 40
(2,489 Views)

i'll try to do that.

Although I would like the person posting the question to arrive the solution by himself through disscussions.

Labview user
Message 30 of 40
(2,474 Views)