Calling .NET class in MATLB is not Working but it is working in VB.net
2 views (last 30 days)
Show older comments
I have a public .dll (KRcc64.dll) created by a machine manufacturer using .NET for interfacing any custom code/program with his machine .
It has a class called "Commu" for making TCP/IP connection with the machine .
"Commu" class Parameters are :
- TCP or COM
- IP address
- port
- time-out
I wrote a small code using VB.Net to test it & it is working perfectly .
Here is the VB.net code :
Module Program
Sub sample_of_command()
'connect to the controller
Dim comm As KRcc.Commu
Try
Console.Write("connecting . . . ")
comm = New KRcc.Commu("TCP 127.0.0.1 10300 3000")
Console.WriteLine("done")
Catch
Console.WriteLine("Can't connect")
Exit Sub
End Try
The issue which i faced it is trying to use this .NET with MATLAB and always getting immediate response from MATLAB as followings :
% Message: can't connect TCP/IP
% Source: krcc64
I am using the following MATLAB code
asm = NET.addAssembly('C:\**\krcc64.dll')
Comm_Port = KRcc.Commu('TCP 127.0.0.1 10300 3000')
Please your support !
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!