Author Topic: Text Editing with Cursor keys  (Read 5501 times)

mauricetclarke

  • Newbie
  • Posts: 6
    • View Profile
Text Editing with Cursor keys
« on: March 13, 2006, 11:44:27 PM »
Hi

We have a program with multiple recipe numbers.  However, the customer wants editable text for each recipe.

We only have cursor keys to input, therefore I have come up with an array of DM numbers, 1 for 1st letter, 2 for 2nd etc.  Each DM is adjusted up and down using the cursor keys.  The left and right buttons change the DM being adjusted.  After each change to the DM no, a text string is rebuit using a For...Next loop.

The text can then also be saved to EPROM.

It works well, but really uses up the EPROM!!!  Does anybody have any neater solutions?

Thanks  
Maurice Clarke

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Text Editing with Cursor keys
« Reply #1 on: March 19, 2006, 03:20:38 AM »
If your program contains a lot of text string, you could save them inside the EEPROM first using a seperate program that executes "SAVE_EEP$" command to write these text string to the EEPROM.

Your actual program will then be transferred to the PLC and your program can then retrieve these text when needed by referencing them using the LOADEEP$(n) command where n is the location of the text.

If you add an M2018P optional EEPROM you get to store more than 300 strings inside the EEPROM for later use. This is one way of reducing the EEPROM program memory needed. The disadvantage is that you need to load two programs - one to save EEPROM data and the second one is your actual program that will use the EEPROM data, but it will work if the text strings size is becoming a problem for your program.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS