In this recipe, we will introduce the concept of Online Changes in RSLogix 5000. We are going to make an online modification to our VALVES routine by adding logic to check for a power-failure event.
In order to complete this recipe, you will need to have a PLC project that is free from errors, has been downloaded to the PLC, and is Online and Equal.
When you are online on your PLC (if you are not sure how to do this read the recipes Uploading explained (Simple) and Downloading explained (Simple)), right-click on Program Tags, and select New Tag… (or press Ctrl + W).
On the New Tag form that appears, create a new base type tag using the following values:
Name:
POWER_FAILURE
Description:
POWER FAILURE IN PROGRESS
Type: Base
Data Type: BOOL
Scope: MainProgram
Now, we are going to add our newly created POWER_FAILURE tag to the VALVES Ladder Logic Routine. Open the VALVES routine by double-clicking on it from the Controller Organizer tree.
Now, the tricky part with an online change in RSLogix 5000 is that we cannot make modifications to an existing Ladder Logic that is currently running. However, we can add new Ladder Logic Rungs. So the workaround for editing rung is to copy and paste an existing rung, modify it, and then delete the old rung. So, let's copy the existing rung at position one by right-clicking on it and selecting Copy (or press Ctrl + C).
Next, we will paste our rung under the existing rung by right-clicking on it and selecting Paste (or press Ctrl + V).
After pasting the rung, you will notice that iiiii will appear to the left of the rung indicating that it is pending insertion.
Now that we have added the new rung, we can edit and go ahead and delete the old rung. Right-click on the only rung and click on Delete (or press Delete).
After deleting the old rung, you will notice that ddddd appears to the left of the rung indicating that it is pending deletion.
Now we can make our modification to our newly inserted rung. Choose the rung we have inserted and click on the Examine Off element to add it.
Click on ? above the Examine Off element and associate it with the POWER_FAILURE tag. The following screenshot displays the Examine Off element with the associated tag.
The changes we have made to the routine will not execute until we finalize our program (or accept, test, and assemble it). From the drop-down menu, navigate to Logic | Online Edits | Finalize All Edits in Program (or press Ctrl + Shift + F).
A dialog box will appear confirming that you want to finalize all edits to the program. Click on Yes.
After finalizing the edits, you will notice that the iiiii and ddddd indicators have disappeared and the new logic is now live.