DirectSOFT has no single-word clear command, so you clear four V-memory words the ladder way: load the constant K0 with LD and send it to each recorded address with an OUT, once per cycle on the transition out of the completed state, after the HMI has captured the displayed values. The article shows the rung, a timed example and the online checks for one clean cycle.
Four V-memory words hold the results of a finished calculation sequence, the HMI has shown them, and the machine is waiting to start again. You want those registers empty before the next cycle. The editor gives you no one-click word clear to do it. The fix is one rung: an LD K0 feeding four OUT instructions, one per recorded V address, fired once on the falling edge of the sequence-complete bit after the HMI has read the values. Timing matters here. A reset that fires early erases results the HMI still needs. A reset that stays on erases the next cycle's results as fast as the calculations write them. This page gives you the trigger, the four-write rung, a worked example with the arithmetic, and the online checks that settle both failure modes.
Can DirectSOFT clear four V-memory words after the HMI reads them?
Yes: DirectSOFT has no single-word clear command, so you write the value you want the ladder way. Load the constant K0 with LD and send it to each of the four recorded V addresses with an OUT, once per cycle.
The command you remember from other PLC software cleared a word inside the editor. DirectSOFT treats a cleared register as a value the running logic writes. The writing itself is stock RLL: the standard RLL instructions chapter of the DirectSOFT user manual documents the OUT instruction as the element that stores the accumulator to an output location, and a V-memory word is a legal destination for it. So the fix is not a hidden menu item; it is one rung you add to the program, with four OUTs and a trigger you choose.
Why do the four words still hold the last cycle's results?
Because V-memory in this PLC family is non-volatile. The DL205 user manual's memory appendix assigns the non-volatile V-memory area to RAM and flash ROM or EEPROM sharing the same addresses, so the last value written survives power-off, power-up and every idle wait between cycles.
That persistence is the same property behind PLC retentive memory that keeps pump states through a power loss, and it is why the waiting state between cycles cannot be trusted to start clean. The registers hold whatever the last cycle left: complete results, partial results, or the zeros of an earlier reset. Clearing them is a deliberate write, and the only real question is when that write should happen.
What do you need before you add the reset rung?
Three things: the exact addresses of the four result words copied from the project, the event that tells you the HMI has captured them, and one spare internal bit to make the reset a one-shot that fires on a single transition.
Get the four addresses from your own project. Open the rungs where the calculations store their results and copy each destination address, or click the words online and read them from the data view. Then run the cross-reference listing on those addresses and find every existing writer before you add a fifth. If an address you know is changing shows no writer at all, older DirectSOFT releases leave the system V-memory range out of cross reference by default, and the vendor's FAQ lists an upgrade as the fix. Last, name the event that means the display has what it needs: an HMI read you can time from the project, or an operator acknowledgement bit. If the read timing is undocumented, use the acknowledgement bit; it is visible online, which an assumed poll period is not.
When should the zero write fire so the HMI keeps its values?
Fire the reset once, on the transition out of the completed state, and only after the HMI's next read has captured the displayed results. An unconditional rung left true through the next cycle erases fresh results as the calculations write them.
Build that trigger as a one-shot on the falling edge of the sequence-complete bit. The pulse then lasts one scan, and the rung is false again before the next cycle starts writing. A level-triggered rung left on across the waiting state re-zeros every word the new cycle fills, and the last write in each scan wins. The single-fire discipline is the same one the piece on a PLC flag that must trigger an HMI event once, and the reset path to check walks through. If operators acknowledge the results on screen, their acknowledgement is an even better trigger. The values live exactly as long as someone still needs them, and the reset follows the acknowledgement.
How do you write zero to each word with LD K0 and OUT?
Load the constant K0 into the accumulator with LD, then add one OUT per word so each of the four recorded addresses receives the zero. Four explicit destinations keep the reset auditable down to the single word, which is the point when only four locations need clearing.
- Record the four result-word addresses from your project and substitute them at every destination below; this page cannot name them for you.
- Place an LD K0 at the left of the new rung, inside the branch driven by the one-shot bit, so the accumulator holds the constant zero.
- Add four OUT instructions on parallel branches off that LD, one per recorded address. Each OUT copies the accumulator to its own word, so all four zeros land in the same scan.
- Drive the rung with the one-shot from the sequence-complete falling edge, or from the operator acknowledgement bit if the display timing is undocumented.
- Save the project and download the changed program with DirectSOFT's normal transfer controls.
- Make the download with the machine in a safe state. The PLC is about to run different logic, and the edit deserves the same care as any other program change.
What does the worked example look like with a 20-second wait?
Suppose the completed state holds the results for 20 seconds, the HMI polls the four words every 500 ms, and the PLC scan takes about 5 ms. The values survive roughly 40 HMI reads before the one-shot zeros them, and the new cycle starts from four clean words.
These three numbers are example inputs, so take yours from the job. At the end of the cycle the calculations store the results. The HMI polls at 19.5 s and 20.0 s and shows them. The completed state ends at 20 s. The falling edge fires the one-shot, the four OUTs execute inside one scan, and by 20.005 s every word reads K0; the poll at 20.5 s is the first to see the zeros. The window arithmetic: 20 s divided by 0.5 s per poll is 40 reads of valid results before the reset, and the reset erases them 5 ms later in a pulse one scan wide. The next cycle's first calculation then writes fresh values into words that started that cycle at zero, so no figure from the finished cycle can reach the new one.
How do you check the reset worked without wiping the next cycle's results?
Watch the four words, the trigger bit and the HMI screen online for one full cycle. Values hold through the display window, drop to zero on the transition, and refill with fresh results on the next cycle with no second drop.
Run that cycle with the PLC online and the data view open on the four words plus the sequence-complete bit. Two signatures tell you the trigger is wrong. Words that clear and then return to nonzero have a later writer behind them; find it in the cross-reference listing, because the last-write-wins rule that decides who wins when two HMIs write to one PLC decides rung conflicts the same way. Words that clear before the screen ever shows the results mean the trigger fired too early; move it to the operator acknowledgement. A trigger that stays on into the new cycle keeps re-zeroing fresh results; it was wired as a level, so fix the edge.
Recommendation: clear the four words with one LD K0 and four branched OUT instructions under a one-shot bit driven by the transition out of the completed state, enable the rung only after one online cycle shows the results surviving the full display window, and switch to a fill instruction once the reset grows past about a dozen neighboring addresses.
When is a fill instruction better than four OUT instructions?
A fill suits a long contiguous block and four OUTs suit exactly four words. If the reset ever grows past a handful of neighboring addresses, one fill rung covering the range beats four, eight or twelve individual writes for maintenance and audit.
The fill instruction takes the starting V-memory location and a count, and writes the same value to consecutive words; the walkthrough on clearing a V-memory range with the FILL instruction shows that rung and its trigger. For the four-word case, explicit destinations win: each OUT names one address, a mis-keyed address shows up as a single wrong word, not a shifted range, and anyone reading the program sees the whole reset in four named destinations.
Questions
Does zeroing a V-memory word change what the HMI screen shows right away?
The stored value in the PLC changes when the OUT executes, within that scan. The screen changes on the HMI's next read of the address, so with a 500 ms poll period the display can show the old result for up to half a second after the zeros land. That delay is harmless here because the reset only fires after the results have served their purpose, but it is worth knowing when you watch the words online.
Can the four OUT instructions sit on one rung?
Yes. Put the LD K0 at the left of the rung and branch four OUT instructions across it, one per recorded address. Every OUT copies the accumulator to its own destination, so all four words receive the zero in the same scan. Keeping them on one rung under one trigger makes the reset a single auditable block instead of four scattered writes.
What happens to the zeros if the machine sits idle longer than planned?
They stay in place. The non-volatile V-memory area holds its contents through idle time and power cycles alike, so a zero written at the end of one shift is still there when the next one starts. The new cycle's first calculation overwrites the words with fresh results, which is exactly the handover you want: nothing from a finished cycle ever reaches an unfinished one.
Does the same method work for eight or ten words?
Yes, up to the point where the rung gets crowded. Each added word is one more OUT branch under the same trigger, and the one-shot timing works the same. Past roughly a dozen neighboring addresses, a fill instruction that covers the range in one rung is easier to read and maintain, which is what the FILL walkthrough on this site is for.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.