Shop OBEX P1 Docs P2 Docs Learn Events
System vars & PINK — Parallax Forums

System vars & PINK

TumblerTumbler Posts: 323
edited 2009-07-19 17:53 in BASIC Stamp
Hello,
PINKdocs V2.1 said...
The PINK Module has 100 general purpose variables and 18 dedicated system variables. Each variable can
store up to 64 bytes max. The first 20 general purpose variables (0 through 19) can be written to flash memory
as power-on defaults.
The remaining general purpose variables (20 through 99) are RAM variables only and the
data is lost when power is cycled.

I can't set the email variables as default value. All data is lost when power is cycled.
The first variable (email to) is always empty when i refresh the system variable page (VV_Show.htm)

Can i fix this problem?

Having Firmware Version: SB70 Parallax Web server 1.32

Last year i had to get a new one from antratek, couldn't erase files trough ftp.

Comments

  • xanatosxanatos Posts: 1,120
    edited 2009-07-17 14:11
    You can only set those vars' default (power-on) value by using the "Update Flash" and "Set Default Value" columns on the VV_Show.htm page. You can write to them with either the embedded web page or with the microcontroller - but these two items write only to the RAM value, NOT to the flash location. If you wish to have a default email to value set, you must set it manually with the VV_Show.htm page by selecting "Set Default Value" under "Update Flash".

    I went throught this fairly recently as I have an application where I wanted to be able to write to vars 0 - 19 in an application to allow data persistence in my application through a power cycle, but currently it cannot be done. There is talk of a firmware revision coming up, and I have expressed my sincere hopes that this can be done - but I have heard nothing on this as even a possibility. It would be VERY useful to have a separate way of writing to flash vars, from either the stamp or the embedded web code. We'll see.

    Please let me know if I have properly answered your question.

    Dave X
  • TumblerTumbler Posts: 323
    edited 2009-07-17 19:21
    xanatos said...
    you must set it manually with the VV_Show.htm page by selecting "Set Default Value" under "Update Flash"

    Yes i know, that's the way i set the vars.
    The problem is only the first var (Nb_varET : email To)
    Sometimes it will be set during power cycling. but almost id didn't.
  • xanatosxanatos Posts: 1,120
    edited 2009-07-17 20:07
    Hmmm... that - as you know - shouldn't be happening. When I set that var on my own PINKS, it held even after multi-day power downs. In fact, I believe the initial value I set in there is STILL in there, despite the fact the original PINK I got is now off in a client's business. If you are setting the var properly as described, the unit itself MAY be out of spec for some reason. Try calling Parallax tech support. While I've never had to return anything, I've read many posts that have led me to believe that they are extraordinarily accomodating of folks needing repairs/replacements. You may have the one in 100,000+ that is a bit "off" somehow. Keep me posted as to what happens and what you find out.

    Dave X
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-07-17 22:26
    Tumbler,

    Are you displaying the variable on a web page? If so, that could be the issue. A small bug was discovered several months ago where if the first e-mail variable was displayed on the web page it would cause it to be reset. This does not affect the default saved in flash memory, just what it in RAM at the time. The bug has been corrected in current firmware.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • TumblerTumbler Posts: 323
    edited 2009-07-18 04:30
    Hello Chris,

    I have made some tests here.

    FIlled in the e-mail vars, programmed a bs2 so that the pink sends an email when i plugin the power.
    The first 2 times i had to reconnect the power, no email was sent.
    Third time: bingo! an email was sent. Every time i push the reset button (bs2) an email was sent.
    Now i looked at the VV_Show.htm -page: mailTo var was empty. freaked.gif (and not receiving emails anymore, well well)

    Looks like the bug you described.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-07-18 20:43
    I understand what you’re saying, but I am unclear if during any of that the variable in question is being displayed on a user web page hosted by the PINK module. That is the nature of the bug I described. If you’re not displaying that variable on a user created web page it shouldn’t be happening.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • TumblerTumbler Posts: 323
    edited 2009-07-19 04:14
    If you’re not displaying that variable on a user created web page it shouldn’t be happening. => No problems anymore.

    but I am unclear if during any of that the variable in question is being displayed on a user web page hosted by the PINK module. => no. (not anymore) [noparse]:)[/noparse]
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-07-19 17:53
    Tumbler,

    Yeah typically a user wouldn’t be displaying those variable on a page, although there are several types of applications where it is necessary as pointed out by the forum member who originally discovered this little bug. If your application requires you to display the variable then you can arrange as before to have your PINK module swapped out for one with newer firmware in which the issue has been fixed. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
Sign In or Register to comment.