navWaypointSet (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

MX2, AX9, CX1 pro/flex/warp, SX1, MX2 turbo/encore/warp, AX9 turbo, NX-200, NX-400, NX-900

Firmware version:

2.20 / 1.00.00

Nav. API level:

2


This function will set a waypoint in the navigation device.

 

The position of the waypoint must be given in the semicircle format (see navStopSet for more info).

 

 

Input:

ID : INT

Unique ID to identify the waypoint.

 

symbol : INT

The symbol that is displayed on the map for the waypoint..

nav_symbols_1nav_symbols_2nav_symbols_3

 

latitude : DINT

The latitude of the position.

 

longitude : DINT

The longitude of the position.

 

categories : INT

A bit field that indicates which categories the waypoint belongs to.

For example, if the waypoint should be in categories with IDs 0 and 5, the categories should have the lowest bit and the 6th lowest bit set to 1 for a value of 33 decimal (00000000 00100001 in binary).

 

name : STRING

The name of the waypoint. Max. 30 characters.

 

comment : STRING

Any other notes for the waypoint. Max. 50 characters.

 

 

Returns: INT

0

- Success.

-1

- Navigation interface is not open.

-2

- Error communicating with navigation device.

-4

- The navigation device rejected the command.

-8

- The name or comment is illegal.

-11

- This is not supported by navigation device.

-12

- Navigation interface is busy.

 

Declaration:

FUNCTION navWaypointSet : INT;
VAR_INPUT
  ID         : INT;
  symbol     : INT;
  latitude   : DINT;
  longitude : DINT;
  categories : INT;
  name       : STRING;
  comment   : STRING;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM NavigationExample;
 
BEGIN
  ...
  // Insert Logic IO waypoint
  navWaypointSet(ID := 5, symbol := 18, latitude := 666377598, longitude := 117525954, categories := 16#1000, name := "Logic IO", comment := "Main office");
  ...
  // Delete waypoint
  navWaypointDelete(id := 5);
  ...
END;
END_PROGRAM;