Matlab to Med-Pc compatibility

MEDState Notation Repository Forums Software Help Archive Matlab to Med-Pc compatibility

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12382
    Med_Support
    Moderator
    RatRunner42
    Matlab to Med-Pc compatibility
    August 12, 2013, 11:15:05 am

    I was wondering if Med-PC was compatible with Matlab.

     

    If so, how do you get them to communicate, and is there an example of the code for this?

     

    Thanks in advance!

    #12384
    Med_Support
    Moderator
    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

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Software Help Archive’ is closed to new topics and replies.