LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Real-Time Gait Sensor analysis using TCP

Good day,

Please note that the data received by the tcp read is in this format: 0.0,0.0,0.0,0.0,0.0,0.0,36.5. And the error 85 keeps showing up. Please help.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 
0 Kudos
Message 21 of 30
(526 Views)

Good day,

Please note that the data received by the tcp read is in this format: 0.0,0.0,0.0,0.0,0.0,0.0,36.5. And the error 85 keeps showing up. Please help.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 
0 Kudos
Message 22 of 30
(526 Views)

Does it show up all the time or intermittently? What does the error indicator display when you stop the loop after this error pops up?

 

I suspect the connection to the board is lost which will lead to an empty string that scan from string cannot parse. On the next iteration, TCP read will skip execution and you will get the same error over and over. You need to stop your loop automatically in that case. Use "Highlight Execution" to trace such problems. This VI stops the loop when an error occurs:

 

tcp server (receiver)tcp server (receiver)

 

To make sure the LabVIEW side is working correctly, create a VI that mimics the expected arduino behaviour. Array to spreadsheet string automatically appends CRLF on Windows.

tcp client (sender)tcp client (sender)

 

0 Kudos
Message 23 of 30
(505 Views)

The error shows up continuously. Which VI to use out of the two and where is the waveform chart function? Also I just need to build a simple VI that will take a string of 7 numbers separated by commas to display on one chart. 


 

0 Kudos
Message 24 of 30
(498 Views)

@StephenJohn wrote:

The error shows up continuously.


There is a connection problem. Stop the loop when an error occurs. You can use "or" to combine the error wire and the stop button value and wire them to the stop terminal.

 


@StephenJohn wrote:

Which VI to use out of the two and where is the waveform chart function?


The upper one. That is the server. It looks a lot like what you had before, only it stops when an error occurs.

The waveform chart is called "Data". It is still a waveform chart, it just has a different label.

 

The one on the bottom is a test client that does what your arduino program is supposed to do.

 

You can run the server, then the client and see the transmitted data in the waveform chart. This way you can check that the LabVIEW server works.

If you use the client with your version of the server, you can see what happens with the server when you stop the client.

 

The images are snippets. You can download them and drag them onto a block diagram where they transform into LabVIEW code.

0 Kudos
Message 25 of 30
(485 Views)

Do I place the client and server setup on one VI?

0 Kudos
Message 26 of 30
(467 Views)

Can you please help me to write an arduino code that allows a circuit consisting of esp8266, mpu6050, battery and oled to measure and display various gait parameters such as: Stride time, Stance time, Swing time, stride length, step length, Gait speed and Cadence?

0 Kudos
Message 27 of 30
(417 Views)

Can I just replicate the set up seven times to generate seven of the same multiplot waveform charts for seven identical circuits? 

0 Kudos
Message 28 of 30
(364 Views)

Can I replicate the server set-up seven times to display data from seven identical circuits simultaneously?

0 Kudos
Message 29 of 30
(328 Views)

You could use multiple servers on different ports, but then you would need to configure each of your clients to use those ports.

 

Alternatively, you need to expand the server to manage multiple connections.

 

There are multiple ways to do this. The example shipping with LabVIEW uses a state machine (Help>>Find Examples>>Networking>>TCP & UDP>>TCP Multiple Connections)

 

Here is a server that uses such a state machine and can accept multiple connections from the example client I posted before. It only accepts one connection per IP. See if you can make it work.

I put everything in one VI and one loop. You could have one VI listening for connections that launches a VI for each new connection. That would allow you to accept an "unlimited" number of connections. In the attached example, only three connections can be handled at a time (because there are only three graphs).

 

Sorry for the late reply, maybe this is still helpful for you.

0 Kudos
Message 30 of 30
(279 Views)