4. Icon Reference List

 

 

 

CL Begin

Begin an Engineer program.

This is required as the first command in every Engineer program.

To select which serial port you are using, put the port selection control on the front panel of your Engineer program and string it into the upper left hand side of this command.

 

CL End

End a LEGO Engineer program.

This is required as the last command in every Engineer program.

 

Joystick Demo

This Joystick demo will control the two motors of a LEGO car using a LEGO joystick.

 

Lego Demo

This VI can be used to easily read data from LEGO sensors and control LEGO output devices.

 

Motor Demo1

This motor demo turns motor A on.

 

Motor Demo2

This motor demo turns a motor on until you hit the stop button.

 

Motor Demo3

This motor demo turns a motor on for the specified time.

Oscilloscope

This oscilloscope demo is a continuous oscilloscope that measures the signal on the specified port.

 

Thermometer1

This thermometer demo will read the temperature of the LEGO temperature sensor.

 

Thermometer2

This thermometer demo will read the temperature of the LEGO temperature sensor once every 10 seconds until the stop button is pressed.

 

Joystick

This VI is used to control two outputs (i.e. for a car) using the joystick.

 

Ice-cream

 

Robot arm

 

Scanner

 

Wheelchair

This Wheelchair example will control the two motors of a LEGO car using a LEGO joystick.

Ex 1

Write a program that turns the motor on for 1 sec.

 

Ex 10

Write a VI to turn on a motor, keep it on for 10 seconds and stop. When the motor has stopped, flash a light until the button is pressed.

 

Ex 11

Write a VI to ramp up a motor to full speed, keep it on for 5 seconds, ramp it down to zero, and turn on a sound for 2 seconds to signal that the motor has stopped.

 

Ex 12

Write a VI to ramp up a motor to full speed. Repeatedly pressing the switch should first flip the motor direction, them ramp down the motor, turn on a light, turn off a light and start a sound, and finally turn off the sound and stop.

 

Ex 5

Write a program that waits for the user to hit the switch before starting any motors. After the motor is started, then wait one second then stop.

 

Ex 17

Write a VI that acquires data using the fast-mode.

 

 

 

A

Output port modifier.

String this modifier to a command to select Output Port A.

To select more than one output port, string additional modifiers into the bottom.

 

Angle modifier

Angle sensor angle modifier.

String this modifier into commands involving the angle sensor to select angle mode for the reading (as opposed to rotation mode).

 

Celsius

This makes the temperature sensor read in Celsius.

 

Eight

Power Level Modifier

String this modifier into lamp, sound device or motor commands to set the power level to 8.

 

Fahrenheit

This makes the temperature sensor read in Fahrenheit.

 

Flash

This button lets you choose flashing (or off).

 

 

 

 

Flash2

This button lets you choose flashing (or off) in the other direction.

 

Four

Power Level Modifier

String this modifier into lamp, sound device or motor commands to set the power level to 4.

 

H

Output port modifier.

String this modifier to a command to select Output Port H.

To select more than one output port, string additional modifiers into the bottom.

 

One

Power Level Modifier

String this modifier into lamp, sound device or motor commands to set the power level to 1.

 

Percentage

Light sensor percentage modifier.

String this modifier into commands involving the light sensor to select percentage mode for the light reading.

 

 

 

 

 

 

 

Port1

Input port modifier.

String this modifier to a command to select Input Port 1.

 

Port4

Input port modifier.

String this modifier to a command to select Input Port 4.

 

Port5

Input port modifier.

String this modifier to a command to select Input Port 5.

 

Port8

Input port modifier.

String this modifier to a command to select Input Port 8.

 

Raw

Light sensor raw number modifier.

String this modifier into commands involving the light sensor to select raw number mode for the light reading.

Rotations

Angle sensor rotation modifier.

String this modifier into commands involving the angle sensor to select rotation mode for the reading (as opposed to angle mode).

 

Sound1

This makes a sound in the forward direction.

 

Sound2

This makes a sound in the backward direction.

 

CL Flip Direction

Flip the direction of the outputs.

You must use one of the "outputs" controls on the front panel.

 

CL Power Outputs

This vi allows you to set the parameters of each of the 8 outputs of the LEGO box.

 

CL Ramp Down

Turn on any of the 8 outputs from the highest to the lowest power level.

You must use one of the "outputs" controls on the front panel.

 

CL Ramp Up

Turn on any of the 8 outputs from the lowest to the highest power level.

You must use one of the "outputs" controls from the front panel.

 

CL Wait for Time

Hold the outputs for a given amount of time.

The default amount of time is one second.

 

Flip Direction

Flip the direction of the outputs.

Modifiers: Ports

 

Lamps

Turn on lamps.

Modifiers: Ports, Brightness

 

Motor forward

Turn on motors in the forward direction.

Modifiers: Ports, Speed

 

Motor reverse

Turn on motors in the reverse direction.

Modifiers: Ports, Speed

Power Outputs

Turn on any of the 8 outputs of the LEGO box at any power level.

You must use one of the "outputs" controls on the front panel.

 

Sound

Turn on sound devices.

Modifiers: Ports, Volume

 

Stop

Stop outputs.

Modifiers: Ports

 

Wait for Outputs

This VI holds the output(s) at the current level(s) for the time specified by the output settings.

 

Natural Logarithm Base (e 2.72)

Pi (p 3.14)

Numeric Constant

Add

Computes the sum of the inputs. Works on numbers, arrays of numbers, clusters of numbers, arrays of clusters of numbers, and so on.

 

 

 

Subtract

Computes the difference of the inputs. Works on numbers, arrays of numbers, clusters of numbers, arrays of clusters of numbers, and so on.

Multiply

Computes the product of the inputs. Works on numbers, arrays of numbers, clusters of numbers, arrays of clusters of numbers, and so on.

Divide

Computes the quotient of the inputs. Works on numbers, arrays of numbers, clusters of numbers, arrays of clusters of numbers, and so on.

Increment

Adds 1 to the input value. Works on numbers, arrays of numbers, clusters of numbers, arrays of clusters of numbers, and so on.

 

Decrement

Subtracts 1 from the input value. Works on numbers, arrays of numbers, clusters of numbers, arrays of clusters of numbers, and so on.

Round to Nearest

Rounds the input to the nearest integer. If number is midway between two integers, the function returns the nearest even integer.

 

Absolute Value

Takes the absolute value of the input. Works on numbers, arrays or clusters of numbers, arrays of clusters of numbers, and so on.

Square Root

Takes the absolute value of the input. Works on numbers, arrays or clusters of numbers, arrays of clusters of numbers, and so on.

Negate

Negates the input value. Works on numbers, arrays of numbers, clusters of numbers, arrays of clusters of numbers, and so on.

Reciprocal

Divides 1 by the input value. Returns Infinity if x=0. Works on numbers, arrays of numbers, clusters of numbers, arrays of clusters of numbers, and so on.

Random Number (0-1)

Produces a double-precision floating-point number between 0 and 1, exclusively. The distribution is uniform.

Natural Logarithm

Computes ln(x). If x=0, ln(x)=-Infinity. If x<0 and x is not complex, ln(x)=NaN. x can be a scalar number, an array or cluster of numbers, an array of clusters of numbers, and so on.

 

 

Exponential

Computes e^x. x can be a scalar number, an array or cluster of numbers, an array of clusters of numbers, and so on.

Power Of X

Computes x^y. If x is not complex, then x must be greater than 0 unless y is an integer. Otherwise, the result is NaN. If y=0, x^y=1. x can be a scalar number, an array, cluster or array of clusters of numbers, and so on.

 

Sine & Cosine

Computes sin(x) and cos(x). x is in radians. x can be a scalar number, an array or cluster of numbers, an array of clusters of numbers, and so on.

Logarithm Base X

Computes logx(y). x>0, y>0. If y=0, logx(y)=-Infinity. If x<=0, y<0, and x and y are both non-complex, logx(y)=NaN.

Inverse Tangent (2 input)

Computes arctan2(x,y). Works in all quadrants of the x-y plane. x and y can be scalar numbers, arrays or clusters of numbers, arrays of clusters of numbers, and so on.

 

 

 

And

Computes the logical AND of the inputs. Works bitwise on integers, or on Booleans:

F AND F = F

T AND F = F

F AND T = F

T AND T = T

Also works on arrays or clusters of integers/Booleans, arrays of clusters of integers/Booleans, and so on.

Or

Computes the logical OR of the inputs. Works bitwise on integers, or on Booleans:

F OR F = F

T OR F = T

F OR T = T

T OR T = T

Also works on arrays or clusters of integers/Booleans, arrays of clusters of integers/Booleans, and so on.

 

Exclusive Or

Computes the logical Exclusive OR of the inputs. Works bitwise on integers, or on Booleans:

F XOR F = F

T XOR F = T

F XOR T = T

T XOR T = F

Also works on arrays or clusters of integers/Booleans, arrays of clusters of integers/Booleans, and so on.

Not

Computes the logical negation of the input. Works bitwise on integers, or on Booleans:

NOT F = T

NOT T = F

Also works on arrays or clusters of integers/Booleans, arrays of clusters of integers/Booleans, and so on.

 

 

Boolean to (0, 1)

Converts a Boolean value to a word integer. FALSE=0 and TRUE=1. Input can be a scalar, an array, or a cluster of Boolean values, an array of clusters of Boolean values, and so on.

 

Boolean Constant

Equal?

Returns TRUE if x=y. Accepts complex numbers. x and y must be of the same type. If input is an array/cluster, function normally returns an array or cluster of Booleans. Popup option "Compare Aggregates" makes the function return a single Boolean.

Not Equal?

Returns TRUE if x is not equal to y. Accepts complex numbers. x and y must be of the same type. Popup option "Compare Aggregates" makes the function return a single Boolean.

 

Greater or Equal?

Returns TRUE if x>=y. x and y must be of the same type. Popup option "Compare Aggregates" makes the function return a single Boolean.

Less or Equal?

Returns TRUE if x<=y. x and y must be of the same type. Popup option "Compare Aggregates" makes the function return a single Boolean.

 

 

Max & Min

Compares x and y and returns the larger value at the top output terminal and the smaller value at the bottom output terminal. x and y must be of the same type, but they can have different numeric representations.

Less?

Returns TRUE if x<y. x and y must be of the same type. Popup option "Compare Aggregates" makes the function return a single Boolean.

 

Greater?

Returns TRUE if x>y. x and y must be of the same type. Popup option "Compare Aggregates" makes the function return a single Boolean.

 

Greater or Equal to 0?

Returns TRUE if x>=0. x can be a numeric scalar, cluster, or array of numbers. Output is a Boolean value of the same data structure as x.

Less or Equal to 0?

Returns TRUE if x<=0? x can be a numeric scalar, cluster, or array of numbers. Output is a Boolean value of the same data structure as x.

Sort 1D Array

Sorts an array in ascending order. If array is an array of clusters, elements are sorted by comparing the first elements; for matches, the second and subsequent components are compared. 1D array cannot be Boolean.

Select

Returns value at t if s is TRUE, and value at f if s is FALSE. t and f must be of the same type, but they can have different numeric representations.

Array Size

Returns the number of elements in each dimension of input. Input can be an n-dimensional array of any type.

Search 1D Array

Searches for element in 1D array starting at start index. Element and start index must be scalar. Start index defaults to 0 if unwired. Output is -1 if function does not find element.

Transpose 2D Array

Rearranges the elements of 2D array such that 2D array [i, j] becomes transposed array [j,i]. 2D array can be any type.

Array Constant

Array Max & Min

Searches for the maximum value and the minimum value in input, and returns the values and the indices where it finds them. Input can have any number of dimensions.

Build Array

Concatenates inputs in top-to-bottom order. Function is resizable. Pop up on an input and select Change to Array to change it to an array input. For an n-dimensional array, element inputs must have n-1 dimensions, and array inputs must have n dimensions.

Index Array

Returns an element of array at index. If array is multidimensional you must add additional index terminals by resizing or popping up and adding terminals. You can slice out arrays (e.g.: rows/columns) by disabling index terminals from the popup.

Replace Array Element

Replaces the element in array at index. For multidimensional arrays, you must resize the function to show more index inputs. New element must be of the same type as elements in array. You must wire an index terminal for each dimension of array.

Array Subset

Returns a portion of array starting at index and containing length elements. Array can be an n-dimensional array of any type. Function is resizable.

Unbundle

Splits a cluster into its individual components. Function is resizable. Function arranges components from top to bottom in cluster order in the order in which you initially added them to the cluster.

Bundle

Assembles input components into a single cluster, or replaces elements in an existing cluster. Function is resizable. If you wire the input cluster, only the components you want to change must be wired; otherwise, you must wire all the components.

Initialize Array

Returns an n-dimensional array in which every element is initialized to the specified value. Function is resizable. Element cannot be an array.

Bundle by Name

Assembles components into a single cluster. The cluster input must always be wired. After wiring, pop up on the name terminals to select from the list of components of the cluster.

Unbundle by Name

Returns the cluster elements whose names you specify. Access an element by popping up on the name output terminals.

Cluster Constant

Compound Arithmetic

Performs arithmetic on two or more numeric or Boolean inputs. You can resize this node by selecting Add Element or using the Positioning Tool.

 

Sequence Structure

Case Structure

For Loop

While Loop

Formula Node

Angle

The reading the angle sensor.

The default reading from the angle sensor is rotations on channel 6.

Double-click on the icon to change the settings of the angle sensor temporarily.

Wire-in the optional angle sensor settings to change these settings for your program permanently.

You will need an angle sensor indicator on the front panel.

 

 

 

 

 

 

 

 

 

Light

The reading of the light sensor.

The default reading from the light sensor is a percentage reading on input channel 5.

Double-click on the icon to change the settings of the light sensor temporarily.

Wire-in the optional light sensor controls to change these settings for your program permanently.

You will need a light sensor indicator on the front panel.

Reset

Reset the angle sensor to zero.

The default is channel 5.

Modifier: Port: String in the input port modifier that corresponds to where your sensor is connected.

 

Temp

The temperature reading.

The default temperature sensor reading is in Fahrenheit on Channel 2.

Double-click on the icon to change the temperature reading to Celsius temporarily (Fahrenheit is the default), or to alter the input channel.

You will need a temperature sensor indicator on the front panel.

Wire-in the "C or F" switch, or the sensor channel to use Celsius or change the input channel in your program permanently.

 

 

 

 

Touch

The reading of the touch sensor.

The default touch sensor reading is "true" for "pushed in".

The default input channel is channel 1.

You will need a touch sensor indicator on the front panel.

 

Lamp A

Turn on Lamp A at full brightness.

Modifiers:

Brightness

Steady or Flashing

 

Lamp H

Turn on Lamp H at full brightness.

Modifiers:

Brightness

Steady or Flashing

 

 

Motor A Reverse

Turn on Motor A at full speed in the reverse direction.

Modifier:

Speed

 

Motor A

Turn on Motor A at full speed.

Modifier:

Speed

 

Motor AB

Turn on Motors A and B at full speed.

Modifiers:

Speed

 

Motor AB2

Turn on Motors A and B at full speed.

Modifiers:

Speed

 

Motor AB3

Turn on Motors A and B at full speed.

Modifiers:

Speed

 

Motor AB4

Turn on Motors A and B at full speed.

Modifiers:

Speed

 

 

 

 

 

 

 

Motor H reverse

Turn on Motor H at full speed in the reverse direction.

Modifier:

Speed

 

Motor H

Turn on Motor H at full speed.

Modifier:

Speed

 

Sound A

Turn on Sound A at full volume.

Modifiers:

Volume

Type of Sound

 

 

Sound H

Turn on Sound H at full volume.

Modifiers:

Volume

Type of Sound

 

Stop A

Stop the output connected to port A.

 

Stop H

Stop the output connected to port H.

 

Stop All

Stop all of the outputs.

 

Template1

Write your own

Engineer program.

Double-click on icon and Show Diagram.

 

Template4

Write your own

Engineer program.

Double-click on icon and Show Diagram.

 

Bio Gas Sensor

This VI takes input from the Vernier Biology Gas Pressure Sensor (BGP-DIN) and calculates the pressure above ambient in Pascals.

Use the LEGO-Vernier adapter with this sensor on a blue input port.

 

Force Sensor

This VI takes input from the Vernier student Force Sensor and calculates force in Newtons. NOTE: YOU NEED TO CALIBRATE AND ENTER COEFFICIENTS INTO THE DIAGRAM.

 

Humidity

This VI measures the relative humidity with the Vernier Relative Humidity Sensor. Connect the sensor to the LEGO-Vernier adapter and connect the adapter to a blue input port. This VI is calibrated and measures in percent. The sensor itself has a slow reaction time... let it sit for a while to reach an equilibrium reading.

 

Init Scope

 

Microphone

 

 

 

 

 

 

 

 

 

pH

This VI reads the pH measured by the Vernier pH sensor. Connect the Vernier sensor to the LEGO-Vernier adapter and plug the adapter into the appropriate blue input port. This sensor is delicate, so be careful.

Range: 0 to 14 pH

Accuracy: +/- .05 pH

 

Single Sweep

This VI is used for acquiring data in fast mode.

 

Vernier

This VI reads a voltage (in bits) from the Control Box using the adapter for the Vernier sensors.

 

Wait for Sound

This VI pauses execution until a noise (i.e. a clap or shout) is heard by the Vernier Microphone.

 

CL Wait for Voltage

This VI will wait until the voltage read is either greater than the cutoff voltage level or less than the cutoff voltage level (depending on the operation). The default channel is 7.

 

 

 

 

 

 

 

Count Switch

Wait for the touch sensor to be pressed a certain number of times.

The default is to wait for one push on channel 1.

 

Wait 1 sec

Wait for 1 second.

 

Wait 10 sec

Wait for 10 seconds.

 

Wait for Angle

Wait for a reading from the angle sensor.

The default is to wait until the angle is equal to 180 on channel 6.

Double-Click on this command while the program is running to see the current angle sensor value.

 

Wait for Dark

Wait for darkness.

The default is to wait for a reading of greater than 60% dark on channel 5.

Double-Click on this command while the program is running to see the current light sensor value.

 

 

Wait for Greater C

Wait for the cutoff temperature.

The default is to wait for 25 degrees on Port 2.

Double-Click on this command while the program is running to see the current light sensor value.

 

Wait for Greater F

Wait for the cutoff temperature.

The default is to wait for 60 degrees on Port 2.

Double-Click on this command while the program is running to see the current temperature sensor value.

 

Wait for Less C

Wait for the cutoff temperature.

The default is to wait for 25 degrees on Port 2.

Double-Click on this command while the program is running to see the current light sensor value.

 

 

 

Wait for Less F

Wait for the cutoff temperature.

The default is to wait for 60 degrees on Port 2.

Double-Click on this command while the program is running to see the current light sensor value.

 

Wait for Let Go

Wait for the touch sensor to be released.

The default is on Port 1.

 

 

Wait for Light

Wait for light.

The default is to wait for a reading of less than 60% dark on Port 5.

Double-Click on this command while the program is running to see the current light sensor value.

 

 

Wait for Rotation

Wait for a reading from the angle sensor.

The default is to wait until the rotations are greater than 10 from Port 6.

Double-Click on this command while the program is running to see the current angle sensor value.

 

Wait for Switch

Wait until the touch sensor is pushed in.

The default is on Port 1.

 

Wait for Time

Wait for a specified amount of time.

The default amount of time is 1 second.