Instrument Control (GPIB, Serial, VISA, IVI)

取消
显示结果 
搜索替代 
您的意思是: 

how to change BAUD Rate dynamically using visa without stopping the program?

已解决!
转到解答

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.

Now on LabVIEW 10.0 on Win7
0 项奖励
11 条消息(共 14 条)
1,730 次查看
解答
已被主题作者 LV_Enthu 接受

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.

0 项奖励
12 条消息(共 14 条)
1,721 次查看

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?

Now on LabVIEW 10.0 on Win7
0 项奖励
13 条消息(共 14 条)
1,713 次查看

figured the prob.. was in lv code..

 

Now on LabVIEW 10.0 on Win7
0 项奖励
14 条消息(共 14 条)
1,706 次查看