TEXT SEARCH
Visualizza i risultati ultima ricerca eseguita Search results
 GO TO TOPIC
 LOGIN  
Username
Password
 Remember data
Allows to register Register now
Allows to subscribe to the newsletter Newsletter
Allows emergency site access Forgot your psw?
 NEWS
Visualizza pagine aggiornate di recente Pages
Visualizza i nuovi prodotti Products
Visualizza i nuovi downloads Downloads
Visualizza i nuovi posts Forum
 SHOWCASE
SlimLine ARM 7 CPU Module (Full RS485 version)
SlimLine ARM 7 CPU Module (Full RS485 version)
USB 3-axis acceleration Sensor Module
USB 3-axis acceleration Sensor Module
ATC-108N RS232 to RS422/485 Isolated Converter
ATC-108N RS232 to RS422/485 Isolated Converter
USB Humidity/temperature Sensor Module
USB Humidity/temperature Sensor Module
4 Relay Out USB module
4 Relay Out USB module
ATC-2000WF Wi-fi to serial converter
ATC-2000WF Wi-fi to serial converter
HSUPA router with Wi-Fi access point
HSUPA router with Wi-Fi access point
ATC-277SM Fiber to serial Converter
ATC-277SM Fiber to serial Converter
MT6070iH 7" 65535 Color TFT Touch screen HMI
MT6070iH 7" 65535 Color TFT Touch screen HMI
USB Atmospheric Pressure Sensor Module
USB Atmospheric Pressure Sensor Module
 OFFERS Visualizza prodotti in offerta 
4-Ch In + 4-Ch Relay Out RS485 Module
4-Ch In + 4-Ch Relay Out RS485 Module
€ 69.00
Item on offer € 69.00
 TIP
In the TRACO power supplies range we can offer DC/DC converters to step-up DC tensions from 12V to 24V. Go to the page
 SERVICES
Sends an Email with infos request Info request
Displays the quote request form Quote request
Go to the English version of the page Pagina Italiano
Stampa il solo contenuto della pagina Print this page
Invia la pagina per Email ad un amico Email this page
Aggiunge l'indirizzo della pagina tra i preferiti del browser Add to bookmarks
Read Elsist News, our fortnightly bulletin (Only in Italian)
 You are here: Forums list  LogicLab: IEC 61131 progr... information  Gestire te... in linguaggio ST
Messages list
  FORUM
IEC 61131 programming information
LogicLab environment IEC 61131 standard programming
 Discussion
Gestire temporizzazioni in linguaggio ST
Come gestire delle temporizzazioni utilizzando il linguaggio ST
Author:  TEC0097 Date (GMT):  27/07/2010 15:04:00
Flags Message
Messaggio in Italiano
New post
Date (GMT):  27/07/2010 15:04:00  
Author:  TEC0097
Devo gestire una temporizzazione in linguaggio ST. Precedentemente utilizzavo i vostri prodotti Picolog e programmavo in linguaggio "C".
 
Nelle vostre librerie era disponibile la funzione IsMsecTimeOver() che rendeva l'esecuzione delle temporizzazioni estremamente semplice. Esiste qualcosa di simile su SlimLine ?
Messaggio in Italiano
New post
Date (GMT):  27/07/2010 15:07:50  
Author:  Member on line Bertaser
La funzione IsMsecTimeOver() si basa sul controllo del tick di sistema che nei sistemi Picolog si incrementa automaticamente ogni 1 mS.
 
Nei sistemi SlimLine è possibile da linguaggio ST testare la variabile di sistema SysTime di tipo UDINT che si incrementa ad ogni mS raggiunto il valore massimo si reinizializza. In pratica per eseguire la temporizzazione similarmente a quanto facevi in "C" sui sistemi Picolog puoi fare qualcosa simile al programma sottoriportato che esegue l'inversione della uscita Do00M00 ogni secondo. La variabile RefTimeBuf deve essere dichiarata di tipo UDINT.
 
(* Init the reference time at first program loop. *)
 
IF SysFirstLoop THEN
    RefTimeBuf:=SysTime; (* Save the reference time *)
END_IF;
 
(* Check if 1 Sec is passed and invert the logic DoOOM00 state. *)
 
IF (SysTime > (RefTimeBuf+1000)) THEN
    RefTimeBuf:=SysTime; (* Save the reference time *)
    Do00M00:=NOT(Do00M00);
END_IF;
Messaggio in Italiano
New post
Date (GMT):  27/07/2010 15:23:35  
Author:  Member on line Bertaser
Esiste anche la funzione SysGetSysTime() che permette la lettura di un tick di sistema che si incrementa ogni uS, in questo caso il programma precedente può essere modificato nel modo.
 
(* Init the reference time at first program loop. *)
 
IF SysFirstLoop THEN
    RefTimeBuf:=SysGetSysTime(TRUE); (* Save the reference time *)
END_IF;
 
(* Check if 1 Sec is passed and invert the logic DoOOM00 state. *)
 
IF (SysGetSysTime(TRUE) > (RefTimeBuf+1000000)) THEN
    RefTimeBuf:=SysGetSysTime(FALSE); (* Save the reference time *)
    Do00M00:=NOT(Do00M00);
END_IF;
 
Da notare la chiamata a SysGetSysTime() con la flag FALSE per avere lo stesso tempo utilizzato nel confronto e non perdere i uS di tempo necessari alla esecuzione delle istruzioni di confronto.
Messaggio in Italiano
New post
Date (GMT):  27/07/2010 15:52:31  
Author:  Member on line Bertaser
Esistono comunque anche i blocchi funzione eTOF, Timer Off ed eTON, Timer On che possono essere utilizzati in tutti e 5 i linguaggi della IEC61131. Entrambi i blocchi funzione eseguono temporizzazioni con tempo definibile in mS.
Page:  (1)      
 © Copyright 1996-2010 ELSIST Srl