LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Parity Issues with VISA Read

NI has added the ability to disable the data masking on error in NI-VISA 3.4.1.  For the specifics on how to disable it contact NI because I am not sure how they will work this configurable option into their final NI Serial Driver.  This also would be helpful to those doing 9-bit serial.  Just guess if the 9th bit (aka parity) is Mark or Space and if you get an error, replace the bit with the other choice.

NI has stepped up and made their driver more usable so I Thank them for doing what is good for all of us.

Matt

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
Message 11 of 19
(4,061 Views)

Hello,

I would like to know where did you find this information because I didn't find anything about that in the Readme file of NI-VISA 3.4.1.

Thank you in advance.

Benjamin

0 Kudos
Message 12 of 19
(4,033 Views)

This is the method that is required for version 3.4.1.  I believe they plan to better integrate this feature in future releases of the serial driver.  You will still get the parity error but the character will not be masked with 0x00.

Matt 

To disable the parity error replacement please make the following addition to the specified location of the visaconf.ini file that is installed at C:\VXIPNP\WinNT\NIvisa.

[ASRL-RSRC-ALIAS]

DisableErrorReplacement=1

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
Message 13 of 19
(4,009 Views)

I realize it's been several years, but do you know if this still works.  I have VISA 4.4.1 installed, and have tried adding your entry to the visaconf.ini in:

 

C:\Program Files\IVI Foundation\VISA\WinNT\NIvisa

 

and

 

 C:\Program Files\National Instruments\RT Images\NI-VISA\4.4

 

to no avail.  I saw the [ASRL-RSRC-ALIAS] section in visaconf718f.ini in C:\Program Files\National Instruments\RT Images\NI-VISA\4.4 and added the entry there and no luck as well.
0 Kudos
Message 14 of 19
(3,490 Views)
Thanks to Tyler from NI who helped me determine the proper location to use.  The entry is valid, I just used the wrong visaconf.ini file.  The correct file is located at
(<Documents and Settings>\All Users\Application Data\National Instruments\NIvisa.  Adding the following info will disable the error replacement and give the data seen by the serial prot:

 [ASRL-RSRC-ALIAS]
DisableErrorReplacement=1
0 Kudos
Message 15 of 19
(3,451 Views)

thanks to your Serial Parity Issues with VISA Read, I had settled the problems, and had added [ASRL-RSRC-ALIAS] DisableErrorReplacement=1
 to visaconf.ini file.The issues have resolved.

 

But when I make a Installer with VISA,then install in another PC, I find  visaconf.ini file dosen't have
 [ASRL-RSRC-ALIAS]
DisableErrorReplacement=1
.How do I?thanks

 

0 Kudos
Message 16 of 19
(3,279 Views)

You will need to add some code to your program to add the INI setting to the file when it starts.  I'm actually checking to see if it is present when I start.  If it is, then I do nothing.  If it is not, then I add it and at the end of my porgram, I remove the setting, so that everything worked as before the program ran.  If you are not worried about it, then you can just add it when the program starts.  If it is already there, nothing will really change.  If it is not, then it will be added.

 

If you don't want to do it everytime, then write a little program that sets it that runs after you run the installer for your program.

0 Kudos
Message 17 of 19
(3,268 Views)

(*^__^*) ,thank you for your help

0 Kudos
Message 18 of 19
(3,251 Views)

I've got a very similar problem to the one above - finally solved the 9th bit problem using "DisableErrorReplacement=1" in the ini file, but when I make an installer and install on a 2nd PC, comms doesn't work. I've changed the ini file on the 2nd PC to include "DisableErrorReplacement=1", but still no joy.

 

I do have the added complication that my LabVIEW code is written in LabVIEW 2009, but our application builder is only licenced for our 8.2 version of LabVIEW. Hence to make my installer, I have to save my VI as version 8.2, then put these files on the PC with version 8.2 and the application builder, before finally creating my installer.

 

As luck would have it the 2 PCs with versions 2009 and 8.2 on them are in different buildings on our site, so if someone has a solution to prevent me from doing a LOT of walking as I try to work it out then I'd be very grateful!

 

Cheers,

Matt 

0 Kudos
Message 19 of 19
(3,066 Views)