110 likes | 127 Views
This guide delves into data treatment, comparison, transfer, and displacement in logical controllers' programming. Understand how to compare values, transfer data, and shift flags effectively. Learn about special relays and logical conditions to optimize programming.
E N D
4- Treatment of Data Logical controllers' programming 4.1- Comparison of Data Programming
CMP Logical controllers' programming This instruction allows to compare two numeric values being the result dice for the state of three special relays. 4.1- Comparison of Data The instruction CMP is always preceded by a logical condition that when it is ON it allows the accomplishment of the comparison.
CMP Logical controllers' programming 4.1- Comparison of Data Whenever this instruction is executed, the value contained in 001 is compared, with the value contained in 002.
CMP Logical controllers' programming If 1 > 2 the relay 255.05 is On If 1 < 2 the relay 255.07 is On If 1 = 2 the relay 255.06 is On 4.1- Comparison of Data
CMP Logical controllers' programming These special relays referred previously depends on controller for controller, for the that the user will have to discover in each controller which the relays that it allow to do it these functions. 4.1- Comparison of Data
4.2- Transfer of Data Logical controllers' programming MOV The instruction MOVE it allows to copy the value contained in 001 for the expressed destiny in 002, whenever the logical condition that precedes this instruction is ON.
Example of application of the instruction MOVE Logical controllers' programming The instruction MOV copies the Counters's content (001) for the channel of exits (010). The Counter decrease to the rhythm of the pulse generated by the special relay. 4.2- Transfer of data
Example of application of the instruction MOVE Logical controllers' programming When the counter reaches 0 (zero) automatically it gives him the counter's reset and east returns to the initial value. So that the function Move it is always executed, it has of being always preceded by a special relay On 4.2- Transfer of data
4.3- Displacement of Data SFT Logical controllers' programming The function SHIFT allows to implement a flag displacement beginning in to Word 001 to end in to Word 002.
SFT Logical controllers' programming To Word 001 it should have a smaller address or equal to Word 002 and the two should belong to the same area of memory. 4.3- Displacement of Data This instruction has to always be controlled by three logical conditions.
SFT The first defines the state of the bit that enters in the channel 001. In the moment of the displacement, the bit 0 (zero) of the word 001 it will have the logical state of this condition. Logical controllers' programming The second, it defines the moment of the displacement, that is verified whenever there is a transition of OFF for On in this condition. 4.3- Displacement of Data The third, are the condition of RESET. When its state is On, the bits of the words affected by the function SHIFT, are forced Off.