The objective of this tutorial is to explain the different ways to send new code to the PLC, assuming that there is already a working code in the controller in a MasterTool X project.
Components
Equipment: 1 computer/notebook.
Software: MasterTool X
Tutorial Sections
- ARCHITECTURE
- DEVELOPMENT
PRACTICAL SUMMARY
1. ARCHITECTURE
A computer/notebook will be required to use MasterTool X.
Figure 1. Computer running MasterTool X
2. DEVELOPMENT
When the project undergoes changes since the last download and the user logs in, MasterTool displays a window asking how the application should be sent or synchronized with the PLC. Each option has a specific behavior in relation to the CPU state and the code being executed.
Below, see how each option works.
1. Online Login with Changes
This option allows you to update the code without stopping the CPU, as long as the controller is in RUN mode.
- The new code is sent online, without interrupting program execution.
- The CPU continues running normally.
- Changes take effect in the next PLC scan cycle.
- Ideal for small adjustments, simple corrections, or quick tests.
Note: Not all changes can be made online. If the modification is not compatible, the software may prevent this type of login.
Figure 2. Online Login with Changes
2. Login with Download
This option performs a complete download of the application to the PLC.
- The updated code is sent in its entirety.
- The CPU is automatically placed in STOP mode.
- After downloading, the user must manually put the CPU in RUN mode.
- It is the safest way for:
- Structural changes
- Inclusion of blocks
- Significant changes in logic
Recommended when you want to ensure that the PLC is executing exactly the code of the project opened in the software.
Figure 3. Login with Download
3. Login without changes
In this option, no modifications are sent to the PLC.
- MasterTool only connects to the controller.
- The user will see the code that is running on the PLC, even if it is different from the open project.
- The CPU remains in its current state (RUN or STOP).
- Ideal for:
- Diagnostics
- Monitoring
- Field logic analysis
Important:
The project on the computer is not synchronized with the PLC. It only reflects what is running on the controller at that moment.
Figure 4. Login without changes
Update startup application
When this option is checked:
- The sent code will be saved as the PLC startup application.
- In case of:
- Power failure
- Restart
- Controller reset
- the PLC will automatically load this application when turned on.
In simulation mode, this option is usually not necessary, but in real-world applications it is essential to ensure automatic system restart.
Figure 5. Update startup application
3. PRACTICAL SUMMARY
- Login with online change: changes the code without stopping the CPU
- Login with download: stops the CPU and sends the complete code
- Login without change: only views the running code
- Update startup application: defines the code that will be loaded when the PLC is turned on
This understanding is essential to avoid undue shutdowns, loss of execution, or confusion between local design and real controller code.
Comments
0 comments
Please sign in to leave a comment.