12-07-2016 10:12 PM
Hi,
This is my first time posting so forgive me if this is a repeat, but I have been searching for hours and cannot find the answer on here. So here goes...
I have a VI which has been working to receive data via UDP from an FPGA and write the data to a text file. The issue is that the program only writes every other packet. For instance, I can set the FPGA to send 20 packets and then I see all 20 on wireshark, but only 10 are written to the text file from LabView. When I check the contents of the packets it is every other packet not the first or last 10 or something like that. I have run this at many different speeds all the way down to 16 packets per second (which is really slow since the packets are only 32 bytes), and the result is always the same. There must be something wrong with how the VI is set up, but I can't for the life of me figure it out. Previous versions of this VI did not have this issue, but when I attempt to revert to a version I know worked, it now does the same thing.
I have attached a version that only reads one parameter, a timer, in the hopes that I have made some obvious newbie mistake. Please have a look. Any help is much appreciated.
Thanks!
12-07-2016 11:34 PM
Yes, terhea re quite a few very "unisial" code parts.
12-07-2016 11:53 PM - edited 12-07-2016 11:53 PM
As an example, here's how you flatten a U16 to a string and how to do it correctly.
(Your method above and the right way below. Arguably much simpler :D)
I think your entire code could be reduced to the size of a postage stamp.
12-08-2016 12:22 AM - edited 12-08-2016 12:23 AM
Similarly, here's how to convert a four character string to the timer(us) value. Both codes give identical results!