boardVersionX (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

All

Firmware version:

1.12.00


The boardVersionX function returns detailed information about all three types of firmware in an NX32L based device.

 
 

Input:

type : SINT;

The firmware type to return the version of.

_BV_SYSTEM

System-firmware version

_BV_RUNTIME

Runtime-firmware version

_BV_MONITOR

Monitor-firmware version

_BV_COP_BOOT

Co-processor bootloader version (LX only).

_BV_COP_MAIN

Co-processor firmware version (LX only).

 

Output:

major : INT;

The major part of the selected firmware version.

 

minor : INT;

The minor part of the selected firmware version.

 

build : INT;

The build part of the selected firmware version.

 

Returns: INT

1

- Success

0

- Not supported.

-1

- Illegal firmware type

 

Declaration:

FUNCTION ALIGN boardVersionX : INT;
VAR_INPUT
  type   : SINT;
  major   : ACCESS INT;
  minor   : ACCESS INT;
  build   : ACCESS INT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR

  major   : INT;
  minor   : INT;
  build   : INT;
END_VAR;
 
boardVersionX(type := _BV_SYSTEM, major := major, minor := minor, build := build);
DebugFmt(message := "System:  \1.\2.\3", v1 := major, v2 := minor, v3 := build);
boardVersionX(type := _BV_RUNTIME, major := major, minor := minor, build := build);
DebugFmt(message := "Runtime: \1.\2.\3", v1 := major, v2 := minor, v3 := build);
 
BEGIN
END;
END_PROGRAM;