ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Read data conversion

Solved!
Go to solution

Hi everyone,

 

On my display, when I select Hex, I get:
322D 3256 2D12 0123 43B1 4532 1234 8721 3215 6543 0F01.

However, in my Excel file, I have the raw characters sent by VISA Read.

I would like to have something readable in my Excel file. I’ve been advised to convert the string into a byte array, then reconstruct the numbers, and finally get an array of numbers.

Isn’t there a faster method, please?

0 Kudos
Message 1 of 3
(254 Views)
Solution
Accepted by topic author Fredo123Danzel

Hi Fredo,

 


@Fredo123Danzel wrote:

On my display, when I select Hex, I get:
322D 3256 2D12 0123 43B1 4532 1234 8721 3215 6543 0F01.

However, in my Excel file, I have the raw characters sent by VISA Read.


Because you only change the "display style", but not the underlying data!

 


@Fredo123Danzel wrote:

I would like to have something readable in my Excel file. I’ve been advised to convert the string into a byte array, then reconstruct the numbers, and finally get an array of numbers.

Isn’t there a faster method, please?


Please define "faster"!

 

Is this ok for you?

 

Edit: I forgot to set the minimum width at the ToHexString function…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(215 Views)
Solution
Accepted by topic author Fredo123Danzel

Hello Knight of NI,

 

Thank you very much for your response.

It helped me resolve my problem.

 

Kind regards

0 Kudos
Message 3 of 3
(126 Views)