Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Solved!
Go to solution

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 Kudos
Message 1 of 14
(7,021 Views)

Hi,

 

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

 

Kees

0 Kudos
Message 2 of 14
(7,015 Views)

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 Kudos
Message 3 of 14
(7,006 Views)

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 Kudos
Message 4 of 14
(6,999 Views)

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 Kudos
Message 5 of 14
(6,997 Views)

@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 Kudos
Message 6 of 14
(6,990 Views)

@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 Kudos
Message 7 of 14
(6,989 Views)

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 Kudos
Message 8 of 14
(6,986 Views)

@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 Kudos
Message 9 of 14
(6,979 Views)

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 Kudos
Message 10 of 14
(6,974 Views)