LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change programmatically the baud rate in the COM port

Hello everyone,

here is my application: i have a PC application designed with labview which communicates with an embedded board through UART, the embedded board is configured to support automatically any baud rate (9600, 4800.....).

My problem is how to make labview detect automatically the new baud rate when selecting in the panel (9600, 4800...) and send new COM configuration the embedded board?

I need and urgent help.

Best Regards.

0 Kudos
Message 1 of 8
(2,660 Views)

The only way that comes to my mind is trial & error. So send a command to the board and check for the correct response. Do that for any baud rate you want to test.

 

Cheers

Edgar

0 Kudos
Message 2 of 8
(2,637 Views)

As already stated, you need to go through each baud rate and check for a valid response.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 8
(2,624 Views)

thanks for your reply, in fact i should  place an event structure that detect any change in the Baud Rate and then send the command to the embedded side that detects then the new baud rate and send response to the PC application, then i should disconnect and connect with the new baud rate. is it right what i am saying ?

Best regards.

0 Kudos
Message 4 of 8
(2,621 Views)

I'm not sure what you mean by disconnect and connect.  You don't need to close and reopen the port.  You can just change the baud rate with a VISA property node.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 8
(2,618 Views)

ahh ok you mean that when i get my acknowldgment from th embedded side all i have to do is to change the baud rate with property node? and using the event structure is suitable solution for the problem ?

Thank you in advance

0 Kudos
Message 6 of 8
(2,616 Views)

I don't know which event you would wait for.

0 Kudos
Message 7 of 8
(2,613 Views)

i would wait for any change in the baud rate, i i detect a value changes there the event case will run take the new value of the baud rate send the command to the embedded side, when the PC application get the response i would set a proprety node for the new value of baud rate this is my scenario.

Best regards

0 Kudos
Message 8 of 8
(2,610 Views)