LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA serial 125000 baud - Error -1073807330 occurred at Property Node (arg 2) in VISA Configure Serial Port

I am using LabVIEW 8.6 and I am having an issue with setting a serial port to baud 125000 when using the VISA serial VI to control a USB to Serial port.  This same port can be controled by a generic com port controller at 125000.

 

The error I am receiving is "Error -1073807330 occurred at Property Node (arg 2) in VISA Configure Serial Port".  I have found NI hardware that will run at this baud so I have to believe that if I have 3rd party hardware that will run at that baud that I should be able to set it to that baud.

 

Hopefully someone has seen this issue and can help me with this.

 

Thanks.

0 Kudos
Message 1 of 14
(4,356 Views)

More information:

 

When I stated a generic com port controller I am refering to a program that control the serial port.  I am currently using CRT but anyone that allows you to set the desired baud rate will work.  Hyper Terminal is an example of another program used to control serial ports but Hyper Terminal will not allow you to type in your desired baud rate, with it you can only use the bauds in the drop down box.

 

The serial port I am trying to control is a 3rd party USB to serial device.  The current one I am using is by SerialGear - USB 2 Port Serial BD-9 RS-232 Adapter with Prolific Chipset.  This device will run at baud 125000.

 

The issue is that when I run CRT with the SerialGear device I am able to communicate at baud 125000 but when I use NI with the SerialGear device I get an error when I try to communicate at baud 125000.

0 Kudos
Message 2 of 14
(4,350 Views)

Hello,

 

You may find this helpful in explaining the error, and if changing the baud rate doesn't solve it, then this may be something to try.

0 Kudos
Message 3 of 14
(4,336 Views)

Not sure if this will help.

 

Years ago I was trying to get a special serial interface to run at a high rate under LV. It turns out I had to specify one of the "normal" baud rate setting and it in turn picked its rate from its own list.

 

So...

 

You may wat to try all of the setting that work and use an intrument (tot test with ) or if all else fails break-out a O'scope and measure how long it takes to transmit a repeating pattern to find out what rate it is actually running at.

 

Like I dsaid, I don't know if that experience help you.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 14
(4,330 Views)

wiltdavi wrote:

The issue is that when I run CRT with the SerialGear device I am able to communicate at baud 125000 but when I use NI with the SerialGear device I get an error when I try to communicate at baud 125000.


On Windows, NI-VISA just passes the baud rate through to the serial driver, which will in turn decide if it is valid. That fact that your CRT application is working makes me think that it is not  really passing the 125000 rate down the driver.

 

In order to confirm this, I would recommend that you download Microsoft Portmon. When running Portmon, you will be able to capture the low-level calls made to your serial driver, so that you can determine how your CRT software is sending the baud rate request to the driver. Below I have included a screen capture of Portmon's output when trying to set a baud rate of 125000 through LabVIEW 8.6.1, on a standard built-in serial port.

 

You can clearly see the IOCTL_SERIAL_SET_BAUD_RATE that is sent to the driver, along with the INVALID_PARAMETER result. What you need to do is to perform a capture while running your CRT software to see if it is successfully setting it to 125000, or if CRT is actually coercing the baud rate to a known value, such as 115200.

 

You will also notice in my capture that the baud rate is set to 115200 twice. This is due to the default settings being applied when the port is opened, and restoring the default settings after the error occurs. It is really just the one in the red box that should interest you.

 

If you post a capture of opening the port with 125000 baud in CRT, I would be happy to look at it for you if you post it here. Ideally this would be a short capture of nothing but opening and configuring the port, without any extra data transfers included.

 

-Jason S.

 

 

 

 

0 Kudos
Message 5 of 14
(4,326 Views)

I have attached the traces from Portmon for both CRT and LabVIEW and neither of the traces show anything failing.

 

The LabVIEW trace was taken from running just the VISTA serial VI and even though nothing failed in the Portmon trace, the VI still displayed the error.

 

If you can see something from the Portmon traces that can explain this, please let me know.

 

Thanks again.

Download All
0 Kudos
Message 6 of 14
(4,316 Views)

That really surprises me, I had expected to see an error on the baud rate. Could you perform a capture using NI-Spy (Available in the Start Menu under National Instruments)? Start a capture with that, then run the LabVIEW VI, and then save and post the SPY capture. Please post the actual .spy file, so that we can open it up and view it using NI Spy. This should help us pinpoint which VISA call is failing.

 

-Jason S.

Message Edited by JasonS on 08-03-2009 01:35 PM
0 Kudos
Message 7 of 14
(4,305 Views)
Attached is the spy file.  I started the spy and then configured the VISA serial VI.  After it was configured I ran it once.
0 Kudos
Message 8 of 14
(4,298 Views)

Ok, I think I know what the problem is. I believe that NI-VISA is reading back the baud rate after setting it, to make sure that the driver is reporting the correct baud rate. I think that your driver is probably returning a different value than you actually set. This is probably because the serial port doesn't hit the exact baud rate, just something close to it. I suspect the driver is probably returning the calculated actual baud rate, instead of caching the value that you set.

 

To test this, I threw together a little VI that will query the Windows API directly, to tell you what the driver is reporting as the baud rate. It will first query the baud rate, then set the new baud rate, then query the baud rate again. Hopefully it will be something close to 125k. If the "Failed to set baud rate" indicator illuminates, then the driver completely rejected your baud rate, although I don't think that will happen based on the Portmon captures you have already performed.

 

Go ahead and try this out, just fill in the correct COM port name and the desired baud rate, then post back what the "Baud Rate After Setting" is.

 

-Jason S.

0 Kudos
Message 9 of 14
(4,267 Views)

Take a look here

http://digital.ni.com/public.nsf/allkb/BA0652D1E13DBBC58625649F006561C2 I think Jason is into something



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 10 of 14
(4,256 Views)