Gary Bamberger
Re: Matlab to Med-Pc compatibility
August 12, 2013, 11:46:42 am
To my knowledge there is no generic code available for calling commands in Matlab, but I believe that at least one of our customers has done it.
There are two common ways of communicating between programs:
1) Turn on an output in MED-PC and the other program receives that as an input and responds appropriately and vice versa.
2) MED-PC has the ability to call any DLL function. You just need to create a Pascal function header so that MED-PC knows how to call the function. For an example of this look at the ANL926.HED in the C:\MED-PC IV folder. The ANL-926.dll was written in C++, but the function declarations contained in the file are the Pascal equivalents. With the appropriate function declarations MED-PC is now able to call into the DLL.
When using this method be very careful that the functions you are calling do not take too long. If they do, it could interfere with the MED-PC timing and cause things to halt.
Gary