Are you looking this product? Now you can get product in EXE Format,just following step by step until finish you will be guided downloading this book for free, Enjoy it.
By the method of optimization can greatly reduce the number of program statements, make the program more concise, readable, does not need to do time-consuming because the type of conversion, the program also improved operating efficiency. Mathematical computation and the greater the efficiency the more apparent.
Disadvantage is that many take up two bytes of memory, since the program can not use VW0. S7-200 of RAM but is much room is generally used up, and to 226, for example, up to 10K of RAM, even never more than 1K. The RAM is purchased, not white do not, do not also wasted.
Similarly, if byte variables often need to convert between character type variables, so that the variable occupies a single byte of memory word width of a waste of a byte to avoid the type conversion. Concrete steps are as follows:
1: According to engineering requirements for function block programming, write subroutine
In PLC In the subroutine for the purpose of some specific control procedures for the preparation of relatively independent. Implementation of the subroutine call instruction CALL, etc., if conditions not satisfied subroutine calls, the program scans carried out on only in the main program, and not to scan this subroutine, thus reducing unnecessary scan time.
2: use of words or pairs of words is said to give point to control the output DO
In PLC Applications are usually a large number of output control, with words or pairs of words is said to give point to control the output DO can increase the speed, as long as the actual application requirements, a reasonable distribution of the output address, change control of the output control words, can greatly reduce PLC program execution steps, thus speeding up the PLC program runs.
3: Pulse trigger SET, RESET PLC, use the SET command can be executed only once, do not run this command each scan are very fit and pulse output (PLS / PLF) with instructions to use. Some engineers ignore this problem, using conventional methods to drive the SET command, inadvertently increased the PLC program scan run time.
4: to avoid the type conversion, as follows:
To S7-200, for example, the memory format and PC, we often use just the opposite, it is the high word first, low-word in the post. So we can put the word after the two-byte variable, the program will initialize the first two bytes of clear (process Other May not be used where the two bytes).
If we define the word when the definition of a variable symbol in VW2, while maintaining VW0 the value of zero. The program can access the variable VW2 to font, but also can VD0 double font access, to avoid the type conversion.
Order to avoid confusion when used, the best definition of a clear symbol to distinguish the word type and double-word type. Strongly recommended in this category Hungarian notation: The indicator variable type prefix with first letter capitalized group of meaningful English words Cooperation Variable name. I used to use the following suffix: b???? Byte-type variable (byte)
W???? Font variable (word) D???? Double word variable (double) R???? Real variables (real) F???? Bit variable (flag) Btn?? - From push-button reset input (button)
Sw???? Or self-locking button switch input (switch)
Sig?? - Sensor , Coding level signal input (signal)
Rly?? - Output Relay Position