Showing results for 
Search instead for 
Did you mean: 

Read udp

Go to solution


I'm trying to read data udp, but I read:
- "Signal"
- ""
- "Signa2"
- ""
- "Signal"

instate each time.
I want to remove in the blanks, and let such that a string:
-signal, Signal2, signal3 ...
I have proven many things and can not find solution
Can somebody help me

Thank you.

0 Kudos
Message 1 of 22

Attach your VI so we can see how you are trying to do it.  Tell us more about what is sending the data via UDP>


What are you doing with the data?  Building a longer string (in which case empty strings don't matter)?  Or building into a string array?  Use a case structure that only executes what you are trying to do with the string is not empty, and does nothing when it is empty.

0 Kudos
Message 2 of 22

I want to process the three signals separately, but if I pick the entire chain blanks are left as 0, so that for each time value is 14 with value 0, reading the data with speed very rapidad if you try to read the value of data is always 0 and can not be used in any application.
I tried to interpolate values but did not say me either.
If you have any suggestions I thank you very much 🙂
Thank you

0 Kudos
Message 3 of 22

So do you have a UDP question here?  Or a question on how to parse string data?  Your last message makes it sound like the latter.


Put an indicator on the output of your Read UDP.  Run Block diagram cleanup.  You have a few wires there that make it hard to tell what part of the functions they attach to.

Run your VI so that you get data in your indicators.  Stop your VI.  Hit Edit, Make Current Values Default.  Save your VI then attach that.


Right now you haven't provided us any information as to what the incoming data looks like.

0 Kudos
Message 4 of 22

It is a problem of how to read the information provided me the UDP connection, but if there is any way unrelated to serious UDP valid.
In the picture the data received in an instant of time shown, I put the chart to see more moments.
the data would be.
"Running 1"
"SourceTime 1651"
"Other data"
"Signal (0,0)"
"Signal (1,0)"
"Signal (2.0)"
And here again repeat the message

Somehow I've managed maintaining the value of the variable using a comparison> 0 but the problem with this method is that if 100 and the following value is 0 (the data is 0) this is 100, so the method is not very practical. (For this, extra solution of UDP).
I hope I esplicado.
Thank you very much.

0 Kudos
Message 5 of 22

This is about as helpful as a screen shot of text-based code.  Upload the VI itself!

(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 22
attachment VI
0 Kudos
Message 7 of 22
attachment VI
0 Kudos
Message 8 of 22
Could you please explain these questions:
-Why are you using of Timed loop instead of normal while loop?
-How do you stop the vi? By Abort Execution? If it is please avoid doing that and connect a boolean control to the loop condition.
-Just press Ctrl+U to clean up the Block diagram.

-Tell us what is the value you get in data out terminal of UDP read?
-What is the value you want to see in Output2, 3 4 and Value Output2,3 and 3(Yes both have same name)?
0 Kudos
Message 9 of 22

What is sending the data?  Is it another LabVIEW program?  Can you change the way the data is being sent?

I don't see how you get any data out.  According to your description, you get different lines, separated by empty strings.  If you get an empty string, that is easy enough to detect and discard and do nothing.


When you get different strings, Signal(2,0) vs. Signal (1,0), that is easy enough to detect, feed into a case structure and handle each string accordingly.  But your search functions make no sense.  You get a string (but we don't know exactly what it says because you didn't save data as default and send it along). You say it is like it shows in your message.  You get a line that says Signal(2,0).  You search/split string there and return it and what is after.  But your data doesn't have anything after that.  How do you get numbers in your graph when they aren't showing up in your UDP read?

0 Kudos
Message 10 of 22