Host Engineering Forum

General Category => DirectSOFT => Topic started by: Pedro on June 09, 2008, 06:40:25 AM

Title: Unwanted NOP,s
Post by: Pedro on June 09, 2008, 06:40:25 AM
After editing a programm I end up with a mutitude of NOP  rungs after the END.
These rungs do not print but I can not delete them.
Any ideas how to delete them?
Title: Re: Unwanted NOP,s
Post by: 72hdflh on June 09, 2008, 07:48:54 AM
I don't think there is a way!! There should only be around 8 of them.
Title: Re: Unwanted NOP,s
Post by: Greg on June 09, 2008, 08:22:33 AM
72hdflh is correct, Pedro. NOP just means "no operation" and they don't do anything and don't count as taking up space in the PLC's memory. They are only displayed by DirectSOFT because that is what is in the PLC's memory; nothing. Nevertheless NOPs are valid instructions.
Title: Re: Unwanted NOP,s
Post by: Narf3684 on June 17, 2008, 12:33:02 AM
Greg is right. A simple way to describe it is that they are there for you to expand your program. They don't really exist, they are just there for you to make more rungs out of them if you need them.
Title: Re: Unwanted NOP,s
Post by: franji1 on June 17, 2008, 10:18:06 AM
A simple way to describe it is that they are there for you to expand your program. They don't really exist, they are just there for you to make more rungs out of them if you need them.
Actually, they do exist in the PLC, but at the DirectSOFT level they are "virtual" since most people don't reference addresses way past the end of their programs.

The Ladder memory in a PLC is a fixed size.  So, if you have 7K words of ladder memory, when you clear the PLC program, you actually have 7K NOP instructions.  If you stuck an END statement at address 7K, your program would execute 7000 Null Operations on every PLC scan, and, believe it or not, this would take some time to execute!

This is one of the reasons why there is an END statement, so that you can tell the ladder execution engine in the PLC firmware to stop processing Ladder Memory.  If it weren't for that END statement, you would ALWAYS be executing the ENTIRE memory on EVERY PLC scan!