12-03-2008 05:41 PM
HI,
I just finished installing MStudio 8.6 on mu machine, alongwith NI DAQmx 8.8. I am trying to use the waveformgraph in my VB .NET project. When I try to run the code, I see the error that WaveformGraph is unlicensed. Can somebody please help me to proceed from here.
I also see the errors as shown in the attached picture.
Please help.
Thank you in anticipation.
Regards
Vijay
Solved! Go to Solution.
12-04-2008 11:57 AM
I tried to reintsall MStudio and now it worked fine. But could not figure out what went wrong in first attempt. Everythign was same second time though. Anyway, sorry to bother you guys.
Regards
Vijay
12-05-2008 08:13 AM - edited 12-05-2008 08:14 AM
Vijay -
I'd like to understand this problem better, because based on the errors in the file you attached, I don't think that re-installing is the right approach for fixing this issue.
The errors in the attached file are not licensing errors. They are errors that indicate that the project you are using the libraries in is configured to target a processor that the libraries don't support.
This will typically occur if you set the project to target x64. The Measurement Studio libraries currently support only x86. This effectively means that you cannot use the libraries in 64-bit applications (though you can use them in 32-bit applications that run on a 64-bit OS).
So, the way I recommend fixing this issue is to set the project>>Properties>>Build>>Platform target to x86.
However, I'm not sure why re-installing would have fixed this problem. After you re-installed, did you create a new project, or re-build the project that had previously exhibited the problem? If you re-built the project that had previously exhibited the problem, could you please post it here so we can look at it?
David Rohacek
National Instruments
12-05-2008 09:21 AM
Dear David,
Thank you for looking at the post. I had a vague idea that problem may have something to do with the platform, but could not understand what was wrong. Your comments cleared the situation to me, but now I am left with the doubt that why did it not work in first attempt. I rebuilt my program after I reinstalled Mstudio 8.6 and DAQmx 8.8. The only changes that I made, were to replace the evaluation copy graphs with the new full version and the 8.5 libraries with the 8.6 libraries. I will post my code at the earliest. However, to provide you with a rough idea, my routines are derived from the example projects provided with the 8.5 evaluation and the DAQmx. And then I have some other part that communicates with other hardware on the computer.
Thank you for your precious comments. Again, I will post my code as soon as possible.
Regards
Vijay
12-05-2008 05:09 PM
Hello David,
Here is my code. I collect data using a PCI 6120 card and then plot it to look at the shape of teh signal coming from different channels. Data is either plotted on waveformgraph or scatter graph, depending upon the user's task at hand.
Here grp1Dgraph refers to the groupbox containing Waveformgraphs and grp2Dgraph refers to the grpBox with scattergraphs.
Regards
Vijay
Public Sub IdleGraphSet(ByVal idFreq As Integer, ByVal idSampNum As Integer)
Try
IdleFreq = 1000000
Idle2Show = 10000
If IdleRunningTask Is Nothing Then
Try
IdleTask = New Task()
IdleTask.AIChannels.CreateVoltageChannel("Dev2/ai1", "Channel1", CType(-1, AITerminalConfiguration), -10, 10, AIVoltageUnits.Volts)
IdleTask.AIChannels.CreateVoltageChannel("Dev2/ai2", "Channel2", CType(-1, AITerminalConfiguration), -10, 10, AIVoltageUnits.Volts)
IdleTask.AIChannels.CreateVoltageChannel("Dev2/ai3", "Channel3", CType(-1, AITerminalConfiguration), -10, 10, AIVoltageUnits.Volts)
IdleTask.Timing.ConfigureSampleClock("", IdleFreq, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples, Idle2Show)
IdleTask.Control(TaskAction.Verify)
IdleRunningTask = (IdleTask)
IdleInReader = New AnalogMultiChannelReader(IdleTask.Stream)
IdleInReader.SynchronizeCallbacks = True
IdleCallBack = New AsyncCallback(AddressOf IdleInCallback)
IdleTask.Stream.ReadOverwriteMode = ReadOverwriteMode.OverwriteUnreadSamples
IdleTask.Stream.ReadRelativeTo = ReadRelativeTo.MostRecentSample
IdleInReader.BeginReadMultiSample(Idle2Show, IdleCallBack, IdleTask)
Catch ex As Exception
MessageBox.Show("Error Graph: " & ex.Message)
IdleRunningTask = Nothing
IdleTask.Dispose()
End Try
End If
Catch ex As Exception
End Try
End Sub
Private Sub IdleInCallback(ByVal ar As IAsyncResult)
Try
If IdleRunningTask Is ar.AsyncState Then
Dim data As Double(,) = IdleInReader.EndReadMultiSample(ar)
Dim data2graph1(UBound(data, 2)) As Double
Dim data2graph2(UBound(data, 2)) As Double
Dim data2graph3(UBound(data, 2)) As Double
Dim i As Integer
For i = LBound(data, 2) To UBound(data, 2)
data2graph1(i) = data(0, i)
data2graph2(i) = data(1, i)
data2graph3(i) = data(2, i)
Next
If grp1Dgraphs.Enabled Then
Graph1.PlotY(data2graph1)
Graph2.PlotY(data2graph2)
Graph3.PlotY(data2graph3)
ElseIf grp2Dgraphs.Enabled Then
GraphXY_1.PlotXY(data2graph1, data2graph2)
GraphXZ_1.PlotXY(data2graph1, data2graph3)
GraphYZ_1.PlotXY(data2graph2, data2graph3)
End If
IdleInReader.BeginReadMultiSample(Idle2Show, IdleCallBack, IdleTask)
Application.DoEvents()
End If
Catch ex As Exception
MessageBox.Show("Error Graph Plot: " & ex.Message)
IdleRunningTask = Nothing
IdleTask.Dispose()
End Try
End Sub