09-12-2008 01:18 PM
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
09-15-2008 02:28 PM - edited 09-15-2008 02:29 PM
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.
09-15-2008 02:44 PM
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
09-17-2008 12:10 AM
Hello Curt,
Are you using traditional DAQ? What hardware are you using?
Here are some resources that I found, the first link is a customer who seemed to be experiencing a similar issue.
http://forums.ni.com/ni/board/message?board.id=250&message.id=28084&requireLogin=False
http://digital.ni.com/public.nsf/allkb/F394806CAAF67C8286256C680058ACE7?OpenDocument
http://digital.ni.com/public.nsf/allkb/2CCDE4753499FA1885256403006A18A1?OpenDocument
http://zone.ni.com/devzone/cda/tut/p/id/3635
http://zone.ni.com/devzone/cda/tut/p/id/4344