I have tested several WSM examples with Arduino.
So I got an example on Wolfram Blog : http://blog.wolfram.com/2014/11/07/using-arduinos-as-systemmodeler-components/
It seems helpful to me.
So I tested it on my PC. But I got an error like the below screenshot.
But I have already checked all settings.
I got the information of Arduino port. And I also tested the Arduino example.
So I set the port correctly.
My friend said that it runs well on previous version. But I do not want to downgrade to previous version!
I asked to WRI TS team but they suggested me to check the C++ compiler....I used WSM since version 2.1.
Of course, I checked the compiler.
Please let me know any solution.
My WSM version is 5.0 and Mathematica version is 11.2.
And my machine is MacOS Sierra 10.12.6 ( MacAir 2014 Version).
The test file is located the blog page.
Its not your setup. There is a bug in the LQ Control system. I cut out the arduino and pin14 and put a sine wave into the pendulum and it still crashes under version 5. There appears to be a bug with the TimeTable used in the LQ regulator. That is unused in the default mode (referencetype =2). So I cut it out and replaced it with a constant of zero and the LQ regulator now runs properly.
Try this with your arduino.
Here is what I did:
It is resolved! Your advice is really helpful to me!
Thank you Neil!
The example runs on current version with Arduino and all graphs are drawn in real time.
But only the animation works a few seconds delayed.
I cannot understand the reason.
Thank you for the excellent answer Neil. I just wanted to explain what the underlying problem was. TimeTable needs to start at 0 in the time (first) column in order to be valid. SystemModeler previously was a bit more lax and allowed it to start anywhere, like in the InvertedPendulum model, even though this meant that the table values at the start of the simulation was undefined. As of SystemModeler 5.0 this is no longer allowed which caused the error above.
It seems like you've already solved the issue with Neil's help, but the download has been updated to reflect your issue. Some other small changes were also updated to better target newer versions of SystemModeler, they could possibly fix your animation issues, though I cannot reproduce them.