msConfig (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

NX-200, LX2

Firmware version:

1.50.00


Set the data acquisition rate for the motion sensor devices.

 

 

Input:

Rate : INT (10, 25, 50, 100) (default 100)

The data acquisition rate in samples per second (Hz).

 

Returns: INT

1

- Success.

0

- This function is not supported.

-1

- Interface is not open. Call msOpen first.

-2

- Generic error.

-3

- Mode not supported.

 

Declaration

FUNCTION msConfig : INT;
VAR_INPUT
  Rate : INT := 100;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  rc    : INT;
END_VAR;
// Open Motion Sensor interface
msOpen();
// Set the sample rate to 50 samples per second
rc := msConfig(Rate:=50);
DebugFmt(message := "msConfig (rc=\1)", v1 := rc);
BEGIN
  ...
END;
END_PROGRAM;