Deploy an application

Copy an application from the motorcortex.io store into a project and deploy its three packages to your controller.

An application reaches your controller as a project on motorcortex.io. You copy a ready-made application from the store into your own projects, then deploy its three packages to the controller one after the other. Click a package to see what it contains, or a destination to jump to its step.

Watch a video of these steps

The video was recorded with an earlier version of motorcortex.io, so some buttons look different.

Before you start

  • MCX-RTOS runs on your controller: see Set up a controller.
  • Your PC reaches the controller at controller_ip_addressThe IP address of your controller. In most cases 192.168.2.100., and your browser trusts the controller’s certificate: see Connect your PC. The certificate matters here: your browser sends the packages straight to the controller over HTTPS, and without a trusted certificate the deploy fails.
  • You have a motorcortex.io account.

Create a project from the store

A store application is a template. Installing it gives you your own copy as a project, which you can change without touching the original.

  1. Log in to motorcortex.io with your Email and Password, and press Log in. No account yet? Register first.

  2. On the Projects page, open the Actions menu ( ) and choose From store. If you have no projects yet, press create project from store instead.

  3. The Install from store dialog lists what the store has to offer. Filter the Category column on applications, and find the application you want to start from.

  4. Press its Install button ( ) and confirm. The new project shows up on the Projects page.

  5. Open the project. It holds the application’s packages: a binary package, a config package and a grid package. Their names depend on the application.

Deploy the binary package

The binary package is the program itself, as one or more .deb packagesA .deb file is a Debian software package. MCX-RTOS installs programs from these files with apt, the same way a Debian or Ubuntu PC does. . Deploy it first: the config package restarts Motorcortex, and Motorcortex then starts this program.

  1. Open the binary package that matches your controller’s processor: ARM for a Raspberry Pi, Intel for an industrial PC or a virtual machine.

  2. Press Deploy at the top of the package.

  3. In Controller IP address or domain, enter controller_ip_addressThe IP address of your controller. In most cases 192.168.2.100., or the address of your cloud machine, and press Deploy.

The dialog closes and the deploy runs in the background, so you can keep working. Follow its progress under Operations. motorcortex.io sends only the files that changed since the last deploy; the controller then installs every package in the list with apt.

Deploy the config package

The config packageA config package holds the configuration files of one machine: which control blocks run, the EtherCAT devices, and the links between them. tells the program what to run on this machine: its control settings, its EtherCAT devices and the links between them.

  1. Go back to the project and open the config package.

  2. Press Deploy. The address you used last time is already filled in; press Deploy again.

The controller stores the package under /etc/motorcortex/apps-available/, makes it the active configuration and restarts Motorcortex with it.

The application starts in simulation

The standard robot and AGV configurations set "Mode": "Simulation" in their config.json. To check yours, open config.json in the config package of your project. In this mode Motorcortex simulates every EtherCAT domain, so the application runs as if its drives and I/O were connected, while nothing is. That is how you use it for the rest of Getting started.

To run on real devices later, you switch Mode to Production: see Mode in config.json and Simulating devices.

Deploy the grid package

The grid packageThe grid is the Motorcortex dashboard that runs in your browser. A grid package holds the pages, buttons and gauges of one dashboard; the grid runtime on the controller shows them. is the dashboard you use to operate the application from your browser.

  1. Go back to the project and open the grid package.

  2. Press Deploy.

  3. Leave Also upgrade the controller’s grid runtime if it is out of date ticked. The dashboard needs the grid runtime that matches motorcortex.io, and this installs it when the controller has an older one.

  4. Press Deploy.

The dashboard is now on the controller.

If a deploy fails

Could not deploy. Check your connection and your security certificate. means your browser could not reach the controller at the address you entered. Check that you can open the controller in your browser without a certificate warning, and see Connection troubleshooting.

Next: Step 4: play.