MAP_GetOutputModule

Reads the IO map of the output module

Contents

Syntax

map = MAP_GetOutputModule(motor)

Description

map = MAP_GetOutputModule(motor) returns the IO map of the output module at the given motor port. The motor port can be addressed by MOTOR_A, MOTOR_B, MOTOR_C and 'all'. The return value map is a struct variable or cell array ('all' mode). It contains all output module information.

Output:

map.TachoCount % internal, non-resettable rotation-counter (in degrees)

map.BlockTachoCount % block tacho counter, current motor position, resettable using, ResetMotorAngle (NXT-G counter since block start)

map.RotationCount % rotation tacho counter, current motor position (NXT-G counter since program start)

map.TachoLimit % tacho/angle limit, 0 means none set

map.MotorRPM % current pulse width modulation ?

map.Flags % should be always ''. Flags are considered in MAP_SetOutputModule.

map.Mode % output mode bitfield 1: MOTORON, 2: BRAKE, 4: REGULATED

map.ModeName % output mode name interpreted by output mode bitfield

map.Speed % motor power/speed

map.ActualSpeed % current actual percentage of full power (regulation mode)

map.RegPParameter % proportional term of the internal PID control algorithm

map.RegIParameter % integral term of the internal PID control algorithm

map.RegDParameter % derivate term of the internal PID control algorithm

map.RunStateByte % run state byte

map.RunStateName % run state name interpreted by run state byte

map.RegModeByte % regulation mode byte

map.RegModeName % regulation mode name interpreted by regulation mode byte

map.Overloaded % overloaded flag (true: speed regulation is unable to onvercome physical load on the motor)

map.SyncTurnParam % current turn ratio, 1: 25%, 2:50%, 3:75%, 4:100% of full volume

Examples

   map = MAP_GetOutputModule(MOTOR_A);
   map = MAP_GetOutputModule('all');

See also

NXT_ReadIOMap,

Signature