Skip to main content

Objective:

Learn some tips on how to use Math blocks to create equations.

Procedure:

Nesting

Each Math block computes an expression and can be nested together with other math blocks to create larger equations. The equation (X+2)*Y=0 is shown below. An Add block inside the first input of a Multiply block. These blocks are used to create the equation The equation (X+2)*Y=0

Overloads

The math blocks can compute different types of data by using Overloads to change the type. Some blocks have more options than others. The Overloads can change automatically depending on what input is given. An example of available Overloads for the Add block is shown below: The dropdown menu of the available Add block overloads.

Results

Once you’ve entered the inputs for a math block, the result is shown in the upper right corner (depending on the overload type). You can see more results in the Property panel as well. A gif showing how once the operand inputs of an Add block are populated, the result can be found in the upper corner of the block. The result is also shown in the block's properties panel.

Units

One thing to look out for when creating equations is units. Sometimes you need to cancel units out by dividing by 1 of the same unit. If you encounter an error for an ‘Incompatible units in input…’, there is a chance you’ve forgotten to add units. In the example below, adding ‘mm’ to Operand B clears the error. If an operand input of a math block doesn't have applied units, the block will error out with the message "Incompatible units in input positions 0 and 1.

Variables

X, Y, and Z can be written in most math blocks directly but sometimes units don’t allow them to be. If this occurs you can write in X/ 1mm or use an Axis block as your variable. You can check out the Axis method in the article: How to create a quadratic ramp. Below is an example of sin(x). The Axis needs to be divided by 1 mm to get rid of the units. An example of sin(x). The Axis needs to be divided by 1 mm to get rid of the units. Here is an example of cos(x), using the method where we divide by mm. an example of cos(x), using the method where we divide by mm

More on this topic: