Hi,
I am getting an AccessViolationException when trying to create a pulse channel. The exception is...
"System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at nNIMSAI100.tChannelListCache.getChannelListForInitialization(tChannelListCache* )
at NationalInstruments.DAQmx.Channel..ctor(Task task, tCaseInsensitiveBasicString<wchar_t\,_STL::char_traits<wchar_t>\,_STL::allocator<wchar_t>\,nNIDMXS100::tLocaleConsideringWideStringComparitor\,nNIDMXS100::tLocaleConsideringWideStringCaseForcer>* virtualChannelName, tCaseInsensitiveBasicString<wchar_t\,_STL::char_traits<wchar_t>\,_STL::allocator<wchar_t>\,nNIDMXS100::tLocaleConsideringWideStringComparitor\,nNIDMXS100::tLocaleConsideringWideStringCaseForcer>* physicalChannelName, Int32 usageType, tChannelType channelType, tLineGrouping lineGrouping, tCaseInsensitiveBasicString<wchar_t\,_STL::char_traits<wchar_t>\,_STL::allocator<wchar_t>\,nNIDMXS100::tLocaleConsideringWideStringComparitor\,nNIDMXS100::tLocaleConsideringWideStringCaseForcer>* customScaleName)
at NationalInstruments.DAQmx.COChannel..ctor(Task task, tCaseInsensitiveBasicString<wchar_t\,_STL::char_traits<wchar_t>\,_STL::allocator<wchar_t>\,nNIDMXS100::tLocaleConsideringWideStringComparitor\,nNIDMXS100::tLocaleConsideringWideStringCaseForcer>* virtualChannelName, tCaseInsensitiveBasicString<wchar_t\,_STL::char_traits<wchar_t>\,_STL::allocator<wchar_t>\,nNIDMXS100::tLocaleConsideringWideStringComparitor\,nNIDMXS100::tLocaleConsideringWideStringCaseForcer>* physicalChannelName, Int32 usageType, tCaseInsensitiveBasicString<wchar_t\,_STL::char_traits<wchar_t>\,_STL::allocator<wchar_t>\,nNIDMXS100::tLocaleConsideringWideStringComparitor\,nNIDMXS100::tLocaleConsideringWideStringCaseForcer>* customScale)
at NationalInstruments.DAQmx.COChannelCollection.CreateChannel(String counter, String nameToAssignChannel, COOutputType type, String customScaleName)
at NationalInstruments.DAQmx.COChannelCollection.CreatePulseChannelTicks(String counter, String nameToAssignChannel, String sourceTerminal, COPulseIdleState idleState, Int32 initialDelay, Int32 lowTicks, Int32 highTicks)"
When I install older NI-DAQ™mx drivers on my machine (i.e. v21.8) there is no issue. The exception occurred when I try to run my program with the latest (2025 Q2) drivers installed.
Do you know what the problem is and how I can get around it without reverting to older drivers? Due to company policies, I need to be using the latest drivers available.
If you need more information just let me know. Thank you for your assistance.
Kindest Regards,
Rupesh