MapleSim Questions and Posts

These are Posts and Questions associated with the product, MapleSim

I am working on a model in MapleSim which is giving me the error "DSN/RunSimulation: internal error: condition iteration failure: unable to solve Tarjan form at initial point."

Are there any general tips on what in a model could cause this error?

The Railway Challenge is a competition designed by the Institute of Mechanical Engineers (IMechE), aimed at engaging young engineers with the rail industry.  The challenge, now in its seventh successive year, brings together teams of university students, as well as apprentices and graduates working in industry across the world to test their business knowledge, design ability and technical skills in a live test environment.

The Railway Challenge at Sheffield (RCAS) is an extracurricular student-led activity within the Mechanical Engineering department at the university of Sheffield, that designs, codes and manufactures a 10 1/4 inch gauge miniature locomotive to compete in the IMechE’s  Railway Challenge.  The locomotive is assessed in accordance with a set of strict rules and a detailed technical specification, such as traction, ride comfort, and a business case. The locomotives are tested live at a competition, which takes place in June at the Stapleford Miniature Railway in Leicestershire, where several categories of winners and an overall Railway Challenge champion is crowned.

The team consists of around twenty members, and students studying Mechanical Engineering and even cross discipline can get involved as soon as they come to the University, getting into to the design of components within the suspension or braking systems for example, before proceeding to manufacture and test; allowing the students to experience all the stages of an engineering product as well as skills gained by working in the team such as effective communication, time management and financial planning.

Last year the team was granted a sponsorship from Maplesoft, and as a result, huge improvements were made within the team. Overall the team jumped from finishing in 7th place to in the summer winning the maintainability challenge and finishing in 4th place overall – mostly down to the electronics working for the first year ever!

 

Using Maplesoft’s donation the team switched form a central CRIO control system to a distributed network using I2C protocols and Arduino hardware. This did away with some of the electrical teething problems the team has suffered in previous years. It also introduced our Mechanical Engineers to coding that they would otherwise not do in their course.

This year Maplesoft have again sponsored RCAS. The team is hoping to use the licenses to perform their structures calculations in an easy way to keep track of them for use in the design report. They are also hoping to use MapleSim for dynamics modelling, to assist with suspension design, and designing any electronics or control elements, such as filter design and motor control.

Hello,

I'm writting a Modelica External component which use a C function, like this :

model SAMS.BlockUdpReceiver
    parameter Integer relativeSockId = 0 "Relative socket id (0..10)";
    parameter Integer stateUdp = 2 "state of receiver 1=receive data from udp ; 2=state from recorder config file";
    parameter Real step_time = 0.05 "sample time in second";
    parameter Integer nbDouble = 3 "number of double value to send";

    function udpReceiveDataMapleSim
        input Integer relativeSockId;
        input Integer stateUdp;
        input Real step_time;
        input Real currentTime;
        input Integer nbDouble;
        output Real dataToReceived[nbDouble];
    external "C"udpReceiveDataMapleSim(SAMS.BlockUdpReceiver.udpReceiveDataMapleSim.relativeSockId, SAMS.BlockUdpReceiver.udpReceiveDataMapleSim.stateUdp, SAMS.BlockUdpReceiver.udpReceiveDataMapleSim.step_time, SAMS.BlockUdpReceiver.udpReceiveDataMapleSim.currentTime, SAMS.BlockUdpReceiver.udpReceiveDataMapleSim.nbDouble, SAMS.BlockUdpReceiver.udpReceiveDataMapleSim.dataToReceived)
            annotation (
                Library = "F:/SAMSSVN/workspaceMaple/SamsLibrary/x64/Debug/SamsDll.dll",
                __Maplesoft_callconv = "stdcall");
    end udpReceiveDataMapleSim;

    Modelica.Blocks.Interfaces.RealOutput dataReceived[nbDouble] annotation (Placement(
        visible = true,
        transformation(
            origin = {120, 50},
            extent = {
                {-20, -20},
                {20, 20}},
            rotation = 0),
        iconTransformation(
            origin = {110, 50},
            extent = {
                {-10, -10},
                {10, 10}},
            rotation = 0)));
equation
    when {initial(), sample(0, step_time)} then
        dataReceived = udpReceiveDataMapleSim(relativeSockId, stateUdp, step_time, time, nbDouble);
    end when;

    annotation (
        Diagram(coordinateSystem(extent = {
            {-100, -100},
            {100, 100}})),
        Icon,
        experiment(__Maplesoft_engine = 2),
        __Maplesoft_none);
end SAMS.BlockUdpReceiver;

I want MapleSim to call C function at initial() time and with a sampled period of step_time.

But, the function is called at each simulation step (here at 0.4 ms)

for demonstrate it, I print a log file each time the function is called.
this is a part of the result :

id Receiver =11 ; CurrentTime = 0.151200 while t_step=0.002000
id Receiver =11 ; CurrentTime = 0.151200 while t_step=0.002000
id Receiver =11 ; CurrentTime = 0.151200 while t_step=0.002000

id Receiver =11 ; CurrentTime = 0.151600 while t_step=0.002000
id Receiver =11 ; CurrentTime = 0.151600 while t_step=0.002000
id Receiver =11 ; CurrentTime = 0.151600 while t_step=0.002000

id Receiver =11 ; CurrentTime = 0.152000 while t_step=0.002000
id Receiver =11 ; CurrentTime = 0.152000 while t_step=0.002000
id Receiver =11 ; CurrentTime = 0.152000 while t_step=0.002000

Why C function is called so many time (3 times in a step), and why is called for each simulation step (0.4ms) instead of each 2 ms ?

Maybe I make a bug in my Modelica code ? or not ?

thanks for any reply.

 

Where I can found inverted pendulum on maple sim or good book?thanks

We’ve just released a major new version of MapleSim. The MapleSim 2017 family of products provides new and improved model development and analysis tools, expands modeling scope, introduces new deployment options, and strengthens toolchain connectivity.  Here are some highlights:

  • The new Initialization Diagnostics App further simplifies the initialization task by helping you determine how your initial values are computed and what you need to do to adjust them.
     
  • The new Modal Analysis App helps you explore and understand the natural vibration modes of your mechanism, so you can determine how to reduce the vibration in the final product. 
     
  • Over 100 new components include expansions to the Electrical and Magnetic libraries.
     
  • A new Modelica® code editor makes it easier to create Modelica-based custom components.
     
  • The MapleSim Heat Transfer Library from CYBERNET, a new add-on component library, provides a comprehensive view into heat transfer effects in your model, enabling you to refine your  design to improve performance and avoid overheating.
     
  • The new MapleSim Explorer product provides a cost-effective deployment solution that allows you to make MapleSim models available to more people in your organization.

 

There’s more, of course.  See What’s New in MapleSim for lots more details.

eithne

I have recently reinstalled the MapleSim 6.4 but the probe windows do not appeaar anymore.

The image below shows that there are 3 probes (none are disabled) and when I run the simulation nothing happens.,

please help me on check my schmitt2.msim schmitt's trigger 

I use Maple & MapleSim 2016. I linked my MapleSim model to Maple worksheet and ran it in the Maple.
After that, I wanted to make the compiled one by using "GetCompiledProc" command in Maple.
I know that this command helps making compiled model with some user-specified parameters.
However, if I try to compile my MapleSim Model, error message appears and process stops.

Error message: (In GetCompiledProc) numeric exception: division by zero

Is there anyone how to avoid this error? I cannot find any solution for my problem.
For the security problem, I cannot upload my MapleSim model.

I appreciate any idea or tip you may have.
 

Is it possible to edit 3D work space directly in maplesim? How?

Can we add a static (fixed) cylinder around a piston (translating cylinder) in the 3D workspace?

Can we draw in maple drawing and add it to maplesim 3D space?

Thanks for these basic yet unclear to for the past many months.

Ramakrishnan V

I have an excel macro file (enable macro or save as macro and run) in which the colour of cells keep changing by a macro named macro2.

Can we achieve it in maple or maple sim?

Any one please suggest a way for me to try out.

COLOR1.xlsx

Thanks.

Ramakrishnan V

I dragged into model space prismatic FixedFrame and RigidBody components and prismatic joint along y axis. I also set mass m = 1 kg. The manual says set K_S = K_S and K_K_d in inspector parameter setting. It did not work out. So i set values 12 and 0.1 for K_S and K_d. I sreated subsystem sub of rigidBody and followed the following instructions,

Quote" PrismaticJoint.PlacethePrismaticjointandRigidBodyinasubsystemcalledsub.Thisallowsthe EquationTemplatetogenerateequationsspecificallyfortheselectedsubsystem.
3. ClickTemplates( )intheMainToolbarandselecttheEquationstemplate. 4. IntheAttachmentfield,provideaworksheetnameandclickCreateAttachment.Your MapleSimmodelopensinaMapleworksheet,withtheSubsystemSelectionwindow.

ClickLoadSelectedSubsystem.Thesubcomponentparameterandvariablesload automaticallyintheParameterandVariableManipulationareas"

After this i wanted to modify the equations. I could not. The same equation is reassigned.

Parameter and variable rows - are as shown in manual, but a blank row not available for user's use. But how do i get the variable x(t) there and rename it?

Thanks for an example of this chapter with an application of its use., if available with anyone?

Ramakrishnan V

I have made a program to plot y(t) vs x(t). Can you please modify to plot y vs x data from an excel file.

Given x in A column and y in B column in 5 rows.

Example data: [[1,1],[2,4],[3,9],[4,16],[5,26]]

StLine_VRK.msim

Thanks.

Ramakrishnan V

I followed the basic example RLS circuit first. It worked out well for R = 24 ohms, L = 160 mHand C = 200 microF. Signal is step input h = 1 and  t0 =  0.1 s. Simulation td = 0.5 s

When I extended it for DC motor, the output for torque (tou) and speed (w) not plotted for h = 1  t0 =  1s and simulation td = 5 s for the same parameters as above the output required (shown in manual) is not coming. Is it because default values shown were different? Then how do i change? I am enclosing the file for view and help.

DCmotort_model1.msim

 

Thanks.

Ramakrishnan V

Hello,

I have an industrial robot model and I need to define constraints for the revolute joints. For example, R2 joint is only allowed to move between -165 to 165 degrees. Could you please tell me how I can impose these constraints?

Thank you.

Önder

1 2 3 4 5 6 7 Last Page 1 of 30