Buongiorno, il seguente programma riguarda il funzionamento del circuito secondario di un sistema solare termico sotto studio. Dovrei modificare tale programma in modo tale che il secondario si attivi dalle 11:00 alle 12:00 e dalle 18:00 alle 19:00, se e solo se però la temperatura IN4 è maggiore o uguale a MTMPS.
Per attivazione del secondario si intende il funzionamento di una pompa MCSBOMB2.
Ho provato a modificare tale programma ma T3000 mi segnala degli errori, qualcuno riuscirebbe ad aiutarmi? grazie in anticipo
IN SEGUITO IL PRGRAMMA BASE DA MODIFICARE:
0 REM ////////////////PROGRAMA DE SISTEMA SOLAR//////////////////
1 REM PRG2
2 REM CIRCUITO SECUNDARIO
40 REM ** TRANSFIERO TEMPERATURA SECUNDARIO DE MARCHA Y RESTO DIFERENCIAL**
50 MTMPSCON = TMPSCON
60 MTMPDFCS = TMPSCON - TMPDFSC
70 REM SI TEMPERATURA MARCHA ES IGUAL O MAYOR QUE TEMPERATURA ACUMULADOR ST4 MARCHA
80 REM ** SI TEMPERATURA DIFERENCIAL EN MENOR OIGUAL QUE TE TEMPERATURA ST4 PARO BOMBA
90 IF IN4 >= MTMPSCON THEN START MCSBOMB2
100 IF IN4 <= MTMPDFCS OR AUT_MAN THEN STOP MCSBOMB2
110 REM ** MARCHA PARO BOMBA
111 REM ** SI MARCA DE MOMBA SECUNDARIO ACTIVO BOMBA SECUNADARIO**
112 REM ** O SISTEMA EN MANUAL Y ORDEN DE MARCHA MANUAL BOMBA SECUNDARIO**
120 B/SECU = NOT AL_S4 AND MCSBOMB2 OR AUT_MAN AND M/P_BOM2
130 REM TRASPASO DE ESTADO BOMBA SECUNDARIO
140 S/T_SEC = B/SECU
150 REM FIN
Hello, the following program is about the operation of the secondary circuit of a solar thermal system under study. I should change this schedule so that the secondary is active from 11:00 to 12:00 and from 18:00 to 19:00, if and only if the IN4 temperature is greater than or equal to MTMPS.
Secondary activation refers to the operation of a pump MCSBOMB2.
I am not clear what line 50 is about but line 60 calculates the temperature difference and stores that in a var, good so far.
90 IF IN4 >= MTMPSCON THEN START MCSBOMB2
Here you start a pump based on the temperature of in4, I would switch this logic over to a var/flag instead of the pump directly, this way you can do several steps of logic on the flag and then at the end turn the pump on or off based on the flag.
100 IF IN4 <= MTMPDFCS OR AUT_MAN THEN STOP MCSBOMB2
More logic for the pump, I would separate these into two lines and make them act on the above mentioned flag. Keeping the lines simple makes the logic easier to follow. Lines like the auto/man flag can go at the end, this way they will override lower priority lines earlier in the program.
120 B/SECU = NOT AL_S4 AND MCSBOMB2 OR AUT_MAN AND M/P_BOM2
Not 100% clear what is going on here, again though you can separate the logic into two or more separate lines, the lines further down will override the earlier lines. Also rather than act on the pumps directly, use the program to act on vars/flags and at the end set the pump equal to the flag. This way you can put the flags onto your displays & trend logs to see which mode the system is working in.
130 REM **Transfer secondary pump status
140 S/T_SEC = B/SECU
Line 130 and 140 are benign, no effect on the pumps