LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

doubt on data convertions

This one works in LV8.2 so it should work for you, slightly less elegant.

0 Kudos
Message 21 of 29
(1,208 Views)

I am really stupid and why i can not get these ideas.Smiley Sad

You are really helpful and now its working.

0 Kudos
Message 22 of 29
(1,205 Views)

Allow me to quote myself.

 

Ignorance and stupidity are two very different things.  The former, as in this case, is easily curable. :smileyhappy:

 

Now if you ask the same or very similar question again in two days....  Smiley Very Happy 

 

My guess is it won't happen.

Message 23 of 29
(1,196 Views)

Hi,

    Why some times "deletefrom array delete portion" returns true or false. My values are changing always due to that. How it is producing ture or false.

0 Kudos
Message 24 of 29
(1,174 Views)

@Darin.K wrote:

Ignorance and stupidity are two very different things. 


+1

 

0 Kudos
Message 25 of 29
(1,170 Views)

 


@shjukheter wrote:

Hi,

    Why some times "deletefrom array delete portion" returns true or false. My values are changing always due to that. How it is producing ture or false.


 

Delete from array is pulling off the sign bit from the 5-bit number.  The remaining 4-bits are converted to an unsigned int, and this value is negated when the sign bit is 1.

 

Is there a particular value that is not being converted as you expect?  If so let me know what the hex value is and what you expect the converted value to be.

0 Kudos
Message 26 of 29
(1,160 Views)

Hi,

       It is not working at all. There is some thing wrong at converstion. More, I need to round the value after calculation. I have checked with below values but it is not working even for before given value i.e. C34D--->3.3 Volts. It is working for only this value if i run the given VI with input string constant with C34D.

       In my program, I am reading ascii values then converting them to hex to your provided code for getting the value as 3.3 but it is not working(input voltage in the picture). You can see the below pictures.

       these are the examples values

                             CAA6--------> 5.3v

                             DA80-----------> 20

                             C34D-------->3.3

                             E367........> 54.43v

 

Also i am attaching one PPT and you can in that from 74 to 89 page for reference.

The five bit is always signed and its negative. may be i guess there is the problem.

 

More, when i am writing a value to the device, I should write in format which is at 77th slide second model. y=x*2(power of -N). Can you help me to write these code. See the below figure and please help me.

     Thank you.

0 Kudos
Message 27 of 29
(1,143 Views)

I forgot to attach the PPT. You can find here.

0 Kudos
Message 28 of 29
(1,136 Views)

Better late than never I suppose.  -8 was a fortuitous example, I should have guessed and the PDF showed that the numbers are stored as 2's complement which I just coded by hand.  This now shows two-way conversions.

 

 

0 Kudos
Message 29 of 29
(1,096 Views)