Errore di compilazione TON
Home › Forum › Informazioni ambiente di sviluppo LogicLab › Errore di compilazione TON
- Questo topic ha 7 risposte, 3 partecipanti ed è stato aggiornato l'ultima volta 2 giorni, 22 ore fa da
George.
-
AutorePost
-
Aprile 28, 2025 alle 10:49 am #81717
MBottarelli
PartecipanteStò usando l’ultima versione di LogicLab e del pacchetto librerie, su un PLC Mps053 XTarget mi dà un errore stranissimo in compilazione.
Provo a inserire un blocco TON dalla libreria ELLabStdLib, compilo e mi dà l’errore
TON(32) – error S1305: TO_TIME => Unknown function.
Possibile che sia un errorre interno alla libreria o sto trascurando io qualcosa?
Aprile 29, 2025 alle 10:34 am #81745Sergio Bertana
Amministratore del forumIl problema è nel dispositivo che essendo ancora di tipo XTarget non supporta il tipo TIME di definizione tempo.
Quindi se vuoi mantenere l’architettura XTarget devi utilizzare la vecchia versione del timer eTON dove il tempo era definito in mS con una variabile di tipo UDINT. Il FB eTON si trova nella libreria eLLabObsoleteLib.
Il mio consiglio è di eseguire un upgrade del sistema (Vedi articolo) utilizzando la nuova architettura XUnified, modificare il progetto utilizzando la raccolta librerie ed a questo punto potrai utilizzare tutte le ultime funzioni ed FB disponibili.
Maggio 6, 2025 alle 5:26 pm #82037MBottarelli
PartecipanteHo capito la differenza tra i due target… Grazie mille
Maggio 20, 2026 alle 10:54 am #85588George
PartecipanteI have MPS050 xUnified as target with Pck055a050 library I get
ON(32) – error S1305: TO_TIME => Unknown function,
If I use TON and eTON function blocks in the same project.
If I use only TON or eTON, there is no problem. I need to use eTON in old projects where I have configurations with preset time in UDINT variables.
It would be convenient to have a way to convert UDINT to TIME, to be possible the use only TON.If I have mps054 xUnified or mps056 xUnified the mentioned error is not appeared. So I can use TON and eTON FBs in the same project without problem. The problem appeared in mps050 xUnified target.
Maggio 26, 2026 alle 2:34 pm #85637Sergio Bertana
Amministratore del forumI have tried the same scenario in a simple project without any issues. This is my program:
VAR T1 : eTON; T2 : TON; END_VAR T1(IN:=NOT(T1.Q), PT:=1000); T1(IN:=NOT(T1.Q), PT:=TO_UDINT(T#1s)); T2(IN:=NOT(T2.Q), PT:=T#1s); T2(IN:=NOT(T2.Q), PT:=TO_TIME(1000));TON and TOF timers are defined and used as a blinker.
- The TO_UDINT function converts a TIME value to a UDINT (the returned value is expressed in ms).
- The TO_TIME function converts a UDINT value (which must be given in ms) to TIME.
So I cannot verify the problem you are complaining. It could be related to the operating system version you are using. Could you please report it to me?
Maggio 27, 2026 alle 10:54 pm #85671George
PartecipanteWindows 11 Pro for Workstations (25H2).
It should be noted that the problem appear in MPS050 xUnified as target with Pck055a050 library.
In mps054 xUnified or mps056 xUnified targets there is no problem.Maggio 28, 2026 alle 7:42 am #85673Sergio Bertana
Amministratore del forumI would like to know the exact code of the MPS050 you have and the firmware version installed on it.
It seems the issue may be caused by an outdated firmware version.
Maggio 28, 2026 alle 4:09 pm #85697George
PartecipanteI should check it in the field.
Maybe the image that I have made my tests is outdated.
Next week I could check it. -
AutorePost
- Devi essere connesso per rispondere a questo topic.