LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP Data stream

Solved!
Go to solution

Hey people, I want to stream EMG Signals via TCP into Labview.

 

When I connect my hardware for the sensors, it shows the signals in the manufacturer software, so the hardware works fine.

In the manufacturer software you can look up the port, and in the manual it says it transfers the data via TCP.

 

So I tried via TCP port to input the data and show it in a graph, however the graph only shows me a flat line. When I write some random number in the port, it shows me an error. So that means the port is ok. The manufacturer software shows me the signals, so the hardware is also working.

 

I think the problem is in the data conversion or something, has anyone an idea how to fix this ?

 

I made screenshots of the blockdiagram and the user manual where the data type is discused.

thanks

 

lepina

 

EDIT: I added a screenshot with the diagram and probes. maybe it will help

Probes.png

Download All
0 Kudos
Message 1 of 43
(4,111 Views)

Hi lepina,

 

I think the problem is in the data conversion or something

Maybe…

Do you get any errors from TCPRead?

Which string do you receive? How does it look (in Hex display mode)?

 

You don't need this TimedWhileLoop, just remove it…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 43
(4,099 Views)

Hi Gerd, I uploaded a screenshot with probes in my first post.

0 Kudos
Message 3 of 43
(4,097 Views)

Hi lepina,

 

the screenshot doesn't answer (all) my questions…

Do you get any errors from TCPRead?

 

From the probes you can see the received string is empty. An empty string will give you "zeros" in the chart!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 43
(4,090 Views)

TCPRead shows me "No Error",

any idea where the problem could be ?

0 Kudos
Message 5 of 43
(4,087 Views)

@lepina wrote:

TCPRead shows me "No Error",


Are you sure?  You are currently not handling the error.  Since you are getting an empty string, I would expect to see a timeout error.


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 6 of 43
(4,066 Views)

How many bytes are you trying to read ? 

 

What is the protocol that your device is using? 

Do you have any manual for the device? 

0 Kudos
Message 7 of 43
(4,063 Views)

I hope that I connected the Error frame in the right way (sorry I work for only like 2 weeks in LabVIEW -_-)

 

Error.png

0 Kudos
Message 8 of 43
(4,062 Views)

According to the manual it sends data via TCP

I dont know how many bytes I want to send, my first goal is just to get the real time signal on a graph.

T Server manual.png

0 Kudos
Message 9 of 43
(4,059 Views)

TCP is only a transport layer, you need to know the protocol that your device is sending the data with. 

0 Kudos
Message 10 of 43
(4,049 Views)