Vai al contenuto

Errore di compilazione TON

Home Forum Informazioni ambiente di sviluppo LogicLab Errore di compilazione TON

Stai visualizzando 8 post - dal 1 a 8 (di 8 totali)
  • Autore
    Post
  • #81717
    MBottarelli
    Partecipante

    Stò 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?

    #81745
    Sergio Bertana
    Amministratore del forum

    Il 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.

    #82037
    MBottarelli
    Partecipante

    Ho capito la differenza tra i due target… Grazie mille

    #85588
    George
    Partecipante

    I 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.

    #85637
    Sergio Bertana
    Amministratore del forum

    I 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?

    #85671
    George
    Partecipante

    Windows 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.

    #85673
    Sergio Bertana
    Amministratore del forum

    I 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.

    #85697
    George
    Partecipante

    I should check it in the field.
    Maybe the image that I have made my tests is outdated.
    Next week I could check it.

Stai visualizzando 8 post - dal 1 a 8 (di 8 totali)
  • Devi essere connesso per rispondere a questo topic.