02-02-2015 07:54 AM
I just did some major cleaning up of your code. The major changes were to make an event for handling each of your commands. A Timeout event was added to do the reading of oscilloscope data, an Array Value Change event was added for sending the switch data, and a Stop Button Value Change event was added for stopping the main loop.
02-02-2015 11:45 AM
Now the explaination.
when run nothing would happen until an event fired. then the case structure took over but no events will be processed until the while loop completed. which won't happen until you change the tab. the code isn't "Bad" but very strangely constructed.
02-03-2015 04:06 AM
Thanks for Help...Still i want to know what was problem in my previous code??
02-03-2015 07:17 AM
@piZviZ wrote:
Thanks for Help...Still i want to know what was problem in my previous code??
Bad architecture. Likely race conditions due to the use of local variables. Sending data through the serial port even though nothing changed (this is most likely your culprit).