02-08-2024 12:58 AM
I am continuously receiving an ascii string from the Visa read i want to convert it to a hexadecimal. In this i want to start store from some hex like 5A if i found 5A in the string i need to store 5A along with the next 10 string characters to an array if i again found that 5A i need to start store along with the next upcoming 10 string characters. I anyone have some solution on this kindly help me to solve this
02-08-2024 02:15 AM - edited 02-08-2024 02:16 AM
Hi Rajsakthi,
@Rajsakthi wrote:
In this i want to start store from some hex like 5A if i found 5A in the string i need to store 5A along with the next 10 string characters to an array
What have you tried and where are you stuck?
What's the problem to search for a char inside a string and to take a StringSubset?
02-08-2024 02:41 AM
can you please guide me to achieve continuous ascii string to convert to hex string.
02-08-2024 03:17 AM
I need the substring as 5A A5 2B 00 D1 FF 2F 95 30 6C
02-08-2024 03:21 AM
Hi Raj,
mind to share your VI with same real data in the frontpanel elements set as default value?
We cannot debug/edit/run images in LabVIEW!
(Please downconvert (File->Save for previous) to an older LabVIEW version when you use a recent one. I prefer LV2019.)
02-08-2024 03:23 AM
i am using labview version 2015 will it supports to you.
02-08-2024 03:30 AM
I am in working place so it is not possible to share the file.
02-08-2024 04:16 AM
Hi Raj,
@Rajsakthi wrote:
I am in working place so it is not possible to share the file.
So you need to debug on your own...
Why do you even convert to hex-formatted string instead uf using the byte array delivered by VISARead? No need for this conversion (at this time)!
Use StringToU8Array and Search1DArray to search for 0x5A (=0d90), then use ArraySubset to get your data...
02-08-2024 04:27 AM
Assuming you already have your data as a numeric array. Just search for the value you want with Search 1D Array. For the next value, start from next index after your array.
02-08-2024 04:35 AM
Can you please share this as a VI file.