Instrument Control (GPIB, Serial, VISA, IVI)

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

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

已解决!
转到解答

hello, is there a way i can change the baud rate of VISA Write/Read on the fly?

please let me know.

thanks

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

Hi,

 

There is a property node for setting (and reading) the baudrate setting.

 

Kees

0 项奖励
2 条消息(共 14 条)
7,171 次查看

do you mean, i can change the baud rate during the current program is running? i don't want to stop the program, just press a button and a new baud-rate is set!! is that possible?

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

Yes. Though the exact method depends on your architecture. What does your architecture look like? Do you have an event structure? State machine? Polling loop? Have you looked at the shipping examples to see how to respond to events?

0 项奖励
4 条消息(共 14 条)
7,155 次查看

You can change the baudrate on the fly.

 

I would never do that but it is possible.

 

An reinitialize of the COM port is a better solution I think.

 

 

Like Smercurio said tell us more about your program.

 

Kees

 

Baud Chg.png

0 项奖励
5 条消息(共 14 条)
7,153 次查看

@smercurio_fc wrote:

Yes. Though the exact method depends on your architecture. What does your architecture look like? Do you have an event structure? State machine? Polling loop? Have you looked at the shipping examples to see how to respond to events?


smercurio_fc, I would like to create a program in which the basic initialization to a uC(like sending clock, data download path, and commands which are 1-time only) would be send from LV at a lower baud (say 115k), and later on when i

@want to download data from uC into my cmputer, that would be done @ higher baud, 900k, or so... i would like to make this program event based, but i find event based programming difficult in LV, hence will simply poll the user-input.

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

@K C wrote:

You can change the baudrate on the fly.

 

I would never do that but it is possible.

WHY SO? DOES IT PRODUCE LOT OF ERRORS?

 

An reinitialize of the COM port is a better solution I think.

 WHAT KIND OF RE-INITIALIZE? LIKE USING A VISA CLOSE.vi , AND THEN CALLING VISA CONFIGURE SERIAL PORT.vi?

 

Like Smercurio said tell us more about your program.

 

Kees

 

Baud Chg.png


 

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

I tested this with my USB Com port. But I do not know if it works with every COM port.

Also I think you should flush Rx and TX buffers when changing the baudrate.

 

And using the Initialize COM port for this is just neather.

 

Kees

0 项奖励
8 条消息(共 14 条)
7,142 次查看

@CrackJack wrote:
 i would like to make this program event based, but i find event based programming difficult in LV, hence will simply poll the user-input.

 What exactly do you find difficult about it? It's quite easy. Have you looked at the shipping examples?

0 项奖励
9 条消息(共 14 条)
7,135 次查看

in previous programs, i had observed that the program used to get stuck if there is no event occuring and I had timing issues, but it has been a while that I haven't really tried event based programming, i kind of left event based alone~~~... but i will definately give it a shot now...

i did look at the examples... will try to implementusing the concepts mentioend..

thanks

 

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