![]() ![]() ![]() It adds all the inputs that are connected to it. The ADD function block (addition) is provided via the library Tc2_Standard. The function block appears in the CFC editor. Now add an addition function block: Click on the Box element in the Toolbox view and drag it to a position in the CFC editor to insert it. The variable fHysteresis appears in the declaration editor. Complete the fields in the Auto Declare dialog with the data type REAL and the initialization value "1". The name is already included in the dialog. Since this is not the name of an already known variable, the Auto Declare dialog appears. Create an additional input, click on ? and replace it with the name fHysteresis. As in step 3, create a further input with the name of the global variable rTempSet. Select the variable fTempActual from the category Variables under Project > GVLs and confirm the dialog with OK to reference the global variable fTempActual. In the CFC Editor, click the input ? and open the Input Assistant by clicking. In the Toolbox view, click the Input element and drag it with the mouse to a position in the CFC Editor. If the toolbox does not appear, you can use the command Toolbox in the View menu to place it on the desktop. The Declaration editor in textual or tabular representation is displayed above the graphical editor field. Then double-click on the MAIN program in the PLC project tree (subfolder POUs). Since the automatically generated MAIN program block is created in the implementation language "Structured Text (ST)" by default, you must first delete this function block and create a new MAIN program in the implementation language "Continuous Function Chart (CFC)", using the context menu command Add > POU…. Time from door opening after which an alarm sounds.ġ. Declare the following variables in the same way:Ĭompressor running time after which an alarm sounds. Enter a numerical value in the Initialization column, for example “8.0”. Click the button and select Input Assistant. The field is now editable, and the button appears. Double-click the field in the Data type column. At the same time, the scope VAR_GLOBAL and the data type BOOL are automatically entered in the row. Activate the tabular view for the example by clicking on the button in the right sidebar of the editor. When the textual view appears, the keywords VAR_GLOBAL and END_VAR are already included. The object “GVL_Var” ( ) appears in the PLC project tree in the subfolder GVLs. Change the automatically entered name "GVL" to "GVL_Var" and confirm with Open. Select the subfolder GVLs in the PLC project tree, and in the context menu select the command Add > Global Variable List. You define variables that are to be used by all function blocks in a global variable list.ġ. This allows you to monitor the operation of the refrigerator control unit online. Since no real temperature sensors and no real actuators are connected in this example project, you will also write a program for simulating the rise and fall in temperature. The required standard function blocks are available in the Tc2_Standard library. The cooling activity is controlled in the main program of the PLC project, the signal management take place in another program block. If the compressor does not reach the set temperature for an extended period of time despite the motor's activity, the beeper emits a continuous acoustic signal.If the door is open for too long, a timed acoustic signal will sound. When the door is open, a lamp lights up inside the refrigerator.The hysteresis is intended to prevent the actual temperature from oscillating too much around the set temperature, and to prevent the compressor from continuously switching off and on. The compressor cools until the set temperature minus a hysteresis of 1 degree is reached.If this is too high, the refrigerator starts the compressor with an adjustable delay. The refrigerator detects the actual temperature via a sensor.As with a conventional refrigerator, the set temperature is set by the user via a control knob. ![]() In this tutorial, you will program a simple refrigerator control. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |