Shop OBEX P1 Docs P2 Docs Learn Events
Need help - dodgy error!! — Parallax Forums

Need help - dodgy error!!

ArchiverArchiver Posts: 46,084
edited 2000-04-05 16:08 in General Discussion
While doing the datalogging section of PBASIC we load in a program
using the template.bas file.

We get an error:

Error: can't malloc any more memory (more_nodes)!

What does this mean?? and how do i get around it??

Here is the code we use:

pause 5
serout S_OUT,T2400,(254,1)
pause 30

main:
low ADC_MPX
gosub adcread

serout 7,t2400,(254,128)
serout 7,t2400,("Sensor 1= ",#data," ")
high ADC_MPX
gosub adcread

serout 7,t2400,(254,192)
serout 7,t2400,("Sensor 2= ",#data," ")

pause 1000
goto main



If you require the other code for the sub-procs etc request and i
will deliver.

Thanks - any help appreciated.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-04-05 16:08
    At 02:04 PM 4/5/00 -0000, Mark Prentice promulgated:
    >While doing the datalogging section of PBASIC we load in a program
    >using the template.bas file.

    The above filename xxxxx.bas may well be invoking a Windows based Basic
    Compiler,
    in lieu of the PBASIC Interpereter. The correct syntax for the PBASIC
    Interpreter
    is:

    STAMPn[noparse][[/noparse].EXE] /m fn.ft DOS Version

    fn = file name,
    ft = filetype

    where: n = 1 or 2 (Version: Stamp I or Stamp II)

    m = 1 or 2 represents the serial COMM port to
    which the Stamp is physically attached

    or

    STAMP2SX[noparse][[/noparse].EXE] (as above) Stamp II-SX Version

    or

    STAMPW[noparse][[/noparse].EXE] (usually run alone w/o parameters) Windows 9x/NT Version


    >
    >We get an error:
    >
    >Error: can't malloc any more memory (more_nodes)!

    Alternatively this could indicate insufficient memory or file handles in a
    Windows based program.
    >
    >What does this mean?? and how do i get around it??

    What is the command line being executed, and with which operating system ?

    >
    >Here is the code we use:
    >
    >pause 5
    >serout S_OUT,T2400,(254,1)
    >pause 30
    >
    >main:
    >low ADC_MPX
    >gosub adcread
    >
    >serout 7,t2400,(254,128)
    >serout 7,t2400,("Sensor 1= ",#data," ")
    >high ADC_MPX
    >gosub adcread
    >
    >serout 7,t2400,(254,192)
    >serout 7,t2400,("Sensor 2= ",#data," ")
    >
    >pause 1000
    >goto main
    >
    >
    >
    >If you require the other code for the sub-procs etc request and i
    >will deliver.

    It should have nothing to do with the PBASIC code (unless it's an internal
    PBASIC Interpreter error - unreported to date, as far as I am aware).
    >
    >Thanks - any help appreciated.
    >
    More info <smile> !

    Regards,

    Bruce

    >
    >
    >
    >
Sign In or Register to comment.