Use Motorcortex Desk

Connect Motorcortex Desk to your controller, find a parameter, write a value and plot it live.

Motorcortex Desk shows the live parameter treeThe parameter tree holds every input, output and setting of the running application, in folders under root. It is live: you read and write the values while the application runs. of your application in the browser. On this page you connect Desk to the controller, find the joint positions of the simulated robot, write a value and plot it.

Desk gives you every parameter of the running application, with no limits on what you change. That makes it the tool for testing and commissioning. In simulation you can try anything; on a real machine, use it with care.

Open Desk and connect

Desk talks to the controller over a secured WebSocketA WebSocket is a connection that stays open between the browser and the controller, so values can flow both ways without reloading the page. A secured WebSocket (wss) is encrypted like an https page. . The browser only opens one when it trusts the controller’s certificate, which you set up in Install a browser certificate.

  1. Log in to motorcortex.io.

  2. In the menu on the left, under Tools, click Desk. Desk opens in a new browser tab.

    The Connection panel of Motorcortex Desk: the address field with a closed lock, the Disconnect button, the username field with administrator and an empty password field. The chip next to the panel title reads Connected.
  3. In the Connection panel, type the controller’s address in the address field: controller_ip_addressThe IP address of your controller. In most cases 192.168.2.100., or the address of your cloud machine. Type the address only, with no https in front and no port number.

  4. Leave the lock in the address field closed. A closed lock means a secured connection, and it is the default.

  5. If your controller asks for a login, fill in the username and password fields. An empty username logs in as administrator.

  6. Click Connect, or press Enter in one of the fields.

The chip next to the panel title changes to Connected, and the Parameters panel fills with the tree of your application. If the chip stays at Connecting…, check the certificate and the network in Connection troubleshooting.

Find a parameter

The tree works like folders on a disk. Each parameter has a parameter pathA parameter path is the full name of a parameter: the folders from root down to the parameter, separated by /. For example root/Logic/state. , such as root/Logic/state.

  1. In the Parameters panel, open root, then ManipulatorControl.

  2. Find jointPositionsActual: the positions of the robot’s joints, which the simulator computes. The row shows the live values on the right.

  3. Go back to root and open UserParameters, then IO. Find gripper. Its value is 0.

    The Parameters panel of Motorcortex Desk with folders under root opened. Each parameter row shows its live value on the right.

A tree can be large. To jump to a parameter, press Ctrl+F (Cmd+F on a Mac) and type part of its name in the Filter parameters… box above the tree. More about the tree and the filter is in Exploring parameters.

Plot a value

A plot shows how a value changes over time, which a single number cannot.

  1. Double-click gripper. The signal appears in the plot, and in the Active panel on the right.

  2. Double-click jointPositionsActual to add the joint positions as well. The robot stands still, so they draw flat lines.

    Motorcortex Desk with two signals plotted. The Parameters panel is on the left, the plot in the middle, and the Active panel on the right lists the plotted signals with their live values.

Double-click a plotted parameter again to remove it from the plot. In the Active panel you change a signal’s colour and axis, or hide it. See Plotting.

Write a value

You change gripper by writing a new value to it. Every writable parameter has an input field, which appears to the right of its value when you point at the row.

  1. Point at the row of gripper and click its input field.
  2. Type 1 and press Enter. The field flashes green when the write succeeds, and the plot steps from 0 to 1.
  3. Write 0 the same way to set it back. Press Escape to leave a field without writing.

A plotted parameter also has an input field on its row in the Active panel, so you can write it without finding it in the tree again.

If the value jumps back right after you write it, the application itself writes that parameter every cycle. To hold your value anyway, right-click the parameter and choose Lock; choose Unlock to give it back to the application. A locked parameter no longer follows the application, so unlock it when you are done. Writing and locking are explained in full in Exploring parameters, under Writing.

Next: Create a GUI.