2992
« on: April 15, 2003, 08:20:45 AM »
I checked your program, you should change all the custom functions to differentiated format. i.e. use the {dCusF} and not the {CusFn}.
When you use {CusFn}, every time when it executes, it continuously write to the EEPROM using the SETTIMESV command. This is very bad for the EEPROM because you can overwrite it for more than 100,000 times very quickly and wear out the EEPROM.
Secondly, when the EEPROM is being written, the system interrupt is turned OFF to protect the integrity of the data. This explains why you have no communication because the PLC communication interrupt is also turned OFF and would not accept serial command.
When you use the {dCusF} command, the SETTIMERSV only executes once when the logic is true and this will not have any impact on the communication because the interrupt is only turned off briefly.
Regards,
support@tri-plc.com