09-05-2017 11:37 AM - edited 09-05-2017 11:42 AM
I'm redoing the architecture of a program I have written and for my concept I'm seeing a weird behavior with a timed loop.
The Project File has two main VI, the ground station (server), and the Fligtht DAQ (client). The Flight DAQ will log data every 10 ms (timed loop) and every 1 second (every 100 iterations of the timed loop). The Data gets added to two different ques and then is sent to a subVI which writes the data via TCP to two different ports. The loop counter from the flight daq (temporary concept data) is displayed on the Ground Station front panel, (RT = 10ms data), (Test Data = 1 s data).
When running the program I observe that the Test Data increments every 100 loop iterations which equates to every second. However the RT Data increments very slowly and lags the Test Data. At first I thought it was an issue with the consumer loop so I added some "get que status" to indicate the number of the elements but the stack never grows so the consumer loop is just as fast as the producer loop. One thing I do notice is that when I stop the client, the RT data catches back up.
To troubleshoot the issue, I looked at the data going into my TCP write subVI and I noticed that the correct data is going into the subVI so I'm not sure why I'm not getting the correct output during runtime.
If anyone has any suggestions or ideas I would greatly appreciate it. To get this program to work, the Ground Station VI has to be running before the flight daq vi.
09-06-2017
06:59 PM
- last edited on
09-19-2025
04:10 PM
by
Content Cleaner
Thanks for the code. let us try it
Did you try to use the Execution Highlighting, the probe watch, and the breakpoint manager ?
https://www.ni.com/en/support/documentation/supplemental/12/debugging-techniques-in-labview.html
09-07-2017 08:15 AM
I did use typical debugging tools with the LV environment. Some observations I made.
1) The input to the TCP Write VI is correct, as it matches the loop counter.
2) The value is incorrect at the TCP Read VI, as the RT lags, (dependent on the Tes-Data, increment value)
3) I tried putting known values into the TCP Write VI, and when doing this I get the correct TCP Read values so I believe the conversion from a I32 to a byte string and then byte string to I32 is correct.
4) When stopping the Flight VI the RT data catches back up to its correct value.
09-07-2017 06:36 PM
Thanks
09-12-2017 10:38 AM
I run your code, but I have no advance with this. everything seems right.
09-13-2017 08:11 AM
Are you running the client and server on two separate computers? I have tried running it on two different computers, but the server and client always on the same pc, on both pcs I observed the issue. Maybe if your running on two separate computers its a NIC issue.
09-13-2017 09:32 AM
let me try.