To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 1822
1821  |  1823
Subject: 
Re: NQC/BricxCC test
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Tue, 18 Oct 2005 19:37:56 GMT
Viewed: 
6011 times
  
In lugnet.robotics.rcx.nqc, Charles Tomkins wrote:
Duh! I had 'only if active' ticked and I dont suppose that changes in my light
sensor were enough to trigger it.

Only if active is meant to cause the watch window to quit polling for values if
some other BricxCC window is the active window.  When graphing this means that
after you bring up the graph window you need to click back on the Watch window
to make it active again or else no data will get added to the graph.  I just
noticed that I accidentally introduced an empty series into the graph form
called Series1.  It will be removed before the next official release.

I now have watching the brick & graphing
working! I notice that (unused) counter 0 and 1 take on the values of var 0 and
1 and that variables declared inside a task cannot be read, but perhaps this is
all how it should be :-)

In the RCX the 3 counters overlap the first 3 variable slots.  And only global
variables can be accessed in "immediate" mode (i.e., the mode BricxCC uses to
poll for the values it reads in the Watch window).  Variables declared inside a
task are usually local variables but that depends on whether there are any local
variables available for NQC to use.  If there aren't any then NQC falls back on
using global variables.

int a; // global variable

task main()
{
  a++;
  int x[16]; // there are only 16 local variables
  int y = 10; // so the rest are global variables
  int y1 = 10;
  int y2 = 10;
  int y3 = 10;
}

*** Var 0 = a
*** Var 32 = x
*** Var 1 = y
*** Var 2 = y1
*** Var 3 = y2
*** Var 4 = y3

*** Task 0 = main, size: 25 bytes
000 sumv     var[0], 1                         24 00 02 01 00
005 setv     var[1], 10                        14 01 02 0a 00
010 setv     var[2], 10                        14 02 02 0a 00
015 setv     var[3], 10                        14 03 02 0a 00
020 setv     var[4], 10                        14 04 02 0a 00

Total size: 25 bytes

One small thing: If I open and modify an existing program and accidently go to
close Bricx  the program notices that 'the file has been modified' but when I
try to cancel the closing (in order to be able to  'save as' under a different
name) Bricx just closes rather than cancelling.

This is a bug in the non-MDI (tabbed) window mode.  If you use the old MDI mode
it works correctly.  I will figure out a way to make it work correctly in tabbed
mode as well and get the fix into the next official release.

John Hansen



Message is in Reply To:
  Re: NQC/BricxCC test
 
(...) Duh! I had 'only if active' ticked and I dont suppose that changes in my light sensor were enough to trigger it. I now have watching the brick & graphing working! I notice that (unused) counter 0 and 1 take on the values of var 0 and 1 and (...) (19 years ago, 18-Oct-05, to lugnet.robotics.rcx.nqc)

4 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR