Lenze PLC Designer PLC Designer (R2-x) Manual de usuario Pagina 493

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 844
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 492
L-force | PLC Designer
IEC Operators and additional norm extending functions
DMS 3.2 EN 02/2011 TD29 491
9.9.6 TIME_TO/TIME_OF_DAY Conversions
Converting from the variable type TIME or TIME_OF_DAY to a different type:
The time will be stored internally in a DWORD in milliseconds (beginning with 12:00
A.M. for the TIME_OF_DAY variable). This value will then be converted.
When you perform a type conversion from a larger to a smaller type, you risk losing
some information.
For the STRING type variable, the result is a time constant.
Examples in IL:
LD T#12ms
TIME_TO_STRING
ST str
(*Result is 'T#12ms' *)
LD T#300000ms
TIME_TO_DWORD
ST dw
(*Result is 300000 *)
LD TOD#00:00:00.012
TOD_TO_SINT
ST si
(*Result is 12 *)
Examples in ST:
str :=TIME_TO_STRING(T#12ms); (* Result is T#12ms *)
dw:=TIME_TO_DWORD(T#5m); (* Result is 300000 *)
si:=TOD_TO_SINT(TOD#00:00:00.012); (* Result is 12 *)
Examples in FBD:
Vista de pagina 492
1 2 ... 488 489 490 491 492 493 494 495 496 497 498 ... 843 844

Comentarios a estos manuales

Sin comentarios