LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

conversion of hexadecimal file to decimal file in labview

Hi newbie,

 

have you noticed that little red dot? There's a reason for - and it will hurt your file reading results...

 

"find something what I really do not know what they are"

"Something" is not a really good error description. What's the exact problem? What do you expect? Any reference data?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 32
(1,930 Views)

@smercurio_fc wrote:

@newbieeng wrote:
the data is 16-bit unsigned. I wrote 16-byte wrongly. sorry for that.

Then simply change the data type from I16 to U16.


I attached the results. It comes out some numbers but I really do not know what forms in it and how to interpret this.

Egemen
0 Kudos
Message 12 of 32
(1,929 Views)

You can't just "guess" at this. You need to know exactly how the numbers are stored in the file, or know enough to be able to figure it out. If you do not know exactly, go back to the documentation or code for whatever wrote the file and look to see how the data is stored. Otherwise, you need to know what values to expect.

0 Kudos
Message 13 of 32
(1,925 Views)

@GerdW wrote:

Hi newbie,

 

have you noticed that little red dot? There's a reason for - and it will hurt your file reading results...

 

"find something what I really do not know what they are"

"Something" is not a really good error description. What's the exact problem? What do you expect? Any reference data?





@smercurio_fc wrote:

You can't just "guess" at this. You need to know exactly how the numbers are stored in the file, or know enough to be able to figure it out. If you do not know exactly, go back to the documentation or code for whatever wrote the file and look to see how the data is stored. Otherwise, you need to know what values to expect.


 

It is written in the manual that "The velocity files, which I am interested in this case, use an 8 byte union which contains a floating point velocity value and an integer channel number." The table in the manual is at below.

 

Egemen
0 Kudos
Message 14 of 32
(1,918 Views)

Hi newbie,

 

the one who is capable of reading a manual wins Smiley Wink

Or as is said in German: Wer lesen kann, ist klar im Vorteil 🙂

 

check.png

You really should try to understand what is going on in this little snippet!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 15 of 32
(1,913 Views)

Another solution that might be a little more self-documenting. 😄

 

Message 16 of 32
(1,907 Views)

@altenbach wrote:

Another solution that might be a little more self-documenting. 😄

 


@GerdW wrote:

Hi newbie,

 

the one who is capable of reading a manual wins :smileywink:

Or as is said in German: Wer lesen kann, ist klar im Vorteil :smileyhappy:

 

check.png

You really should try to understand what is going on in this little snippet!

Best regards,
GerdW


CLAD, using 2009SP1+ 2010SP1+LV2011SP1 on WinXP+Win7+cRIO
Kudos are welcome :smileywink:

 


I tried both of your suggestions and I got different results. I am trying to understand how to work it but it seems a little confusing. I really do not know what the program does. I attacthed results and the vi. it seems the results just show one result. where do I do wrong? Thanks your helps.

Egemen
Download All
0 Kudos
Message 17 of 32
(1,892 Views)

Hi newbie,

 

it's not enough to just label the cluster elements in Altenbachs example. You really have to set their datatype!

As you didn't do that your proposed "SGL" velocity in fact is a DBL - that screws up your file reading...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 32
(1,883 Views)

@GerdW wrote:

Hi newbie,

 

it's not enough to just label the cluster elements in Altenbachs example. You really have to set their datatype!

As you didn't do that your proposed "SGL" velocity in fact is a DBL - that screws up your file reading...


oh yes I forgot to change it. I changed and run the vi again. both of results are the same. you are right. but it seems there are a lot of values but they are all same. do you know any hex to dec editor to see the values to validate our vi? I really confused about it.

Egemen
0 Kudos
Message 19 of 32
(1,878 Views)

You can read your file as a plain string and set the string indicator to hex format. Your file is highly repetitive. 🙂

0 Kudos
Message 20 of 32
(1,868 Views)