Jump to content

VISA Resource Name Control Hangs\Crashes LabVIEW


JPrevost

Recommended Posts

Every once in a while I get an error in my program when in develop mode. The program has a VISA resource name control on a tab and the error happens when I've been working elsewhere and then click on the tab containing the VISA control. The whole computer hangs up a little the first time I try and go to the configure tab. I have a feeling that LabView is looking at the avail resource names to display for the user and this is why it hangs up. Is there a way to have LabView poll the resources on application startup and not when the control becomes visible?

The error;

nimax.exe - Application Error

The instruction at "0x1ca12b95" referenced memory at "0x00000000". The memory could not be "read".

Click on OK to terminate the program.

Clicking on OK doesn't terminate labview but the NIMax.exe process gets closed. Do I need this or what? The program runs fine without it so I'm not sure what is going on.

Link to comment
There is a file here:

C:\VXIPNP\WinNT\NIvisa\visaconf.ini

That file has a bunch of comments and allows you to comment out unused interfaces. That may solve your problem.

What should I do to speed things up? I'm only using com ports 1-4. I don't plan on using anything but the serial port. It's funny you mention this file. I was here last week to create the alias naming after a beta tester said they didn't like the name of the com ports being all "fancy shmancy."

My file contains;

[VISA-CONFIG]MinAsyncCount = 512SharedMemSize = 131072MaxNumResources = 256NumSystemSems = 512NumProcessSems = 256AlwaysRefresh = 0UnloadPassports = 0[GPIB-CONFIG]DisableIbListen = 0SRQPollTime = 500EnetConnectTmoSec = 6Board0 = 1Board1 = 1Board2 = 1Board3 = 1Board4 = 1Board5 = 1Board6 = 1Board7 = 1Board8 = 1Board9 = 1Board10 = 1Board11 = 1Board12 = 1Board13 = 1Board14 = 1Board15 = 1Board16 = 1Board17 = 1Board18 = 1Board19 = 1Board20 = 1Board21 = 1Board22 = 1Board23 = 1Board24 = 1Board25 = 1Board26 = 1Board27 = 1Board28 = 1Board29 = 1Board30 = 1Board31 = 1Board32 = 1Board33 = 1Board34 = 1Board35 = 1Board36 = 1Board37 = 1Board38 = 1Board39 = 1Board40 = 1Board41 = 1Board42 = 1Board43 = 1Board44 = 1Board45 = 1Board46 = 1Board47 = 1Board48 = 1Board49 = 1Board50 = 1Board51 = 1Board52 = 1Board53 = 1Board54 = 1Board55 = 1Board56 = 1Board57 = 1Board58 = 1Board59 = 1Board60 = 1Board61 = 1Board62 = 1Board63 = 1Board64 = 1Board65 = 1Board66 = 1Board67 = 1Board68 = 1Board69 = 1Board70 = 1Board71 = 1Board72 = 1Board73 = 1Board74 = 1Board75 = 1Board76 = 1Board77 = 1Board78 = 1Board79 = 1Board80 = 1Board81 = 1Board82 = 1Board83 = 1Board84 = 1Board85 = 1Board86 = 1Board87 = 1Board88 = 1Board89 = 1Board90 = 1Board91 = 1Board92 = 1Board93 = 1Board94 = 1Board95 = 1Board96 = 1Board97 = 1Board98 = 1Board99 = 1[GPIB-VXI-CONFIG]StartDebug = 0DisableAutoFind = 0RetryAfterFailure = 1[TULIP-CONFIG]UseAgilentVisa = 1NativeTypesOnly = 1SynchronizeAllVxi = 0SynchronizeAllGpib = 1Interface0 = 1Interface1 = 1Interface2 = 1Interface3 = 1Interface4 = 1Interface5 = 1Interface6 = 1Interface7 = 1Interface8 = 1Interface9 = 1Interface10 = 1Interface11 = 1Interface12 = 1Interface13 = 1Interface14 = 1Interface15 = 1Interface16 = 1Interface17 = 1Interface18 = 1Interface19 = 1Interface20 = 1Interface21 = 1Interface22 = 1Interface23 = 1Interface24 = 1Interface25 = 1Interface26 = 1Interface27 = 1Interface28 = 1Interface29 = 1Interface30 = 1Interface31 = 1Interface32 = 1Interface33 = 1Interface34 = 1Interface35 = 1Interface36 = 1Interface37 = 1Interface38 = 1Interface39 = 1Interface40 = 1Interface41 = 1Interface42 = 1Interface43 = 1Interface44 = 1Interface45 = 1Interface46 = 1Interface47 = 1Interface48 = 1Interface49 = 1Interface50 = 1Interface51 = 1Interface52 = 1Interface53 = 1Interface54 = 1Interface55 = 1Interface56 = 1Interface57 = 1Interface58 = 1Interface59 = 1Interface60 = 1Interface61 = 1Interface62 = 1Interface63 = 1Interface64 = 1Interface65 = 1Interface66 = 1Interface67 = 1Interface68 = 1Interface69 = 1Interface70 = 1Interface71 = 1Interface72 = 1Interface73 = 1Interface74 = 1Interface75 = 1Interface76 = 1Interface77 = 1Interface78 = 1Interface79 = 1Interface80 = 1Interface81 = 1Interface82 = 1Interface83 = 1Interface84 = 1Interface85 = 1Interface86 = 1Interface87 = 1Interface88 = 1Interface89 = 1Interface90 = 1Interface91 = 1Interface92 = 1Interface93 = 1Interface94 = 1Interface95 = 1Interface96 = 1Interface97 = 1Interface98 = 1Interface99 = 1Interface100 = 1Interface101 = 1Interface102 = 1Interface103 = 1Interface104 = 1Interface105 = 1Interface106 = 1Interface107 = 1Interface108 = 1Interface109 = 1Interface110 = 1Interface111 = 1Interface112 = 1Interface113 = 1Interface114 = 1Interface115 = 1Interface116 = 1Interface117 = 1Interface118 = 1Interface119 = 1Interface120 = 1Interface121 = 1Interface122 = 1Interface123 = 1Interface124 = 1Interface125 = 1Interface126 = 1Interface127 = 1Interface128 = 1Interface129 = 1Interface130 = 1Interface131 = 1Interface132 = 1Interface133 = 1Interface134 = 1Interface135 = 1Interface136 = 1Interface137 = 1Interface138 = 1Interface139 = 1Interface140 = 1Interface141 = 1Interface142 = 1Interface143 = 1Interface144 = 1Interface145 = 1Interface146 = 1Interface147 = 1Interface148 = 1Interface149 = 1Interface150 = 1Interface151 = 1Interface152 = 1Interface153 = 1Interface154 = 1Interface155 = 1Interface156 = 1Interface157 = 1Interface158 = 1Interface159 = 1Interface160 = 1Interface161 = 1Interface162 = 1Interface163 = 1Interface164 = 1Interface165 = 1Interface166 = 1Interface167 = 1Interface168 = 1Interface169 = 1Interface170 = 1Interface171 = 1Interface172 = 1Interface173 = 1Interface174 = 1Interface175 = 1Interface176 = 1Interface177 = 1Interface178 = 1Interface179 = 1Interface180 = 1Interface181 = 1Interface182 = 1Interface183 = 1Interface184 = 1Interface185 = 1Interface186 = 1Interface187 = 1Interface188 = 1Interface189 = 1Interface190 = 1Interface191 = 1Interface192 = 1Interface193 = 1Interface194 = 1Interface195 = 1Interface196 = 1Interface197 = 1Interface198 = 1Interface199 = 1Interface200 = 1Interface201 = 1Interface202 = 1Interface203 = 1Interface204 = 1Interface205 = 1Interface206 = 1Interface207 = 1Interface208 = 1Interface209 = 1Interface210 = 1Interface211 = 1Interface212 = 1Interface213 = 1Interface214 = 1Interface215 = 1Interface216 = 1Interface217 = 1Interface218 = 1Interface219 = 1Interface220 = 1Interface221 = 1Interface222 = 1Interface223 = 1Interface224 = 1Interface225 = 1Interface226 = 1Interface227 = 1Interface228 = 1Interface229 = 1Interface230 = 1Interface231 = 1Interface232 = 1Interface233 = 1Interface234 = 1Interface235 = 1Interface236 = 1Interface237 = 1Interface238 = 1Interface239 = 1Interface240 = 1Interface241 = 1Interface242 = 1Interface243 = 1Interface244 = 1Interface245 = 1Interface246 = 1Interface247 = 1Interface248 = 1Interface249 = 1Interface250 = 1Interface251 = 1Interface252 = 1Interface253 = 1Interface254 = 1Interface255 = 1[PXI-CONFIG]ShowRegisteredDevOnly = 1[TCPIP-RSRCS]SynchronizeAllSocket = 0SynchronizeAllVxi11 = 1NumOfResources = 0[ALIASES]Alias0 = "'LPT1','ASRL10::INSTR'"Alias1 = "'COM1','ASRL1::INSTR'"Alias2 = "'COM2','ASRL2::INSTR'"Alias3 = "'COM3','ASRL3::INSTR'"Alias4 = "'COM4','ASRL4::INSTR'"NumAliases = 5[ASRL-RSRC-ALIAS]Name0 = "ASRL10::INSTR"Enabled0 = 1Static0 = 1SystemName0 = "LPT1"BaudRate0 = 9600DataBits0 = 8Parity0 = 0StopBits0 = 10FlowCtrl0 = 0Name1 = "ASRL1::INSTR"Enabled1 = 1Static1 = 0SystemName1 = "COM1"BaudRate1 = 57600DataBits1 = 8Parity1 = 0StopBits1 = 10FlowCtrl1 = 0Name2 = "ASRL2::INSTR"Enabled2 = 1Static2 = 0SystemName2 = "COM2"BaudRate2 = 57600DataBits2 = 8Parity2 = 0StopBits2 = 10FlowCtrl2 = 0Name3 = "ASRL3::INSTR"Enabled3 = 1Static3 = 0SystemName3 = "COM3"BaudRate3 = 57600DataBits3 = 8Parity3 = 0StopBits3 = 10FlowCtrl3 = 1Name4 = "ASRL4::INSTR"Enabled4 = 1Static4 = 0SystemName4 = "COM4"BaudRate4 = 57600DataBits4 = 8Parity4 = 0StopBits4 = 10FlowCtrl4 = 0NumOfResources = 5

Link to comment
What should I do to speed things up? I'm only using com ports 1-4. I don't plan on using anything but the serial port. It's funny you mention this file. I was here last week to create the alias naming after a beta tester said they didn't like the name of the com ports being all "fancy shmancy."

My file contains;

[VISA-CONFIG]MinAsyncCount = 512SharedMemSize = 131072MaxNumResources = 256NumSystemSems = 512NumProcessSems = 256AlwaysRefresh = 0UnloadPassports = 0[GPIB-CONFIG]DisableIbListen = 0SRQPollTime = 500EnetConnectTmoSec = 6Board0 = 1....Board99 = 1

Set those "Boardxx = 1" to "Boardxx = 0". This will disable NI-VISA from attempting to search for GPIB devices.

[GPIB-VXI-CONFIG]StartDebug = 0DisableAutoFind = 0RetryAfterFailure = 1

Set "DisableAutoFind = 1"
[TULIP-CONFIG]UseAgilentVisa = 1NativeTypesOnly = 1SynchronizeAllVxi = 0SynchronizeAllGpib = 1Interface0 = 1.....Interface255 = 1

Set those "Interfacexx = 1" to "Interfacexx = 0". This will disable NI-VISA from attempting to search for HP/Agilent GPIB interfaces. I'm usually explicitedly not installling Tulip VISA since I have no plans on using HP GPIB interfaces anyhow.

[PXI-CONFIG]ShowRegisteredDevOnly = 1[TCPIP-RSRCS]SynchronizeAllSocket = 0SynchronizeAllVxi11 = 1NumOfResources = 0

You could try to set "SynchronizeAllVxi11 = 0". That should speed up things too since VISA won't even attempt to try to look for VXI11 devices on the TCP/IP bus.

You can write a VI that uses the Config File functions to explicitedly set those config settings. Attached VI does disable all GPIB interfaces, so you may need to modify it if you require a GPIB interface. USually it would be enough to only enable the first GPIB board (Board0), since you seldom will have more than one.

Rolf Kalbermatter

Download File:post-349-1138873852.vi

Link to comment
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.