From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change stop bits in NI-VISA session

Trying to setup WinXP PC COM1 serial i/o w Labview 8.0, device works
fine in Hyperterm at 9600/8/n/1, but cannot get Labview VISA session to
set the stop bits to 1, it is stuck on 10 for stop bits, and returns
error BFFF001E if I try to set it to 1. Baud rate changes ok in VISA,
but not stop bits.

Any suggestions please

Message 1 of 5
(4,122 Views)
The stop bits inputs is an enum data type and a value of 10 corresponds to 1 stop bit. This is the default and you don't have to wire anything to it. Open the VISA Configure Serial Port VI and look at the front panel. See the default setting for stop bits. It is one. Right click on it and select Visible Items>Digital Display. This will show you the enum value when you select 1, 1.5, or 2 stop bits.
Message 2 of 5
(4,115 Views)

Thank you Dennis, then I have diffrent problem I think. OK here is what I am trying to do. I have a device for pulse width modulation (PWM) with serail communication. It works fine with hyperterminal. In hyperterminal, I have to enter %  on time  like 50 or 60. When I type the 50, it doesn't show the number, but once I hit the enter button; 50 % duty cycle is applied to device and device automatically sends back the % duty cyle, in my case 50. I am having trouble in operating this device with Labview. I tried diffenet examples available in Labview help like basic serial write and read.vi. This example doesn't give any errors but, the the PWM device doesn't work. I have tried loop back test with pins 2 and 3 shorted on serial cable and that works fine. So I don't understand why I am not able to communicate with device using labview. (I am going to put this problem in forums too).

Any suggestions on what I am missing. Reply would be greatly appreciated.

Message 3 of 5
(4,109 Views)
When you use Hyperterminal, it automatically append a CR and LF to the end of the text you type. Just like the people who write that program, you have to do the same thing in the LabVIEW code that you write. When you opened the Basic Serial Write and Read, did you not the \r\n characters at the end of the *IDN? text that was there? Did you leave these characters when you replaced the *IDN? with the command your instrument needs? If you didn't you should have. The \r and \n are the special control codes for CR and LF. A string control/constant in LabVIEW has to be set up correctly for the control codes to work. You write click on the control/constant and select '\' Codes Display.
Message 4 of 5
(4,104 Views)

Update to Dennis's helpful reply: As of LV2012, the input is a ring, not an enum. You can wire 0d10, 0d15, and 0d20 directly to the VI for selections of "1.0", "1.5", and "2.0". You can also create you own ring with these values or use the ring on the VI's front panel.

0 Kudos
Message 5 of 5
(3,101 Views)