LEGO Engineering

| | | | | | | |
What are the Set and Poll System Parameter icons used for?


20th of April, 2010

(1 )
100% thumbs up 0% thumbs down

These icons set or read (poll) system parameters of the NXT or RCX. The available parameters can be explored in the Hardware Settings view of the Detective, which you can open using the Projects menu.

Most of the parameters have a letter front of their names to indicate the data type expected; n for an integer, b for a boolean (1 or 0), etc.

Some of the parameters make more sense to read than to set, as they can provide the user with debug information on the NXT's operational state.

There are different variables for NXT and RCX, and you can see which variables apply to which microcontroller by connecting the appropriate unit to the PC (USB for the NXT, IR tower for the RCX) and looking at the table of variables in the Hardware section of Detective.

Example Uses:

bPlaySounds - set to 0 to disable the playing of sounds.

nSysTime - read the current system time (in seconds * 1000)

nClockMinutes - read the current system uptime, in minutes (not rounded)

nProgramNumber - read or set the current program (0-4 for programs 1-5)

nVolume - set the volume of the speaker

nWatchFormat (RCX)  0 = HH:MM   1 = MM:SS  2 = M:SS:(1/10 S)

nPowerDownDelay - delay until the RCX automatically turns off (minutes)

nViewState - state of the View mode (RCX):  0 = clock, 1-3 = sensors 1-3, 4-6 = motors (inputs) A-C, 8 = Battery (raw mV)

nAvgBatteryLevel - average battery voltage (mV) for current uptime

bTransmitterRange (RCX) - IR transmitter sensitivity (0 = near, 1 = far)

NXT-specific Variables:
kSystemNxtHideDataFile - when set to 1 (true), the Datalog file is not visible in the menu

kSystemNxtRechargable - this will read 1 (true) when a rechargable battery pack is being used.

kSystemNxtMaxDataFileCount - The number of Datalog files allocated by the NXT

kSystemNxtButtonPressed - This will return a button number if one of the NXT's buttons is being pressed when the variable is polled, or 65535 if no buttons are being pressed.

NXTScreenFormat - this returns an integer value based on what display mode the screen is in (when a program is running) **information on specific values TBA**

kSystemNxtPidUpdateIntervalInMsecs - this is a value (in milliseconds) that determines how quickly the sync motor controller updates the control values for the slave motor (using a PID algorithm)
   :
   :
* :
* :
 


Home | About Us | Contact Us

© 2013 Center for Engineering Educational Outreach, Tufts University
© 2013 The LEGO Group. All rights reserved.