navFormReceiveReadSelect (Function)

Top  Previous  Next

Architecture:

NX32 / NX32L

Device support:

MX2 turbo/encore/warp, AX9 turbo, NX-200, NX-400, NX-900, LX2, LX4, LX5

Firmware version:

4.70 / 1.30.00

Nav. API level:

12


This function will read a selected option from a selection field on a received form.

Note that the received form is only valid after a "Form received" event is raised; the event will not be removed until the navFormReceiveDone function is called.

To read all the selected options of a field with multiple selections, call this function with incrementing index until all the selected options have been found.

 

Input:

id : DINT (1..2147483647)

ID of the field to read.

 

index : INT (1..30)

Index of the option to read.

 

Output:

option : DINT

The id of a selected option.

 

 

Returns: INT

>=0

- Success. The value is the number of selected options that have a larger index.

-1

- Navigation interface is not open.

-3

- No received form could be found.

-7

- The selection field could not be found.

-8

- The option could not be found.

 

Declaration:

FUNCTION navFormReceiveReadSelect : INT;
VAR_INPUT
  id         : DINT;
  index     : INT := 1;
  option     : ACCESS DINT;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM NavigationExample;
VAR
  val : DINT;
END_VAR;
BEGIN
  ...
  // Read the selection from field  15
  navFormReceiveReadSelect(ID := 15, index := 1, option := val);
  ...
END;
END_PROGRAM;