Skip to content

Simulink model causes runtime error

Good afternoon,

I have the following problem:

[b]Definition:[/b] When writing and starting a program to a PLCNext controller, the PLC goes into failure mode.

[b]Steps:[/b] The following steps were taken which lead to this failure:
1. Build simple model in Simulink
2. Compile it with the Simulink Coder (successfully)
3. Load it into PLCNext Engineer
4. Build a simple model and connect all ports
5. 'Write and start project' to the PLC
6. No errors or warnings are given, only built successful. However, the PLCNext Engineer environment does not go into 'active' mode but remains passive. When I check the PLC I see the Error LED lit up and the Run LED blinking.

I have been using a remote desktop with Simulink, Simulink Coder and all other relevant software and SDK's to compile the Simulink model into a library. On my own PC (so a different PC than the one compiling the models) I'm then loading the library and writing it to the PLC. Is this a possible reason for the failure of the PLC?

Thanks in advance.

Comments

  • Hello,

    - Do you see any mesages in the "Log" window in PLCnext Engineer?



    - Do you see any error messages in the Output.log file that might help explain the problem?

    - Are you able to successfully load a simple project to the PLC that does not include a Simulink model?

    .
  • Indeed there seems to be an error there:
    "An error occurred while writing changes to the device"

    Do you have any suggestions on this?

    FYI: I have tested the PLC itself and the connection to PLCNext engineer by writing and testing a simple, non-simulink program and that works. Also, I have tried to generate a function block via the HLLI interface option in the Simulink Coder. When I write a program with that function block in it, the PLC does go into failure but the block itself is not working; the 'error' output is high.
  • If it's OK with you, I would like to look at a simple PLCnext Engineer project that displays this problem.
    For data protection reasons, can you confirm that you're happy to get an email from us, at the address you used to register on this forum, with instructions on where you can send a PLCnext Engineer project?
  • Yes that would be great thank you!
  • Email sent, please check your spam box if not received.
  • Problem solved by using an SDK in Simulink that is compatible with the firmware version running on the PLC.
Sign In or Register to comment.