Automating Test Equipment (lab gear) with Python

Hello Micheal;

I again come back to you for guidance on the DL3021A. The task is now abit complex. I have a model built in Simulink that outputs some continuous data that I want to input into the DL3021A as a load profile. So far, I have successfully run the Python script from MATLAB and gotten the list into the instrument. However, the goal is to have the MATLAB code that calls the Python script in a Simulink MATLAB function block. Such that when run, it automatically passes the Simulink model output to the device. Unfortunately, when it is executed, I get the following error.

Error:
image

Sample Simulink model with MATLAB function block containing code that calls the python script:
image

Code in the MATLAB function block:
image

Python script that is called:

I look forward to hearing from you.

Kind regards;
Jacob

1 Like