Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquire Data Event VB.Net 2002 and 2005

Hi,

 

I loaded a project that was written with VB.Net 2002 and MS ver 6.0 into VB.Net 2005

 

The following code works in 2002, but the acquire data event doesn't fire in 2005.

It works if I use the AxCWAI1.Read function.

Not a big deal.  Just wondering why the event isn't firing

 

Private Sub StartTest()

 

Try

 

AxCWAI1.Reset()

AxCWAI1.Device = 1

AxCWAI1.Channels.RemoveAll()

AxCWAI1.Channels.Add(
"0")

AxCWAI1.NScans = 100

AxCWAI1.ScanClock.Frequency = 1000

AxCWAI1.StartCondition.Type = cwaiNoActiveCondition

AxCWAI1.StartCondition.Level = 0

AxCWAI1.StartCondition.Source = ""

'AxCWAI1.StopCondition.Type = cwaiNoActiveCondition

AxCWAI1.StopCondition.Type = cwaiContinuous

AxCWAI1.StopCondition.Level = 0

AxCWAI1.StopCondition.Source = ""

 

AxCWAI1.Configure()

AxCWAI1.Start()

 

Catch Exc As Exception

 

Debug.WriteLine(Exc.Message)

 

End Try

 

End Sub

 

 

Private Sub AxCWAI1_AcquiredData(ByVal sender As System.Object, ByVal e As AxCWDAQControlsLib._DCWAIEvents_AcquiredDataEvent) Handles AxCWAI1.AcquiredData

 

Me.AxCWGraph1.Plots.Item(0).PlotY(e.scaledData)

 

End Sub

 

Curt

0 Kudos
Message 1 of 4
(3,764 Views)

Hello Curt,

 

It sounds like you are using Traditional NI-Daq, is that correct? Which version with which hardware?

 

Also, Let me make sure I am understanding correctly,

 

You were using VB.net 2002 (VB 7) in Visual Studio 2002 with Measurement Studio 6.0.

 

Now you are using VB.net in Visual Studio 2005, is that correct? What version of Measurement Studio are you using now?

 

Here is a link on NI-Daq in Visual Studio, if you are indeed using Traditional Daq you are simply using the functions provided outside of Measurement Studio, so it's quite possibly an issue with the compiler change that caused this behavior.

 

Let me know the answers to my questions so I can assist you further.

Message Edited by Dr. Doiron on 09-15-2008 02:29 PM
With warm regards,

David D.
0 Kudos
Message 2 of 4
(3,742 Views)

Hi David,

 

I have MS for VS2005, ver 8.01 installed along with MS 6.0.

As I stated in the original post,  the AxCWAI1.Read call works.

Do I have to set another parameter to activate the event?

 

Thanks

 

Curt

 

0 Kudos
Message 3 of 4
(3,739 Views)
0 Kudos
Message 4 of 4
(3,718 Views)