RWTH - Mindstorms NXT Toolbox

ReadFromNXT

Reads current state of specified motor from NXT brick

Contents

Syntax

DATA = OBJ.ReadFromNXT

DATA = OBJ.ReadFromNXT(HANDLE)

[DATA1 DATA2] = OBJ.ReadFromNXT

[DATA1 DATA2] = OBJ.ReadFromNXT(HANDLE)

Description

Request the current state of the motor object OBJ from the NXT brick. NXTmotor object OBJ is not modified. DATA is a structure with property/value pairs.

If the NXTmotor object OBJ controls two motors, DATA1 and DATA2 hold the parameters of the first and the second motor respectively. If only one output argument is given, the parameters of the first motor are returned.

Use the optional parameter HANDLE to identifiy the connection to use for this command. Otherwise the default handle (see COM_SetDefaultNXT) will be used.

The returned struct contains the following fields:

See also

NXTmotor, SendToNXT, NXT_GetOutputState

Signature