From: Vihang Patil on
Hello
I am trying to implement Modbus Serial Communication from Matlab to DELTA PLC for which I have a *.dll, *.lib and *.h file.
I am trying to communicate through the serial port COM1 but I am getting the status message as -1.
I am not very familiar with external interfacing, so I wanted to know if I am using the correct method for calling this said functions

loadlibrary DMT.dll DMT.h alias lib
libfunctionsview lib
status = calllib('lib', 'OpenModbusSerial', 1,9600,8,1,1,1);
I get status -1
and when I try
calllib('lib', 'GetLastSerialErr')
I get either 8 or 9.

Please help
Vihang

I have attached the above files here http://drop.io/s9z8kas