Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA serial configuration

Solved!
Go to solution

Today I made a little program with VISA serial.

 

The device connecting to PC has a "COM4"  displayed in Windows device manager.

Right click on the "COM4" icon I can setup the Baudrate etc (9600 bit/sec; Databit 8 ; no parity; stopbit 1)

 

In the labview program, I made a different setup (9600bit/sec; Databit 7; Even parity; stopbit 2)

 

The data can still be correctly receivd.  Why is it lik that?

 

Can anybody give a little explanation on it?  Thanks in advance.

0 Kudos
Message 1 of 12
(6,329 Views)
You have to match the settings of the instrument. What is or is not displayed in device manager has nothing to do with what is supposed to be set for a program to communicate to the instrument. Windows device manager does not do any communication to what the com port is connected to.
0 Kudos
Message 2 of 12
(6,328 Views)

Thank you very much for the information.

 

May I have one more question?

 

Q: In the labview program I have already tried two setups: A. No parity, 8 databits, 2 stopbits      B. Even parity, 7 databits, 1 stopbit

 

The program worked both fine with two different setup.

 

How is that possible? (I asked because I also believe the program setup should be matching the device setup)

0 Kudos
Message 3 of 12
(6,313 Views)
Solution
Accepted by SergioMa
I don't know why it works. It shouldn't. What's the device?
0 Kudos
Message 4 of 12
(6,249 Views)
Solution
Accepted by SergioMa
if the device is sending data slowly it may match when even parity is correct then no parity does not perform the check. When the device has more then one bitperiod between two characters then two stopbits are ok just as one stopbit.
greetings from the Netherlands
0 Kudos
Message 5 of 12
(6,197 Views)
Solution
Accepted by SergioMa

Is YOUR device a true RS232 device?

Or is it a USB device with a provided driver that "appears" as a virtual COM port?

Do you have a single USB cable that goes from a USB connector on your computer to a USB connector on your device?

 

Just because your device driver creates a virtual COM port does not mean it is RS232.

 

If it is a purely USB device and is never converted to RS232 (like a lot of small cpu boards are) then the Baud Rate, Data Bits, Parity and Stop Bits have no effect. They have no function. The connection is defined by the USB protocol and the are no settings that you can change.

 

I have a similar device and the user manual clearly states that the Baud Rate does not matter. But the Flow Control Does. Set to NONE.

What does the user manual of your device say?

Omar
0 Kudos
Message 6 of 12
(6,128 Views)

I do thank you all for the assistances. Truely from my heart.

 

As you said, the device is just a "virtual com" displayed on windows "device manager". I don't know which protocol the device uses exactly for communication.

 

Can you anyhow give me some explanation why the data frame setup (stopbit number etc,) doesn't interfere the data exchange with the device of "virtual com" port?

0 Kudos
Message 7 of 12
(6,101 Views)
Your virtual com port needs to be connected to some sort of instrument. What is it?
0 Kudos
Message 8 of 12
(6,076 Views)

@SergioMa wrote:

The device connecting to PC has a "COM4"  displayed in Windows device manager.

...

I don't know which protocol the device uses exactly for communication.

...

Can you anyhow give me some explanation why the data frame setup (stopbit number etc,) doesn't interfere the data exchange with the device of "virtual com" port?


That is a question you need to ask the "device connecting to PC" manufacturer. I assume you had to install some type of device driver.

 

Protocol? Well its not RS232. It is what ever your device manufacturer decided to use in the device driver. It could be anything. We really do not care, as long as the device software driver works.

 

I am sure that the device software driver does not use the baud rate, data bit or stop bit. It ignores them.

 

Again, this is a question to ask the "device connecting to PC" manufacturer.

Omar
0 Kudos
Message 9 of 12
(6,061 Views)

It is a Lora device

0 Kudos
Message 10 of 12
(6,034 Views)