Message Boards Message Boards

0
|
9731 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Issue with ModelPlug; Help!

I am trying to run the tutorial Getting Started (http://reference.wolfram.com/system-modeler/libraries/ModelPlug/ModelPlug.GettingStarted.html) using my Arduino Mega 2560. I noticed that my simulation log did not match the one shown in the tutorial.

Here's the log of my simulation:

Starting simulation of experiment "Model1 1" at 09:48:38
[ModelPlug.Firmata]: Available ports:
- COM3
[ModelPlug.Firmata]: Using port COM3 with baud rate 57600
[GENERAL]: Server listening on 127.0.0.1:50734
[GENERAL]: Initialization finished.
[GENERAL]: Simulation stopped at time = 3.11.
[GENERAL]: Simulation took 3.11 seconds of CPU time.
[GENERAL]: Total number of function evaluations: 1989
[GENERAL]: Total number of events: 311
[GENERAL]: Total number of step events (dynamic state switches): 0
Simulation exited at 09:48:42

I notice in my log that the lines starting with [ModelPlugFirmata] and the pin capabilities are absent. Why is this so? How can I rectify the problem?

Thanks.

POSTED BY: Safi Ahmed
4 Replies

Can you follow the troubleshooting steps and post the results of them?

1.- Verify that you can upload any Arduino example to your board.

2.- Verify that you have uploaded a StandardFirmata example to your board.

3.- Verify that the port name in the board component matches the port where you have your board connected.

4.- Verify that the port name has quotation marks.

5.- ModelPlug will not connect to the board if there is another application using the port. Verify you do not have other applications using the port.

6.- If the simulation log does not show the board capabilities, try uploading the Firmata to your board again.

7.- When using multiple boards, your operating system may have changed the port names. Verify that the port names in the components correspond to each hardware board.

8.- Some boards like the Arduino Leonardo and compatible require the parameter UseDTR set to true. Change the parameter and test your board.

Most of the new Arduino boards require the parameter UseDTR set to true. Test both configurations (true and false).

He Leonardo:

I did pass all those checks. The relevant one was #6 (the one regarding the board capabilities). This issue did not come up with an Arduino Uno. As far as I can see, SystemModeler has compatibility issue specifically with Arduino Mega 2560. I say this because I could make the Blink LED tutorial worked perfectly with an Arduino Uno (after a minor tweak of attaching a separate LED).

Thanks for help!

POSTED BY: Safi Ahmed

Hi Safi, I tested my Arduino Mega 2560 and I can reproduce the problem. Seems to be something with Windows 10 (maybe other versions of Windows too). Soon we are gonna release a fixed version of ModelPlug. Please contact the support and we will send you a fixed library as soon as possible.

Thank you for your report.

Leonardo

Thank you for your help. I am happy to report any bugs. FYI, I am using windows 7.

POSTED BY: Safi Ahmed
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract