Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

OMPlot not launching

OMPlot not launching

Hello,

I am trying to learn Modelica and OpenModelica, and so far I have been using OMNotebook with DrModelica. Today, I tried OMShell (following what's in the user's guide), but when I type a plot command, nothing happens:

Code:

>> simulate(dcmotor,startTime=0.0,stopTime=10.0)

record SimulationResult
    resultFile = "C:/OpenModelica1.9.0/share/doc/omc/testmodels/dcmotor_res.mat",
    simulationOptions = "startTime = 0.0, stopTime = 10.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'dcmotor', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = '', simflags = ''",
    messages = "",
    timeFrontend = 0.582961521645908,
    timeBackend = 0.0231669108783379,
    timeSimCode = 0.00703217867075285,
    timeTemplates = 0.0601325028739686,
    timeCompile = 2.24850392996875,
    timeSimulation = 0.168091475313203,
    timeTotal = 3.08999132571318
end SimulationResult;

>> plot({load.w,load.phi})
{"_omc_PlotResult","C:/OpenModelica1.9.0/share/doc/omc/testmodels/dcmotor_res.mat","Plot by OpenModelica","true","true","plot","false","false","time","","0.0","0.0","0.0","0.0","load.w","load.phi"}

and nothing happens. Similarly, when I try to double-click (using Windows XP) on OMPlot.exe, nothing happens either.

I was able to plot OK in OMNotebook.

Many thanks in advance,

Arnaud

Re: OMPlot not launching

Call,

Code:

setPlotSilent(false)

before plot.

Adeel.

Re: OMPlot not launching

Perfect, thank you very much!

Maybe this should be included in the users' guide?

Arnaud

Re: OMPlot not launching

The command shouldn't be needed (default has it off). Also, the damn API should never have been added in the first place, Adeel... You should just have created a new API for OMEdit (plotSilent or something).

Re: OMPlot not launching

This API is used by OMNotebook. The idea is to automatically call this API when OMNotebook starts. By doing this we don't have to update all the .onb files. The problem is OMShell and OMNotebook uses the same instance of omc.

The other solution is to get rid of this API and add an extra argument to plot API but then we need to update all the .onb files.

Adeel.

There are 0 guests and 0 other users also viewing this topic