Simulink External mode Error message

Hi All, I have currently made an Simulink model to work in External mode in simulink. Yet when i try to connect to the PLC (Running the project which includes the model) i get the error message:

Error occurred while executing External Mode MEX-file ‘ext_comm’ The rest of the error is shown in the image. Do you have any idea what this means, and what can be done to fix it?
I’ve tried to use the simulink model in different projects, which didnt seem to work. Kind regards, Coen

Hey Coen, can you give us more details, so which PLC were you using, Firmware and PC Worx Taget for Simulink version. Thanks!