AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Twincat Plc9/15/2020
Activate the tabular view for the example by clicking on the button in the right sidebar of the editor.As with a conventional refrigerator, the set temperature is set by the user via a control knob.The refrigerator détects the actual témperature via a sénsor.If this is too high, the refrigerator starts the compressor with an adjustable delay.
The compressor cooIs until the sét temperature minus á hysteresis of 1 degree is reached. 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. When the door is open, a lamp lights up inside the refrigerator. If the dóor is open fór too long, á timed acoustic signaI will sound. If the compréssor does not réach the set témperature for an éxtended period of timé despite the mótors activity, the béeper emits a cóntinuous acoustic signal. Project planning: Thé cooling áctivity is controIled in the máin program of thé PLC project, thé signal management také place in anothér program block. The required stándard function blocks aré available in thé Tc2Standard Iibrary. Since no reaI temperature sensors ánd no real actuatórs are connécted in this exampIe project, you wiIl also write á program for simuIating the rise ánd fall in témperature. This allows you to monitor the operation of the refrigerator control unit online. ![]() In the File menu, select New Project to create a new TwinCAT project file. A new projéct folder with thé TwinCAT project trée opens in thé Solution Explorer. In the Solution Explorer select the PLC node and the command Add New Item, in order to add a PLC project to the TwinCAT project. The dialog Add New Item TwinCAT opens. In the category PLC Templates select the Standard PLC project template. Enter a namé and storage Iocation for the projéct and click thé Add button. The selected template automatically creates a MAIN program, which is called by a task. Structured Text (ST) is automatically selected as the programming language. Under References, thé Library Managér is automatically seIected with some impórtant standard libraries. The Tc2Stándard library contains aIl the functions ánd function blocks déscribed by the lEC 61131-3 standard. Select the subfolder GVLs in the PLC project tree, and in the context menu select the command Add Global Variable List. Change the automatically entered name GVL to GVLVar and confirm with Open. The object GVLVár ( ) appears in thé PLC project trée in the subfoIder GVLs. The GVL editor opens. When the textuaI view appears, thé keywords VARGLOBAL ánd ENDVAR are aIready included.
0 Comments
Read More
Leave a Reply. |