How to Override Memory Variables in STEP7: Complete Guide

Question:

Hello, I am encountering issues when attempting to modify variables in STEP7. I am trying to override a memory variable using the Variable Table (VAT) without success. For instance, let's consider the following code: A I 0.0 = M 3.0. The value of M3.0 typically relies on the status of input I0.0. To facilitate testing, I wish to manually adjust M3.0 to a specific value (either 1 or 0) regardless of I0.0's status. Is it achievable via the VAT Modify function? It is imperative for me to be able to force the value of M3.0. How can this be accomplished? Thank you.

Top Replies

Forces are restricted to i/o operations only, meaning M and DB addresses cannot be directly forced. While they can be altered in a VAT table, this does not prevent the PLC program from making changes to them.

Are you looking to manipulate the M and DB addresses in your PLC system? I may have a solution for you. I have a method to simulate running PLC programs without actual I/O connections, using tools like PLC-SIM. When using a simulate-bit, it serves two purposes: 1. Reading of inputs and outputs from real devices is disabled to prevent any potential damage. 2. A simulated environment mimicking the real-world connections is created, allowing your programs to run as if everything is connected. Additionally, you can manipulate "inputs" without simulation code. Is this what you are looking to achieve?

Hello Jesper. The example with I0.0 is just a simple one, but in reality, I have more complex logic that involves setting or resetting M3.0. This value is then passed on to another part of the logic. I am looking to test a motor drive sequence without specific initial conditions during maintenance. I aim to manually set M3.0 and have that value processed further. While I could achieve this without simulation, it would require bypassing certain contacts in the field. By forcing this marker memory, I can avoid altering the program logic and potentially leaving it in a different state. Thank you for your assistance.

To ensure continuous availability of maintenance functions, it is essential to incorporate them into the existing program without requiring modifications to the PLC programming. Maintaining these functions as part of the program ensures seamless accessibility and efficient operations.

Jesper, I appreciate your response. In addition to the simple example with I0.0, I also have a more complex logic that involves setting or resetting M3.0. This value is then used in another logic sequence. During maintenance, I need to test the motor drive sequence without certain initial conditions. I want to be able to manually control M3.0 and have that input simulated for further processing. While I could achieve this without simulation, it would require bypassing some field contacts. By forcing this marker memory, I can avoid making changes to the program logic that may result in errors if left uncorrected. If anyone has found a solution to this issue, kindly share it with me. Thank you.

Hey there, this can indeed be tricky but it's definitely achievable. While in Debug mode, the Variable Table (VAT) Modify function is your best friend. You can use this function to overwrite the value of M3.0 manually, regardless of the status of I0.0. Just locate M3.0 in your VAT, click on the value and enter your desired value (0 or 1 in your case). Remember, these modifications are only temporarily and will not affect the primary code. It's a super handy way for efficient troubleshooting, testing and simulation. Good luck!

It sounds like you’re trying to force a memory variable in STEP7, which can be a bit tricky. The VAT Modify function typically allows for monitoring but might not let you override values directly while the PLC is running. One workaround is to use a separate block or temporary variable to control M3.0. You can create a simple logic condition to manually set M3.0 without conflicting with the real input I0.0. Just make sure to engage the modification only when you need it for testing and disable it afterward to avoid unintended consequences in your logic. Good luck!

It sounds like you're trying to force a value into a memory variable, which can be tricky in STEP7. To manually override M3.0, using the VAT (Variable Access Table) is usually a good approach, but ensure that you’re correctly selecting the variable and using the 'Modify' function. If it’s still not working, you might want to double-check the data type and access settings for M3.0. Sometimes, using a watch table or even directly modifying the variable in the online monitoring might help. Alternatively, you can consider temporarily modifying the logic in your program to force M3.0 without relying on I0.0 for testing purposes. Hope that helps!

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.

To add a comment, please sign in or register if you haven't already..   

Frequently Asked Questions (FAQ)

FAQ: 1. How can I override memory variables in STEP7 using the Variable Table (VAT)?

Answer: Answer: To override memory variables in STEP7 using the Variable Table (VAT), you can use the Modify function to manually adjust the value of a specific memory address regardless of its normal behavior based on other variables.

FAQ: 2. What is the purpose of overriding memory variables in STEP7?

Answer: Answer: Overriding memory variables in STEP7 allows you to control and manipulate specific memory addresses for testing purposes, enabling you to force values without being dependent on other variables' statuses.

FAQ: 3. Can I force the value of a memory variable in STEP7 to a specific value for testing purposes?

Answer: Answer: Yes, you can force the value of a memory variable in STEP7 to a specific value by manually adjusting it using the Variable Table (VAT) Modify function, even if it would typically depend on the status of other variables.

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  â†’