Internet PLC Forum
General => Technical support => Topic started 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
-
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.
-
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
-
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
-
Thanks!