Internet PLC Forum

General => Technical support => Topic started by: mvincent on November 21, 2011, 07:05:22 AM

Title: Reset without changing DM Values
Post by: mvincent on November 21, 2011, 07:05:22 AM
How can I reset all I/O's, counters, and sequencers, without losing my DM values?  I need to have an E-stop on a machine, but I don't want to lose all DM values....

Thanks
Matt
Title: Re:Reset without changing DM Values
Post by: support on November 21, 2011, 11:47:52 AM
Which PLC model are you using?

The best way is to execute a SAVE_EEP command and save the range of DM that you need to the EEPROM/FRAM and upon power on a 1st.Scan pulse can execute an INIT function and load the data from the EEPROM/FRAM back to the DM.

Title: Re:Reset without changing DM Values
Post by: mvincent on November 21, 2011, 08:39:11 PM
I am using  2 -F2424's and one Nano and only one F2424 has to retain the data as I am writing to the other slaves.  I looked at the save eep command and am still unsure on how to convert 16 bit integer data to to DM values.  I am using DM[110]-DM[115].  All help is appreciated!

Thanks
Title: Re:Reset without changing DM Values
Post by: support on November 21, 2011, 11:21:15 PM
You can run a FOR NEXT loop to save the data

FOR I = 0 to 5
   SAVE_EEP  DM[110+I],  I + 10  ' (save in FRAM address 10 to 15)
NEXT

RESET  ' after the data are saved, you then do a RESET.


'  the following should be in the INIT function
'  Functions to load from FRAM back to DM:

FOR I = 0 to 5
    DM[110+I] = LOAD_EEP(I+10)
NEXT





Title: Re:Reset without changing DM Values
Post by: mvincent on November 22, 2011, 06:13:49 AM
Thanks!