07-07-2014 01:36 AM
The SelfTest call fails miserably - but the hardware IS working fine and it IS registered!
NationalInstruments.DAQmx.DaqException: Network device is not reserved for this host.
Status Code: -201388
at nNIMSSAIL100.StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >.CheckWithName(StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >* , tCaseInsensitiveBasicString<wchar_t\,_STL::char_traits<wchar_t>\,_STL::allocator<wchar_t>\,nNIDMXS100::tLocaleConsideringWideStringComparitor\,nNIDMXS100::tLocaleConsideringWideStringCaseForcer>* pName)
at NationalInstruments.DAQmx.Device.SelfTest()
at Strecon.Drivers.NI.Configurator.SelfTestAll()
ResponseObject ro = new ResponseObject(); try
{ string[] devs = NationalInstruments.DAQmx.DaqSystem.Local.Devices; System.Text.StringBuilder sb = new System.Text.StringBuilder(); foreach(string sdev in devs) { NationalInstruments.DAQmx.Device niDevice = NationalInstruments.DAQmx.DaqSystem.Local.LoadDevice(sdev); niDevice.SelfTest(); sb.AppendLine("\t" + sdev + " Tested"); } log.Debug("Self tests performed, msg:\n" + sb.ToString()); } catch(Exception ex) { log.Error("Failure in SelfText", ex); ro.Error("Failure in selftest, see logfile for details"); } return ro;
07-07-2014 09:17 AM
@Larover88 wrote:
The SelfTest call fails miserably - but the hardware IS working fine and it IS registered!
NationalInstruments.DAQmx.DaqException: Network device is not reserved for this host.
Status Code: -201388
at nNIMSSAIL100.StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >.CheckWithName(StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >* , tCaseInsensitiveBasicString<wchar_t\,_STL::char_traits<wchar_t>\,_STL::allocator<wchar_t>\,nNIDMXS100::tLocaleConsideringWideStringComparitor\,nNIDMXS100::tLocaleConsideringWideStringCaseForcer>* pName)
at NationalInstruments.DAQmx.Device.SelfTest()
at Strecon.Drivers.NI.Configurator.SelfTestAll()
ResponseObject ro = new ResponseObject(); try
{ string[] devs = NationalInstruments.DAQmx.DaqSystem.Local.Devices; System.Text.StringBuilder sb = new System.Text.StringBuilder(); foreach(string sdev in devs) { NationalInstruments.DAQmx.Device niDevice = NationalInstruments.DAQmx.DaqSystem.Local.LoadDevice(sdev); niDevice.SelfTest(); sb.AppendLine("\t" + sdev + " Tested"); } log.Debug("Self tests performed, msg:\n" + sb.ToString()); } catch(Exception ex) { log.Error("Failure in SelfText", ex); ro.Error("Failure in selftest, see logfile for details"); } return ro;
How many times is your foreach loop running? Are you certain that the device supports SelfTest?
07-08-2014 02:08 AM
Hi Larover88,
Cannot really say this is my field of expertise and may be shooting blanks here... Are you sure the device is properly reserved before initializing the self test?
If you perform a self test in MAX, does it generate any errors?
Which version of DAQmx is installed?
Have you seen this KB article stating "...there is no Self-Test VI or function in DAQmx prior to 8.9 in LabVIEW, LabWindows/CVI, Visual Basic..." ?
How Can I Perform a Reset/Self-Test of My NI-DAQ Device Programmatically?
http://digital.ni.com/public.nsf/allkb/124D580AE300335E86256FDD006CE798
Best regards,