From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Parcing data from uC

Solved!
Go to solution

I am using this VI that i found in a different similar post here and i am still having some issues with it. I am sending this from a microcontroller: b,3.9998752,9.5648515 and i want to use a different indicator for each of them. I am sure i am missing something as i am new to LV. Any ideas?

thanks

0 Kudos
Message 1 of 7
(2,796 Views)

1. You actually do not need that 0ms wait in the loop.  You already have a wait in there.

2. Your format string should actually be "%[^,],%f,%f".  The %s will continue until a white space.  So your first parameter (the string) is actually grabbing all of the data.  By using %[^,], you are getting all characters until a comma is found.


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 2 of 7
(2,787 Views)

 

 

Thanks for the help. I changed the format but i still have the same issue. The input string is b,3.9989767 for example, but there are no outputs after that.ff.png

0 Kudos
Message 3 of 7
(2,766 Views)

Hi gilette,

 

your input string "b,3.9989767" gives the expected results as described before by crossrulz.

Maybe your read string contains some more chars? Why not switch its display mode to \-Code display?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 7
(2,759 Views)

Are you getting an error out of the VISA Read?  That is the only thing that makes any remote sense at all.


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
0 Kudos
Message 5 of 7
(2,757 Views)

I changed the display mode but had the same results. I am having an error as crossrulz pointed out however.

 

csa.png

0 Kudos
Message 6 of 7
(2,750 Views)
Solution
Accepted by topic author gillettestm32

I searched online for this exact error and found this that solved my problems. I added \r\n to the string that is transmitted. Thanks everyone for helping.cssccs.png

 

 

0 Kudos
Message 7 of 7
(2,695 Views)