Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Unit test Visual Studio 2010 Digital Input read event

Solved!
Go to solution

Hello!

 

I am experiencing problems in Visual Studio 2010 using NI-DAQmx but ONLY in a unit test project. I compiled a dll which use a Task DigitalChangeDetection event handler. The dll work fine in a regular Form project but isn't working in a Test project.

 

I used .NET Framework 4.0 everywhere with success. Tried to switch to .NET framework 3.5 but it isn't possible for a test project in Visual Studio 2010.

 

When I start my test, it works great until the event is fired. Once it does, the test stop without any exception or detail except the following test result:

"The agent process was stopped while the test was running."

 

Nothing is trapped in debug.

 

I also get the following error message in the Event Viewer :


Log Name:      Application
Source:        VSTTExecution
Date:          2010-12-01 11:32:31
Event ID:      0
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      xxx
Description:
The description for Event ID 0 from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

(devenv.exe, PID 5592, Thread 73) OutOfProcessStrategy.ProcessMonitorThread: Agent process was shut down unexpectedly; will attempt to restart

the message resource is present but the message is not found in the string/message table

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="VSTTExecution" />
    <EventID Qualifiers="0">0</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2010-12-01T16:32:31.000000000Z" />
    <EventRecordID>10312</EventRecordID>
    <Channel>Application</Channel>
    <Computer>xxx</Computer>
    <Security />
  </System>
  <EventData>
    <Data>(devenv.exe, PID 5592, Thread 73) OutOfProcessStrategy.ProcessMonitorThread: Agent process was shut down unexpectedly; will attempt to restart</Data>
  </EventData>
</Event>

 

 

I understand that Visual Studio 2010 is not yet officially supported so here's my 2 questions :

 

- Am I the only one experimenting this problem? (Easily reproduced by taking the sample project : DotNET3.5\Digital\Read Values\ReadDigChan_ChangeDetection_Events and extract the relevent part to put it in a separate dll so you can try to UnitTest it in a UnitTest project.

- Any update on when NI-DAQmx will be supported by VS2010? (I've read here: http://forums.ni.com/t5/Measurement-Studio-for-NET/Support-for-Visual-Basic-2010-NET-4-Framework/m-p... that it's supposed to be before the end of the year but any update would be great as I've not been able to find any information about that)

 

Best regards,

 

Pierre-Luc

0 Kudos
Message 1 of 4
(4,155 Views)
Solution
Accepted by topic author plg

Hello Pierre,

 

Since NI-DAQmx is not yet offically supported in Visual Studio 2010, its not entirely clear why this issue would occur. At this juncture, the official release date has not yet been announced, however, please continue to check for updates at www.ni.com/support (Drivers and Updates). Thank you

 

Best regards

 

Ali M

Applications Engineer

National Instruments

www.ni.com/support

0 Kudos
Message 2 of 4
(4,111 Views)

Thank you for the update, I'll periodically check for the update.

 

Regards,

0 Kudos
Message 3 of 4
(4,094 Views)

ps. I tried with Nidaqmx 9.2.3 and I don't get that problem anymore 🙂

0 Kudos
Message 4 of 4
(3,980 Views)