10-20-2011 03:31 AM
Hi,
I occasionally get a VI_ERROR_RSRC_NFOUND error calling viOpen for a Keithley 2700 DMM which is connected by ethernet. The frequency of the error varies between once every week to once or twice a day. There are two DMMs on my system and it happens with both so I dont think it is the instrument. I have changed the ethernet patch leads.
The code I am using is:
sprintf(szBuffer, "TCPIP::%s::%d::SOCKET", m_szIPAddress, m_nPort);
status = viOpen(m_defaultRM, szBuffer, VI_NULL, VI_NULL, &m_instr);
Can anyone please tell me what this error means?
Thanks,
Tony
10-20-2011 05:30 PM - edited 10-20-2011 05:33 PM
The VISA documentation (which gets installed with NI-VISA) details all of the error codes. That particular one means "Insufficient location information or the device or resource is not present in the system." Basically, it's not seeing the device. How do you have things connected? Are both DMMs connected to a switch? Is the PC also connected to that same switch? Have you tried moving them to different ports? When this happens, if you ping the IP addresses do you see the devices?
Have you taken a look at the drivers for that DMM: http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E3B19B3E93BC659CE034080020E748...
I don't know if they're written using VISA or not.
10-21-2011 12:39 AM
Thanks for the reply.
Both DMMs and the PC (and a number of compact fieldpoint devices) are all connected to the same switch. We have another similar system in another lab which works fine. I will try changing them to different ports thanks. If I ping the address it is OK but this is unsurprising because the fault is intermittent. This, along with your explanation of the meaning of the error message does seem to point to an intermittent network problem but I am not sure since both dmms suffer the same problem (although one more than the other). As far as I am aware the compact fieldpoint devices do not suffer the same problem but they are accessed using NI's OPC server and might not use Visa.
Any suggestions of what else I could try to try to isolate the problem?