The Structured Text (ST) language is among the languages of the IEC 61131 standard supported by PLC3000. Compared to other languages like Instruction List (IL), ST supports expressions with a higher level of abstraction. It notably provides loop statements. However, the use of loops is generally considered a poor practice when programming programmable logic controllers […]
Category: Programming
Loops – ST
The Structured Text (ST) language supports 3 kinds of loops: FOR … DO … END_FOR: Reapeats some processing for some given iteration count WHILE … DO … END_WHILE: Repeats some processing while a condition is true REPEAT … UNTIL … END_REPEAT: Performs some processing at least once, then repeats it until some condition becomes true […]
Edge generation in LD
PLC3000 with the Ladder langage allows the rising and falling Edges. Declaration in LD A rising Edge is defined during the variable declaration in the Ladder code editor. A rising Edge on input %I0: A falling Edge is defined during the variable declaration in the Ladder code editor. A falling Edge on input %I1 :
Timer – LD
The IEC 61131 standart offers a definition of Timers. PLC3000 integrates only TON timers that can be set by defining the time base %Ti.TB, and the preset value %Ti.PV. The timer is triggered by activating the input %Ti.IN, and the output %Ti.Q goes to 1 when the current timer value reaches the preset value. The […]
Mnemonics in the LD Language
At each variable can be associated a mnemonic. It is then possible touse the mnemonic or variable completely transparently in programs. To associate the variable Switch to the input %I0, the variables RedLight and GreenLight to the outputs %Q0 and %Q1 respectively, it is possible to specify them during the variable declaration in the Ladder […]
Counter LD
The IEC 61131 standard offers a definition of Counters. PLC3000 integrates up and down Counters. It is necessary to define a preset value %Ci.PV, which can be set with an integer value. The current value of a counter is set to 0 when %Ci.R is activated. The current value of a counter is set to […]
Programming in LD
1. Example in ST Let’s considering the logical equation: %M0 = %I0.%I1+%I2. /%I3 2. Example of Grafcet in ST Let’s considering the elementary Grafcet a. Programming Transition/Transition Initialization Test on Receptivity and Transition Crossing Output declaration b. Programming Transition/Transition with Crossing bits Initialization Test on Receptivity Transition Crossing Output declaration c. Programming Step/Step d. Programming […]
Instruction in LD
Ladder (LD) is a visual programming language defined by the IEC 61131 standard. It includes components: Function AND – (X . Y) : |———| |—-| |———| X Y Function OR – (X + Y) : |——|—| |–|————| | X | |—| |–| Y Logical function – F=(X.Z + /Y) : |—|—| |—| |—|—-( )-| | […]
Edge Generation – ST
PLC3000 does not include Rising and Falling Edge functions. However, they can easily be generated from the available memory bits Generation in ST Generate a Rising Edge on %I0 is done by considering a memory bit, e.g. %M1, such as <img width=”300″ height=”130″ src=”https://plc3000.com/wp-content/uploads/2021/05/FrontMontant-300×130.jpg” alt=”” loading=”lazy” srcset=”https://i1.wp.com/plc3000.com/wp-content/uploads/2021/05/FrontMontant.jpg?resize=300%2C130&ssl=1 300w, https://i1.wp.com/plc3000.com/wp-content/uploads/2021/05/FrontMontant.jpg?w=533&ssl=1 533w” sizes=”(max-width: 300px) 100vw, 300px” /> […]
Counter – IL
The IEC 61131 standard offers a definition of Counters. PLC3000 integrates up and down Counters. It is necessary to define a preselection value %Ci.PV, which can be set with an integer value. The current value of a counter is set to 0 when %Ci.R is activated. The current value of a counter is set to […]