LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

selecting particular data after visa read is done.

Solved!
Go to solution

hello everyone,

Can i select the particular  data after visa read and mask other output data?

0 Kudos
Message 1 of 15
(1,115 Views)

Hi jeet,

 


@jeet4230 wrote:

Can i select the particular  data after visa read and mask other output data?


Yes.

 

(This usually is called "parsing". You need to apply the rules given in the manual of your device.)

Best regards,
GerdW


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

hello thank you for quick reply.

As attached in the image i want to neglect 1A and OK from this output data and want to select only the 042D. how is is possible.??

 

0 Kudos
Message 3 of 15
(1,093 Views)

Hi jeet,

 


@jeet4230 wrote:

As attached in the image i want to neglect 1A and OK from this output data and want to select only the 042D. how is is possible.??


Use ScanFromString with a formatstring of %2s%4s and use the 2nd output.

When the desired part is a hex-formatted number you can also use %2s%04x instead…

Best regards,
GerdW


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

I did not get you actually. can you explain in detail if possible. or with example

Thank you

0 Kudos
Message 5 of 15
(1,075 Views)

Hi jeet,

 


@jeet4230 wrote:

I did not get you actually.


When you don't know how to use ScanFromString function you should take the LabVIEW basics/tutorials offered at the top of the LabVIEW board…

 

Use ScanFromString with a proper format string:

Best regards,
GerdW


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

Thanks. i will go through scan function. Moreover  As this function is for scan. my sensors values are going to change. this will applicable for every hex value which is going to change? i want to  neglect 2 LSB's in hex output and all the raw data such "ok" .

 

Looking forward for help.

thank you

0 Kudos
Message 7 of 15
(1,045 Views)

Hi jeet,

 


@jeet4230 wrote:

As this function is for scan. my sensors values are going to change. this will applicable for every hex value which is going to change?


As long as the format stays constant the ScanFromString will correctly parse your string.

That's the point of a "fixed format"…

 


@jeet4230 wrote:

i want to  neglect 2 LSB's in hex output and all the raw data such "ok" .


What are "2LSBs in hex output"? I only know of LeastSignificantBits in bytes/words…

What is "least significant" in your string of chars?

The "ok" (or "OK" in your image) is already omitted in my example, it should appear in the "remaining string" output of SfS…

Best regards,
GerdW


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

Im attaching  the new image in here. So in this i want to remove all the data such as A -trans -crc b800, 1A(in hex number), Ok, SIC-CLI. overall all i just want to select 042B in the the whole image.  and olny 042B will change after every sensor output others will remain same. do you have any idea how to do it?

:here LSB are 1A

 

Thank you for helping me out

0 Kudos
Message 9 of 15
(1,033 Views)

Hi jeet,

 


@jeet4230 wrote:

So in this i want to remove all the data such as A -trans -crc b800, 1A(in hex number), Ok, SIC-CLI. overall all i just want to select 042B in the the whole image.  and 1A042B will change after every sensor output others will reamin same. do you have any idea how to do it?


What is the communication protocol with your device?

When does it send those data?

Is there some trigger/request for each of those lines?

Does the line of interest ALWAYS start with "1A"? In case it does not: is there a better format description for those two bytes?

 

You really need to learn to supply all the information needed to answer your questions!

Now you completely changed the problem from a fixed format string to a completely different kind of string…

 

You already got the very same question in your other thread: Please supply a full specification of your communication protocol!

Why does your µC answer with such a lot of garbage when you just request some data?

Best regards,
GerdW


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