Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
function execute() {
  const values = inPorts.map((inPort) => inPort.value);

  // Remove In Trigger
  values.shift();

  // Remove Null values
  const filtered = values.filter((value) => value != null);

  return [Math.max(...filtered), new Date()];
}

...

In Ports

Position

Name

Message Type

Description

1

Trigger

Trigger

This port is being used to trigger the 'Max' comparison between In Port 2 and In Port 3.

2

In 1

Number

This port is being used to receive the first numeric value for the 'Max' comparison. The trigger of this port is disabled by default.

3

In 2

Number

This port is being used to receive the second numeric value for the 'Max' comparison. The trigger of this port is disabled by default.

...

Out Ports

Position

Name

Message Type

Description

1

Value

Number

This port is being used to send out the value which is bigger than the other one.

2

Trigger

Trigger

This port is being used to send out a trigger once the value of the comparison of the 'Max' object has been sent out.

...

Properties

Name

Description

Object Name

The name of the object on the canvas.

Show Code View

The switch to turn on code view for the Code Object.

Duplicate code into custom Code Object

Image Modified