// This script demonstrates saving a number // of values permanently in the devices EEROM // those values remain even if the device is restarted // script is for Protocol Developer from V2.0 only // necessary script revision is 22 ScriptName "example ReadWriteEEROM" ScriptAuthor "FP/dA" ScriptVersion "V1.0" // just defining to keep 2 bytes, the size of a long variable var vw_Number: word; MoveConst( vw_Number, 2); // just use address 0 var vw_Address: word; MoveConst( vw_Address, 0); // do not define data !!! var vw_Data: word; // on first call we should read a value of zero // on next call we should read higher value ReadEEROM ( vw_Number , vw_Address , vw_Data ) ; // increment vw_Data by 2 CalculateWord( vw_Data, vw_Number, add, vw_Data); WriteEEROM ( vw_Number , vw_Address , vw_Data ) ; // now start the device again and check the values stop;