The invention provides an
EEPROM (Electrically Erasable Programmable Read-Only Memory) data read-write method and device based on a real-time
industrial Ethernet and a medium. The method comprises the following steps: setting an initial offset and an access length of
EEPROM access on a target slave
station according to
EEPROM capacity parameters, and establishing a
paging transaction; when the
paging transaction is of a reading type, sequentially triggering EEPROM control registers of the target slave
station, reading EEPROM data to a buffer area of the
master station according to pages from the initial offset, and executing
cyclic redundancy check on each page of read data; when the
paging transaction is of a write-in type, reading a to-be-written
data file into a buffer area of the
master station, writing the to-be-written
data file into an EEPROM (Electrically Erasable Programmable Read-Only Memory) of a target slave
station according to a page sequence from initial offset, and after writing of each page is completed, reading back data of the page and executing
cyclic redundancy check; and when all page data of the paging transaction of the reading type or the writing type passes
cyclic redundancy check, outputting a transaction completion state to the soft
programmable logic controller. According to the method and the device, the technical effects of safely, efficiently and accurately reading and writing the EEPROM on line in batches and ensuring the
data consistency can be achieved.