'no error is found while running the code.
Scenario:
'If i am not adding .pdx/.cdd file into the canalyzer configuration file[.cfg] , and i run my code i can see the function callevent in canalyzer write window as soon as on press of my vb button [MsgSend_Click]
.
but the problem arises when i add .pdx/.cdd file no msg appears in the canalyzer write window..no exception in vb also...
Things i tried:
1-> i changed the program node location to analysis branch, it worked [.pdx/.cdd added in .cfg] but here in this case i cannot perform
read data identifier things.so i cannot go with this..
PublicWithEvents mCANalyzerApp As CANalyzer.Application
PublicWithEvents mCANalyzerMeasurement As CANalyzer.Measurement
Public ExternFunc As CANalyzer.CAPLFunction
PrivateSub MeasurementInitiated()
Try
CANalyzerCAPL.Compile(Nothing)
ExternFunc = CANalyzerCAPL.GetFunction("samplefun")'function is defined in capl
Catch ex As Exception
End Try
EndSubPrivateSub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
mCANalyzerApp = New CANalyzer.Application
mCANalyzerApp.Open("-path to .cfg", True, True)
mCANalyzerMeasurement = mCANalyzerApp.Measurement
AddHandler mCANalyzerMeasurement.OnInit, AddressOf MeasurementInitiated
Catch ex As Exception
End Try
EndSubPrivateSub start_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Start.Click
mCANalyzerMeasurement.Start()
PrivateSub MsgSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MsgSend.Click
Try
TextBox1.Text = ExternFunc.Call()'call to capl function
Catch ex As Exception
End Try
EndSub
**********************************CAPL code*********************************************
variables
{
}
void samplefun()
{
Write("Hello in capl");
}