Difference between revisions of "Dynamo console"

From Dynamo
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{DISPLAYTITLE:''Dynamo'' console}}
 +
[[Category:Standalone]]
 +
 
The ''Dynamo'' console is a device that substitutes the [[Dynamo Matlab version|Matlab command line]] when you are using an [[standalone]] version of ''Dynamo''.
 
The ''Dynamo'' console is a device that substitutes the [[Dynamo Matlab version|Matlab command line]] when you are using an [[standalone]] version of ''Dynamo''.
  
Line 4: Line 7:
 
==Activating the console==
 
==Activating the console==
  
The console can be invoked in a Linux shell that has been [[standalone#Activating the standalone|activated]] to work with the [[standalone]] version. In such a shell, you can write
+
The console can be invoked in a Linux shell that has been [[standalone#Activating the standalone|activated]] to work with the [[standalone]] version.
 +
 
 +
===Setting the environment===
 +
An annoying feature of the [[standalone]] version is that starting a console in a fresh shell for the first time can take long time, even minutes.  This can be avoided in some systems if you choose  sensible value for the environment variable <tt>[[MCR_CACHE_ROOT]]</tt>. "Sensible" can mean  a local folder  (instead of a remotely located file share), or a location of your file system that is particularly fast.
 +
 
 +
In any case, it is always convenient to initialize this variable, instead of letting the system choose:
 +
<tt>export MCR_CACHE_ROOT=<some location></tt>
 +
 
 +
=== Starting a console session ===
 +
In such a shell, you can write to the linux prompt:
  
 
<tt>
 
<tt>
dynamo x
+
dynamo
 
</tt>
 
</tt>
  
and after some more or less long waiting, you will get a console with the prompt:
+
and after some more or less long waiting (see above), you will get a console with the prompt:
  
 
<tt>
 
<tt>
 
Dynamo >>
 
Dynamo >>
 
</tt>
 
</tt>
 +
 +
[[File:dynamo_console.png|thumb|center|600px| Opening the ''Dynamo'' console inside a linux shell with the command <tt>dynamo</tt>]]
 +
 +
==Command Syntax==
  
 
This console has almost the same syntax as the ''Dynamo'' matlab commands. Most usual commands can be passed without special adaption, for instance the commands that we input in the Matlab prompt as:
 
This console has almost the same syntax as the ''Dynamo'' matlab commands. Most usual commands can be passed without special adaption, for instance the commands that we input in the Matlab prompt as:
Line 39: Line 55:
  
 
<tt>
 
<tt>
>> \mbimg.show(rand(64,64));
+
Dynamo >> \mbimg.show(rand(64,64));
 
</tt>
 
</tt>
 +
 +
== Special commands==
 +
 +
To leave a console type {{t|exit}}. Bear in mind that will loose all variables stored in the workspace.
 +
Also: pressing CTRL+C in a console session will not interrupt a ''Dynamo'' process running inside the console, but it will stop the console itself (as process running inside the Linux shell!)
 +
 +
== Graphical Console ==
 +
It is possible ( although not avidsed) to create a graphic console independent from a linux shell
 +
<tt>
 +
dynamo x &
 +
</tt>
 +
 +
In older  ''Dynamo'' versions compiled against R2016b, the graphic terminal is necessary in order to run any command that produces GUIs or any other graphic output.
 +
 +
[[File:dynamo_graphical_console.png|thumb|center|600px| A  ''Dynamo'' graphical console opened with <tt>dynamo x </tt>]]

Latest revision as of 19:59, 12 September 2017


The Dynamo console is a device that substitutes the Matlab command line when you are using an standalone version of Dynamo.


Activating the console

The console can be invoked in a Linux shell that has been activated to work with the standalone version.

Setting the environment

An annoying feature of the standalone version is that starting a console in a fresh shell for the first time can take long time, even minutes. This can be avoided in some systems if you choose sensible value for the environment variable MCR_CACHE_ROOT. "Sensible" can mean a local folder (instead of a remotely located file share), or a location of your file system that is particularly fast.

In any case, it is always convenient to initialize this variable, instead of letting the system choose: export MCR_CACHE_ROOT=<some location>

Starting a console session

In such a shell, you can write to the linux prompt:

dynamo

and after some more or less long waiting (see above), you will get a console with the prompt:

Dynamo >>

Opening the Dynamo console inside a linux shell with the command dynamo

Command Syntax

This console has almost the same syntax as the Dynamo matlab commands. Most usual commands can be passed without special adaption, for instance the commands that we input in the Matlab prompt as:

>> dtplot myFile.tbl;

reads in the Dynamo console as:

Dynamo >> dtplot myFile.tbl;

Commands that are not registered in the standalone can still be used in the console preceding them with \. For instance, all commands inside packages are not registered.

I.e. the command for Matlab:

>> mbimg.show(rand(64,64));

can be passed to the console through:

Dynamo >> \mbimg.show(rand(64,64));

Special commands

To leave a console type exit. Bear in mind that will loose all variables stored in the workspace. Also: pressing CTRL+C in a console session will not interrupt a Dynamo process running inside the console, but it will stop the console itself (as process running inside the Linux shell!)

Graphical Console

It is possible ( although not avidsed) to create a graphic console independent from a linux shell dynamo x &

In older Dynamo versions compiled against R2016b, the graphic terminal is necessary in order to run any command that produces GUIs or any other graphic output.

A Dynamo graphical console opened with dynamo x