2/28/2023 1:59 PM | |
Joined: 12/18/2014 Last visit: 9/6/2025 Posts: 35928 Rating:
|
Compare 4 temperatures? Compare to what? At the highest temperature? At the lowest temperature?
|
2/28/2023 7:05 PM | |
Joined: 5/27/2022 Last visit: 8/19/2025 Posts: 21 Rating:
|
Compare the temperature of collectors T4 with temperatures T1, T2, T3. T1 measures the temperature in tank 1 - circuit 1, motorized valve connected to Q1 T2 measures the temperature in tank 2 - circuit 2, motorized valve connected to Q2 T3 measures the temperature in tank 3 - circuit 3, motorized valve connected to Q3 So, when the temperature of the collectors T4 is greater than the temperature T1 in tank 1, the solar pump is started via output Q4 and at the same time another output Q1 is switched on, from which a signal will go to the motorized valve so that the liquid from the collectors starts flowing through circuit 1 and starts heating it. Outputs Q1 and Q4 are turned on until tank 1 heats up to the required temperature or both temperatures T4 and T1 are equalized If the temperature of the collectors T4 is greater than all temperatures T1 to T3, the solar pump Q4 and one of the outputs Q1 to Q3 will be switched on according to priority. If circuit 1 is assigned the highest priority, pump Q4 and output Q1 will start If the temperature of the collectors is lower than the temperatures T1 to T3, then not a single output Q will be switched on. I did the same with two circuits, but I don't know how to start with three. I am attaching a file with two circuits Attachment2CS2.zip (824 Downloads) |
Last edited by: Jen_Moderator at: 03/01/2023 08:48:09Text formatting optimized. |
|
2/28/2023 7:10 PM | |
Joined: 5/27/2022 Last visit: 8/19/2025 Posts: 21 Rating:
|
Once again attachment via winrar Q4 is solar pump Attachment2CS2.zip (693 Downloads) |
Last edited by: Kukis at: 02/28/2023 19:11:53 |
|
3/14/2023 3:19 PM | |
Joined: 5/27/2022 Last visit: 8/19/2025 Posts: 21 Rating:
|
Hi, here's my progress, it's still a long way from the final version, but I'm glad I managed to solve circuit switching using logic blocks. Those digital inputs will then be replaced by programmable buttons and there will be three on one screen because a maximum of eight of them can be placed on one screen. Now I have it like this so that I can more easily switch and try it in the simulations. The first part of the program could be put into the UDF, but the second part cannot because the UDF can only have a maximum of eight inputs, so I would have to divide it further, so I will show it later when I code the third part of the ptogram with which I am just starting. Attachment3CS_V15 share.zip (831 Downloads) |
3/14/2023 3:20 PM | |
Joined: 5/27/2022 Last visit: 8/19/2025 Posts: 21 Rating:
|
Attachment3CS_V15 share UDF.zip (762 Downloads) |
3/15/2023 4:54 AM | |
Joined: 3/30/2020 Last visit: 9/5/2025 Posts: 5427 Rating:
|
You are putting too much code into one UDF. PIC1 has 3 red blocks. The code structure in each of the blocks are the same. It is possible to place the code of a red block in a UDF. That would mean that you have to place down the UDF x3 in the main circuit where currently you have x1 big one. PIC2 also has 3 red blocks. Again the code within each of the red blocks are the same. Again the code can be placed in one UDF but then place the UDF down x3. The idea is to break the process down into small portions that is easily debugged. Then those small portions are repeated as needed. If a change is made, only a small code footprint is adapted. Of course this is your project and you do as you want. It is only my "opinion" that you will cope better if you only had to concentrate on a smaller code piece at a time. Attachmentidentify-udf.zip (816 Downloads) |
Activities of this user is voluntary. There is no obligation or liability placed on this user. Though optional, your 'please' and 'thank you' is highly valued. |
|
Follow us on