LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Read data conversion

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 2
(90 Views)

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 2
(51 Views)