LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Baud Rate Change with VISA

Hello,
I'm using LabView to controll a spektrometer through the serial port. I
use VISA for the communication with the device. Unfortunately, the
device is always in 9600baud mode after power on. So I have to change
the baud-rate each time by a command i send to the device. So I open a
VISA session in 9600 mode and communicate with the divice to set it to
57600baud. After that, i have to reset my local serial port to the same
baud-rate. I do this with an property-node, where i change 'Serial Baud
Rate'.
Unfortunately, after I did this, the vi's that want to communicate after
the reset of the baud-rate stop with an error:
-1073807298
VI_ERROR_IO
Could not perform read/write operation because of I/O error.

(I try to write to the s
erial port after change of the baud-rate)

I would be very glad, if someone could give me an advice, why it doesn't
work, or how to make it work.
Thank you a lot.
Matthias
0 Kudos
Message 1 of 3
(3,488 Views)
Matthias Müller writes:

> Hello,
> I'm using LabView to controll a spektrometer through the serial port. I
> use VISA for the communication with the device. Unfortunately, the
> device is always in 9600baud mode after power on. So I have to change
> the baud-rate each time by a command i send to the device. So I open a
> VISA session in 9600 mode and communicate with the divice to set it to
> 57600baud. After that, i have to reset my local serial port to the same
> baud-rate. I do this with an property-node, where i change 'Serial Baud
> Rate'.
> Unfortunately, after I did this, the vi's that want to communicate after
> the reset of the baud-rate stop with an error:
> -1073807298
> VI_ERROR_IO
> Could not perform read/write operation
because of I/O error.
>
> (I try to write to the serial port after change of the baud-rate)
>
> I would be very glad, if someone could give me an advice, why it doesn't
> work, or how to make it work.
> Thank you a lot.
> Matthias

Matthias,

my first approach would be to close the first VISA session after the
property node. Data dependency is achieved by the error cluster feed
into a new session with the new properties.

IMHO you've discovered another bug in serial VISA.

HTH,

Johannes Nieß

P.S:What brand/modell of spectrometer are you programming for?
0 Kudos
Message 2 of 3
(3,488 Views)
Hello,
I got it now :))
I tried first to close the session and and open a new one with the new
properties. But trying to open a new one always ended in a program error
of LabView and it closed with somekind of windows error (don't we all
know them!?). So I tried something else. My spectrometer (a ccd-array
spektrometer from LASER2000 with 2048 pixels) just uses a serial-port,
so i changed the VISA-Session-Node to 'Serial Instr'. This was all, and
now I can switch the baudrate with the property node very well 🙂
So thank you for your advice anyway.
Matthias

Johannes Niess wrote:

>
> Matthias,
>
> my first approach would be to close the first VISA session after the
> property node. Data dependency is achieved by the error cluster feed
> into a new session
with the new properties.
>
> IMHO you've discovered another bug in serial VISA.
>
> HTH,
>
> Johannes Nieß
>
> P.S:What brand/modell of spectrometer are you programming for?
0 Kudos
Message 3 of 3
(3,488 Views)