LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

close and reopen serial port with other baud rate

Hi LabVIEWers,
 
In my project I have to send a kind of kernel to a device, via RS232 with 19200 baud.
Then I have to start the kernel (sending an ´S´ to the device, still with 19200 baud.
After this point I have to change the baudrate to 115200, and with this baudrate continue the communication. After speed change I send a "P" character to the device (a kind of ping), and the device should respond with 0x55. Normally this vi doesn´t work. BUT....
...if I set a breakpoint before the speedchange -> start the vi and wait until it comes to the breakpoint -> click CONTINUE on toolbar, ans IT WORKS! When I remove the breakpoint, it doesn´t work. I have tested this 100 times, this is reproducable.
 
I already tried to insert a wait instead of the breakpoint, but it doesn´t help.
 
What should be the problem?
 
regards
MB
0 Kudos
Message 1 of 4
(3,194 Views)
HI MB!
   I've tried to do what you want, with a silly example, and it seems to work.  I don't know if the problem is in the external device, or in VISA settings....  I think it can be worth to post your code.  I have LV 7.1, so please, post a backcompatible version, or just post an image, thanks!

graziano
0 Kudos
Message 2 of 4
(3,190 Views)
It seems likely to me that you have a race condition and that your wait does not work like you think it does. I would also suggest uploading the code.
Also, which versions of LV and VISA are you using?

___________________
Try to take over the world!
0 Kudos
Message 3 of 4
(3,169 Views)
interlinked
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 4 of 4
(3,166 Views)