Shop OBEX P1 Docs P2 Docs Learn Events
More Variables — Parallax Forums

More Variables

Mohamed RefkyMohamed Refky Posts: 47
edited 2006-08-04 19:46 in BASIC Stamp
Hello,
In my weigh scale application I already using keypad to inter numbers as setpoint 1 and setpoint 2.
Another application there are 8 ranges of weight for example: 400 to 420,421 to 440,....... and the user need to program the 8 ranges ( changeable ) and that means· many variables.Any idea would be appreciated.

((The application is used· for packing grape punnet and lamp is on for each range in a table with 8 channels))

Thank You
Mohamed Refky

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-08-02 20:53
    If the values don't change often, you can store them in the EEPROM used to store the program. Look at the description of the READ/WRITE commands in the manual. Keep in mind that EEPROMs have a limited number of times that any one location can be written (at least 100,000 times). Usually programs are designed to check the current value of a location and only do a WRITE if it is different from the value to be written like:
      read location,temp
      if temp = newValue then skipIt
      write location,newValue
    skipIt:
    
    


    Alternatively, some Stamp models have RAM memory that can be accessed with the GET/PUT statements. These have no constraints on the number of times they can be written, but the values go away when the power goes off. Again, look in the manual for descriptions and examples.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-08-02 21:15
    Mohamed -

    Which PBASIC Stamp are you using?

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Mohamed RefkyMohamed Refky Posts: 47
    edited 2006-08-04 16:16
    Bruce Bates,

    I use BS2
  • Mohamed RefkyMohamed Refky Posts: 47
    edited 2006-08-04 19:46
    Mike Green
    I need more variable to get data from the eeprom and my programe takes most the variable bit.

    ·
Sign In or Register to comment.