Troubleshooting Data Logging Memory Usage on Siemens S7-1200 PLC

Question:

I have implemented datalogging on an S7-1211 PLC. Despite its basic features, the 1MB memory capacity seemed sufficient. Each log consists of 222 bytes and records an array of 21 UInt tags along with a timestamp during logging sessions. Surprisingly, after only 5 logs, a message indicating insufficient space appeared. The diagnostics page on the web server reveals that each log actually consumes 132.11KB. This discrepancy raises the question: am I overlooking something? Even with an MMC, it appears that the memory is depleting faster than anticipated.

Top Replies

Have you checked the value of your DataLogCreate.Status and memory usage to troubleshoot any issues? The DataLogCreate.Status value may provide insights into the problem at hand. Additionally, monitoring memory usage can also help identify any potential issues. For more information, visit the link: https://www.plctalk.net/qanda/showthread.php?t=137603

The error code 80B3 is indicating insufficient storage on the device, as the memory usage is already at 93.2%. Upon downloading a csv file, it should only take up 222B of space, but deleting the datalog frees up 132KB. It is surprising that larger logs have been stored on the PLC without a memory card.

Mas01 inquired if the provided link could help with their query regarding PLC data logging. After setting up the PLC to log at 720 logs every 2 minutes for a maximum of 24 hours, they noticed that the data size was larger than expected. This led them to adjust the log settings to optimize memory usage. However, upon further investigation, they discovered that the data was saved in a CSV file format, with each entry consisting of 217 characters. This sheds light on the discrepancy in data size compared to the expected log size. The challenge now lies in accurately determining the amount of data being utilized.

It looks like you've run into a small snag. Smaller PLCs like the S7-1211 include overhead in their calculations, which can inflate the size of the logs. The S7-1211, for example, includes system, alarm, and event data in its logs, which can substantially increase their size. This might be the discrepancy you're seeing between your calculation of the log size and the actual memory usage. I'd suggest reducing the frequency of your data logging or limiting the number of variables involved. It’s also worth considering S7-1200’s web server, which is known to consume memory due to its own diagnostic buffers. Watch out for these aspects and see if it makes a difference.

It seems like you're dealing with overhead in your datalogging. Although your log data size is only 222 bytes, there are operational overheads and file management elements in the PLC system that would consume additional space. Also, timestamps can sometimes take up more space than expected, particularly if encoded in string format. Plus, S7-1211 PLCs are known to reserve a significant amount of memory for system usage, which can reduce your effective available memory. Try to optimize your logging intervals or, if possible, minimize your data set to use less memory. If the problem persists, you might have to consider using a PLC with a larger memory capacity.

Your observation is correct and no, you aren't overlooking anything. Indeed, the PLC memory handles more than just the raw data of your logs. It also keeps track of overhead information for system management. Each byte you log gets bundled with additional metadata for retrieval and system management purposes, causing your log to consume more space than just the raw data size. It looks like the difference in data size is due to this metadata. Also, memory might be consumed by other processes running on the PLC. You might want to check what other processes are running and how much memory they're utilizing.

It sounds like you've run into a common issue with data logging on the S7-1211! The discrepancy you’re seeing could be due to several factors, including overhead from the logging mechanism or how data is stored and indexed in the memory. Sometimes, the PLC software reserves additional space for caches or temporary storage, which can really eat into the available memory more quickly than expected. You might also want to check if there are any logs or diagnostic data being generated that you’re not accounting for. A good approach could be to look for ways to optimize your logging, like reducing the frequency of logs or trimming unnecessary details to better manage your memory space.

It sounds like you're running into some unexpected overhead with the datalogging feature. The discrepancy in memory usage could be due to a number of factors, such as additional metadata being stored with each log entry or possibly the way the PLC handles memory allocation. Sometimes system logs or temporary files can also use up space. Have you looked into the configuration settings for your logging mechanism? There may be options for optimizing memory usage or settings that affect how frequently data is flushed to storage. It could also be worth checking if there are any updates or patches for your PLC that address memory management issues.

It sounds like you've hit a common pitfall with data logging: the difference between raw data size and how it's actually stored can be significant because of overhead, including metadata and file structure used by the PLC. Each log entry might not just be the data itself; there could be additional processing or format overhead taking up that extra space. It might be worth checking if there's a way to optimize the data format or logging frequency, or even explore compression options if supported. Also, ensure that the memory settings in your configuration align with your assumptions. It’s easy to overlook these details, but they can make a big difference in overall memory management!

More Replies →

Streamline Your Asset Management
See How Oxmaint Works!!

✅   Work Order Management

✅   Asset Tracking

✅   Preventive Maintenance

✅   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

You must be a registered user to add a comment. If you've already registered,
sign in. Otherwise, register and sign in.

Frequently Asked Questions (FAQ)

FAQ: FAQs:

Answer: 1. Why is the memory usage on my Siemens S7-1200 PLC depleting faster than expected during data logging? - The discrepancy in memory usage could be due to factors such as additional overhead, data formatting, or system variables that contribute to the increased consumption of memory during logging sessions.

FAQ: 2. Is the specified 1MB memory capacity on the S7-1211 PLC sufficient for data logging?

Answer: - While the 1MB memory capacity may seem sufficient based on the data size per log, factors like actual memory consumption per log and other system variables can affect the available memory for logging purposes.

FAQ: 3. How can I optimize memory usage during data logging on the Siemens S7-1200 PLC?

Answer: - To optimize memory usage, consider reducing the size of each log entry, limiting the number of logs stored, reviewing the data formatting and storage method, or implementing periodic memory management practices to ensure efficient data logging operations.

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  →