SimMechanics™ and PTC Creo CAD imports

Hi, I am trying to follow the tutorial as described in "http://www.mathworks.com/help/physmod/sm/ug/import-robot-arm-model.html". I managed to install everything without any problem. But after I exported the model, I am able to see the block but Mechanics Explorer is unresponsive and blank all the time. I made sure that all the stl files were there as well. The command window also displays about 3 pages of error. The first few lines looks like this
"Warning: Using a default value of 0.2 for maximum step size. The simulation step size will be equal to or less than this value. You can disable this diagnostic by setting 'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics page of the configuration parameters dialog Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Error making context current: 2001 at com.sun.opengl.impl.windows.WindowsGLContext.makeCurrentImpl(WindowsGLContext.java:169) at com.sun.opengl.impl.windows.WindowsOnscreenGLContext.makeCurrentImpl(WindowsOnscreenGLContext.java:66) at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)...........
and so on. I don't know if Java has anything to do with it but I have also made sure that my Java is up to date.

7 Comments

Hi Kiran,
May I ask some questions about your post?
1. Are you trying the workflow about exporting PTC Creo model to SimMechanics?
2. If so, are you using the PTC models from \matlab\toolbox\physmod\smlink\smlinkdemos\proe ?
3. The desired workflow is:
b. Open model using your CAD software (In your case will be Creo).
d. Use smimport to import the XML file. Like smimport('robot.xml')
4. If you did follow this workflow but still occur problem, would you please attach some files? For example, the exported xml file?
5. Which version of MATLAB you are using?
6. If you open the xml file, you can see the SimMechanics Link version. Which version you are using?
Thanks, Xing
Hi Xing, The answer to q1 and 2 is yes. I am trying to follow the tutorials from Mathworks website. My SimMechanics is version 4.2 so I downloaded the SimMechanics Link version 4.2. My MATLAB is ver R2013a. The files I am trying to use are the same as you mentioned (\matlab\toolbox\physmod\smlink\smlinkdemos\proe). I was able to install the SimMechanics Link and I am using ProEngineer WF5 to convert that to .xml file. I made sure that all the corresponding .stl files are stored at the same folder. Once I did that I imported the model and tried to compile/update the model (Ctrl+D). But then I get a lengthy error message in the command window. Also the Mechanics Explorer is unresponsive. I have attached all the files in the zip folder to this message. Thanks. >smimport('ROBOT.xml')
%%%ERROR MESSAGE IN COMMAND WINDOW ONCE I PRESS CTRL+D OR WHEN I RUN THE SIMULATION%%%
Warning: Using a default value of 0.2 for maximum step size. The simulation step size will be equal to or less than this value. You can disable this diagnostic by setting 'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics page of the configuration parameters dialog Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Error making context current: 2001 at com.sun.opengl.impl.windows.WindowsGLContext.makeCurrentImpl(WindowsGLContext.java:169) at com.sun.opengl.impl.windows.WindowsOnscreenGLContext.makeCurrentImpl(WindowsOnscreenGLContext.java:66) at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134) at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:182) at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:412) at javax.media.opengl.GLCanvas.display(GLCanvas.java:244) at javax.media.opengl.GLCanvas.paint(GLCanvas.java:277) at sun.awt.RepaintArea.paintComponent(Unknown Source) at sun.awt.RepaintArea.paint(Unknown Source) at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
Hi Kiran,
Thanks for sharing the files with me.
I just tried your files in R2013a. But I cannot reproduce the java exceptions.
Do you mind if you try one more thing? in MATLAB command window, type in sm_four_bar, you will see a model. Then do Ctrl+D to see if this also produces the same java exception. If so, we can see there are some problems with your SimMechanics product.
Thanks,
-Xing
Hi Xing, I do see the same error messages with the sm_four_bar so it could be the problem with my SimMechanics product. Any idea on how I can troubleshoot?
Thanks, Kiran
Hi Kiran,
I think there are two more things you could try.
1. I found something seems exactly same as your java exception. http://forum.salemthegame.com/viewtopic.php?t=2514&p=27141
I do not have ATI graphics card so I cannot verify it. But I think this is worth a try.
2. If this does not solve your problem, maybe you can try to update your graphics card driver. (and if this solves problem, you might undo 1.)
Thanks,
Xing
hal9k
hal9k on 21 May 2014
Edited: hal9k on 21 May 2014
Hi Xing,
Thank you so much for your answers. I figured out that the problem was due to some JAVA related inconsistencies. When I tested from my browser (chrome) it was still showing that I was using the most recent Java. Anyways I decided to uninstall and re-install it just to see what would happen.
First I uninstalled Java completely from the control panel. Then I installed the Java from chrome (chromeinstall-7u55.exe), but when I ran the .xml files I got the same errors. Then I uninstalled it and re-installed the Java 64 bit (jre-7u55-windows-x64). When I ran the xml files, they worked like a charm.
Although I still don't know the exact reason, I think it has something to do with the compatibility between 32 bit and 64 bit Java versions that was causing the whole problem.
Hi Kiran,
It's good to know you figure it out. Java stuff is always tricky..
Thanks for letting me know the solution which can be useful for me in the future.
Regards,
-Xing

Sign in to comment.

Answers (0)

Categories

Asked:

on 20 May 2014

Commented:

on 21 May 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!