From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

my visa's read buffer not working (picture attached)

Solved!
Go to solution

my visa is receiving this information "20;220;801.2" but neither the read buffer is showing the information and neither the substring is working so anyone have an idea about the problem?

0 Kudos
Message 1 of 8
(3,172 Views)

Do you think anyone can debug a picture? If your car is broken, do you show a photo of it to the mechanic? 🙂

Attach your vi...

0 Kudos
Message 2 of 8
(3,162 Views)

here is the vi thanks in advance 

0 Kudos
Message 3 of 8
(3,132 Views)

I strongly recommend you to take some LabVIEW tutorials, pay special attention to the State Machine, data flow and subVI design topics. The VI you attached is far from optimal design.

 

In parallel, you should make a test VI which only takes care of the serial communication. Before you even start to make this test VI, you really need to specify the device which you want to communicate with. Does it have a manual? Does it explain the used communication protocol? Using the "Bytes at Property" node for such communication is wrong in most cases!

0 Kudos
Message 4 of 8
(3,127 Views)

when i restarted the application it worked but the new problem is the first match pattern doesn't work properly as the before substring is not displayed while the after substring is displayed and working fine what is wrong with it?? 

 

0 Kudos
Message 5 of 8
(3,112 Views)
Solution
Accepted by topic author rihhs

You did not reply to any of my questions.

Are you sure the Visa Read always give you a string in the format of "20;220;801.2" ? Your problem might be also that the you read different string sometimes from your device. I repeat my question, can you specify the model / show the manual?

Regarding to your code, it is overly complicated, that is why I advised you to take some more tutorials/practice in LV. Instead of that many Match Pattern functions, you could get all the 3 values in one step (but be sure you always get this string, in this format!):

 

scanfromstring.png

0 Kudos
Message 6 of 8
(3,104 Views)

thanks it worked

0 Kudos
Message 7 of 8
(3,095 Views)

@Blokk wrote:

Regarding to your code, it is overly complicated, that is why I advised you to take some more tutorials/practice in LV. Instead of that many Match Pattern functions, you could get all the 3 values in one step (but be sure you always get this string, in this format!):

 


I would use the Speadsheet String To Array to allow more expandability.  But it does also depend on the format.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 8
(3,071 Views)