07-07-2011 10:37 AM
hello all, i tried to change the baud rate dynamically, and have a weird problem, the code run fine when i execute the uC code with break=points, however, when i remove the breakpoints from uC, LV fails to understand the '@' character which marks the start of data stream and thus, doesn't save the data... what could be the issue? attached are same vi in lv10 and lv8 versions.
07-07-2011 01:08 PM
When something works in highlight mode but doesn't work in regular mode it means you have a timing issue. You are reading data right after configuring. How do you know data is there? Flush the serial port buffer before reconfiguring it. You may also need to flush it afterwards. Put a small delay after the configuration. Try things.
07-08-2011 12:38 PM
i changed the vi, basically i introduced a while loop after the re-configuration of the baud rate and things seem to work well, however, another problem...
i am transferring data from uC to PC which will be like 1GB or so... when i have the counter in uC range from 0-1024, labview simply fails to detect the '@' value and thus, never saves the data... i have declared this counter variable as unsigned int in uC, so, the counter can go upto 2^16 ...
i am wondering what happens when i change the counter value from 1023 to 1024 and labview just hangs... 1024 = 2^10 ... anything wrong with labview?
also, this same code works great when i don't change the baud rate... i.e. if i have a constant baud rate, i could save 1GB of data...
what could be wrong?
07-08-2011 01:58 PM
figured the prob.. was in lv code..