lib/standard_functions.txt
changeset 793 268bf4ca5fa1
parent 705 f2323f79252e
child 1085 9766936990db
equal deleted inserted replaced
785:b08167f156a1 793:268bf4ca5fa1
   365 
   365 
   366 
   366 
   367 
   367 
   368 
   368 
   369 FUNCTION DT_TO_DATE : DATE VAR_INPUT IN : DT; END_VAR RETURN; END_FUNCTION
   369 FUNCTION DT_TO_DATE : DATE VAR_INPUT IN : DT; END_VAR RETURN; END_FUNCTION
       
   370 FUNCTION DATE_AND_TIME_TO_DATE : DATE VAR_INPUT IN : DT; END_VAR RETURN; END_FUNCTION
   370 FUNCTION DT_TO_DT : DT VAR_INPUT IN : DT; END_VAR RETURN; END_FUNCTION
   371 FUNCTION DT_TO_DT : DT VAR_INPUT IN : DT; END_VAR RETURN; END_FUNCTION
   371 FUNCTION DT_TO_TOD : TOD VAR_INPUT IN : DT; END_VAR RETURN; END_FUNCTION
   372 FUNCTION DT_TO_TOD : TOD VAR_INPUT IN : DT; END_VAR RETURN; END_FUNCTION
       
   373 FUNCTION DATE_AND_TIME_TO_TIME_OF_DAY : TOD VAR_INPUT IN : DT; END_VAR RETURN; END_FUNCTION
   372 
   374 
   373 FUNCTION DATE_TO_DATE : DATE VAR_INPUT IN : DATE; END_VAR RETURN; END_FUNCTION
   375 FUNCTION DATE_TO_DATE : DATE VAR_INPUT IN : DATE; END_VAR RETURN; END_FUNCTION
   374 
   376 
   375 
   377 
   376 
   378 
   377 
   379 
   378 
   380 
   379 FUNCTION TOD_TO_TOD : TOD VAR_INPUT IN : TOD; END_VAR RETURN; END_FUNCTION
   381 FUNCTION TOD_TO_TOD : TOD VAR_INPUT IN : TOD; END_VAR RETURN; END_FUNCTION
       
   382 
       
   383 
       
   384 
       
   385 
       
   386 
       
   387 
       
   388 
   380 FUNCTION TIME_TO_TIME : TIME VAR_INPUT IN : TIME; END_VAR RETURN; END_FUNCTION
   389 FUNCTION TIME_TO_TIME : TIME VAR_INPUT IN : TIME; END_VAR RETURN; END_FUNCTION
   381 
   390 
   382 
   391 
   383 
   392 
   384 FUNCTION BYTE_TO_STRING : STRING VAR_INPUT IN : BYTE; END_VAR RETURN; END_FUNCTION
   393 FUNCTION BYTE_TO_STRING : STRING VAR_INPUT IN : BYTE; END_VAR RETURN; END_FUNCTION
   453 FUNCTION TRUNC : LINT VAR_INPUT IN : LREAL; END_VAR RETURN; END_FUNCTION
   462 FUNCTION TRUNC : LINT VAR_INPUT IN : LREAL; END_VAR RETURN; END_FUNCTION
   454 FUNCTION TRUNC : USINT VAR_INPUT IN : LREAL; END_VAR RETURN; END_FUNCTION
   463 FUNCTION TRUNC : USINT VAR_INPUT IN : LREAL; END_VAR RETURN; END_FUNCTION
   455 FUNCTION TRUNC : UINT VAR_INPUT IN : LREAL; END_VAR RETURN; END_FUNCTION
   464 FUNCTION TRUNC : UINT VAR_INPUT IN : LREAL; END_VAR RETURN; END_FUNCTION
   456 FUNCTION TRUNC : UDINT VAR_INPUT IN : LREAL; END_VAR RETURN; END_FUNCTION
   465 FUNCTION TRUNC : UDINT VAR_INPUT IN : LREAL; END_VAR RETURN; END_FUNCTION
   457 FUNCTION TRUNC : ULINT VAR_INPUT IN : LREAL; END_VAR RETURN; END_FUNCTION
   466 FUNCTION TRUNC : ULINT VAR_INPUT IN : LREAL; END_VAR RETURN; END_FUNCTION
   458 
       
   459 
       
   460 
       
   461 
       
   462 
       
   463 
       
   464 
       
   465 FUNCTION USINT_TO_BCD_BYTE : BYTE VAR_INPUT IN : USINT; END_VAR RETURN; END_FUNCTION
   467 FUNCTION USINT_TO_BCD_BYTE : BYTE VAR_INPUT IN : USINT; END_VAR RETURN; END_FUNCTION
       
   468 FUNCTION USINT_TO_BCD : BYTE VAR_INPUT IN : USINT; END_VAR RETURN; END_FUNCTION
   466 FUNCTION USINT_TO_BCD_WORD : WORD VAR_INPUT IN : USINT; END_VAR RETURN; END_FUNCTION
   469 FUNCTION USINT_TO_BCD_WORD : WORD VAR_INPUT IN : USINT; END_VAR RETURN; END_FUNCTION
       
   470 FUNCTION USINT_TO_BCD : WORD VAR_INPUT IN : USINT; END_VAR RETURN; END_FUNCTION
   467 FUNCTION USINT_TO_BCD_DWORD : DWORD VAR_INPUT IN : USINT; END_VAR RETURN; END_FUNCTION
   471 FUNCTION USINT_TO_BCD_DWORD : DWORD VAR_INPUT IN : USINT; END_VAR RETURN; END_FUNCTION
       
   472 FUNCTION USINT_TO_BCD : DWORD VAR_INPUT IN : USINT; END_VAR RETURN; END_FUNCTION
   468 FUNCTION USINT_TO_BCD_LWORD : LWORD VAR_INPUT IN : USINT; END_VAR RETURN; END_FUNCTION
   473 FUNCTION USINT_TO_BCD_LWORD : LWORD VAR_INPUT IN : USINT; END_VAR RETURN; END_FUNCTION
       
   474 FUNCTION USINT_TO_BCD : LWORD VAR_INPUT IN : USINT; END_VAR RETURN; END_FUNCTION
   469 FUNCTION UINT_TO_BCD_BYTE : BYTE VAR_INPUT IN : UINT; END_VAR RETURN; END_FUNCTION
   475 FUNCTION UINT_TO_BCD_BYTE : BYTE VAR_INPUT IN : UINT; END_VAR RETURN; END_FUNCTION
       
   476 FUNCTION UINT_TO_BCD : BYTE VAR_INPUT IN : UINT; END_VAR RETURN; END_FUNCTION
   470 FUNCTION UINT_TO_BCD_WORD : WORD VAR_INPUT IN : UINT; END_VAR RETURN; END_FUNCTION
   477 FUNCTION UINT_TO_BCD_WORD : WORD VAR_INPUT IN : UINT; END_VAR RETURN; END_FUNCTION
       
   478 FUNCTION UINT_TO_BCD : WORD VAR_INPUT IN : UINT; END_VAR RETURN; END_FUNCTION
   471 FUNCTION UINT_TO_BCD_DWORD : DWORD VAR_INPUT IN : UINT; END_VAR RETURN; END_FUNCTION
   479 FUNCTION UINT_TO_BCD_DWORD : DWORD VAR_INPUT IN : UINT; END_VAR RETURN; END_FUNCTION
       
   480 FUNCTION UINT_TO_BCD : DWORD VAR_INPUT IN : UINT; END_VAR RETURN; END_FUNCTION
   472 FUNCTION UINT_TO_BCD_LWORD : LWORD VAR_INPUT IN : UINT; END_VAR RETURN; END_FUNCTION
   481 FUNCTION UINT_TO_BCD_LWORD : LWORD VAR_INPUT IN : UINT; END_VAR RETURN; END_FUNCTION
       
   482 FUNCTION UINT_TO_BCD : LWORD VAR_INPUT IN : UINT; END_VAR RETURN; END_FUNCTION
   473 FUNCTION UDINT_TO_BCD_BYTE : BYTE VAR_INPUT IN : UDINT; END_VAR RETURN; END_FUNCTION
   483 FUNCTION UDINT_TO_BCD_BYTE : BYTE VAR_INPUT IN : UDINT; END_VAR RETURN; END_FUNCTION
       
   484 FUNCTION UDINT_TO_BCD : BYTE VAR_INPUT IN : UDINT; END_VAR RETURN; END_FUNCTION
   474 FUNCTION UDINT_TO_BCD_WORD : WORD VAR_INPUT IN : UDINT; END_VAR RETURN; END_FUNCTION
   485 FUNCTION UDINT_TO_BCD_WORD : WORD VAR_INPUT IN : UDINT; END_VAR RETURN; END_FUNCTION
       
   486 FUNCTION UDINT_TO_BCD : WORD VAR_INPUT IN : UDINT; END_VAR RETURN; END_FUNCTION
   475 FUNCTION UDINT_TO_BCD_DWORD : DWORD VAR_INPUT IN : UDINT; END_VAR RETURN; END_FUNCTION
   487 FUNCTION UDINT_TO_BCD_DWORD : DWORD VAR_INPUT IN : UDINT; END_VAR RETURN; END_FUNCTION
       
   488 FUNCTION UDINT_TO_BCD : DWORD VAR_INPUT IN : UDINT; END_VAR RETURN; END_FUNCTION
   476 FUNCTION UDINT_TO_BCD_LWORD : LWORD VAR_INPUT IN : UDINT; END_VAR RETURN; END_FUNCTION
   489 FUNCTION UDINT_TO_BCD_LWORD : LWORD VAR_INPUT IN : UDINT; END_VAR RETURN; END_FUNCTION
       
   490 FUNCTION UDINT_TO_BCD : LWORD VAR_INPUT IN : UDINT; END_VAR RETURN; END_FUNCTION
   477 FUNCTION ULINT_TO_BCD_BYTE : BYTE VAR_INPUT IN : ULINT; END_VAR RETURN; END_FUNCTION
   491 FUNCTION ULINT_TO_BCD_BYTE : BYTE VAR_INPUT IN : ULINT; END_VAR RETURN; END_FUNCTION
       
   492 FUNCTION ULINT_TO_BCD : BYTE VAR_INPUT IN : ULINT; END_VAR RETURN; END_FUNCTION
   478 FUNCTION ULINT_TO_BCD_WORD : WORD VAR_INPUT IN : ULINT; END_VAR RETURN; END_FUNCTION
   493 FUNCTION ULINT_TO_BCD_WORD : WORD VAR_INPUT IN : ULINT; END_VAR RETURN; END_FUNCTION
       
   494 FUNCTION ULINT_TO_BCD : WORD VAR_INPUT IN : ULINT; END_VAR RETURN; END_FUNCTION
   479 FUNCTION ULINT_TO_BCD_DWORD : DWORD VAR_INPUT IN : ULINT; END_VAR RETURN; END_FUNCTION
   495 FUNCTION ULINT_TO_BCD_DWORD : DWORD VAR_INPUT IN : ULINT; END_VAR RETURN; END_FUNCTION
       
   496 FUNCTION ULINT_TO_BCD : DWORD VAR_INPUT IN : ULINT; END_VAR RETURN; END_FUNCTION
   480 FUNCTION ULINT_TO_BCD_LWORD : LWORD VAR_INPUT IN : ULINT; END_VAR RETURN; END_FUNCTION
   497 FUNCTION ULINT_TO_BCD_LWORD : LWORD VAR_INPUT IN : ULINT; END_VAR RETURN; END_FUNCTION
   481 
   498 FUNCTION ULINT_TO_BCD : LWORD VAR_INPUT IN : ULINT; END_VAR RETURN; END_FUNCTION
   482 
       
   483 
       
   484 
       
   485 
       
   486 
       
   487 
       
   488 FUNCTION BYTE_BCD_TO_USINT : USINT VAR_INPUT IN : BYTE; END_VAR RETURN; END_FUNCTION
   499 FUNCTION BYTE_BCD_TO_USINT : USINT VAR_INPUT IN : BYTE; END_VAR RETURN; END_FUNCTION
       
   500 FUNCTION BCD_TO_USINT : USINT VAR_INPUT IN : BYTE; END_VAR RETURN; END_FUNCTION
   489 FUNCTION BYTE_BCD_TO_UINT : UINT VAR_INPUT IN : BYTE; END_VAR RETURN; END_FUNCTION
   501 FUNCTION BYTE_BCD_TO_UINT : UINT VAR_INPUT IN : BYTE; END_VAR RETURN; END_FUNCTION
       
   502 FUNCTION BCD_TO_UINT : UINT VAR_INPUT IN : BYTE; END_VAR RETURN; END_FUNCTION
   490 FUNCTION BYTE_BCD_TO_UDINT : UDINT VAR_INPUT IN : BYTE; END_VAR RETURN; END_FUNCTION
   503 FUNCTION BYTE_BCD_TO_UDINT : UDINT VAR_INPUT IN : BYTE; END_VAR RETURN; END_FUNCTION
       
   504 FUNCTION BCD_TO_UDINT : UDINT VAR_INPUT IN : BYTE; END_VAR RETURN; END_FUNCTION
   491 FUNCTION BYTE_BCD_TO_ULINT : ULINT VAR_INPUT IN : BYTE; END_VAR RETURN; END_FUNCTION
   505 FUNCTION BYTE_BCD_TO_ULINT : ULINT VAR_INPUT IN : BYTE; END_VAR RETURN; END_FUNCTION
       
   506 FUNCTION BCD_TO_ULINT : ULINT VAR_INPUT IN : BYTE; END_VAR RETURN; END_FUNCTION
   492 FUNCTION WORD_BCD_TO_USINT : USINT VAR_INPUT IN : WORD; END_VAR RETURN; END_FUNCTION
   507 FUNCTION WORD_BCD_TO_USINT : USINT VAR_INPUT IN : WORD; END_VAR RETURN; END_FUNCTION
       
   508 FUNCTION BCD_TO_USINT : USINT VAR_INPUT IN : WORD; END_VAR RETURN; END_FUNCTION
   493 FUNCTION WORD_BCD_TO_UINT : UINT VAR_INPUT IN : WORD; END_VAR RETURN; END_FUNCTION
   509 FUNCTION WORD_BCD_TO_UINT : UINT VAR_INPUT IN : WORD; END_VAR RETURN; END_FUNCTION
       
   510 FUNCTION BCD_TO_UINT : UINT VAR_INPUT IN : WORD; END_VAR RETURN; END_FUNCTION
   494 FUNCTION WORD_BCD_TO_UDINT : UDINT VAR_INPUT IN : WORD; END_VAR RETURN; END_FUNCTION
   511 FUNCTION WORD_BCD_TO_UDINT : UDINT VAR_INPUT IN : WORD; END_VAR RETURN; END_FUNCTION
       
   512 FUNCTION BCD_TO_UDINT : UDINT VAR_INPUT IN : WORD; END_VAR RETURN; END_FUNCTION
   495 FUNCTION WORD_BCD_TO_ULINT : ULINT VAR_INPUT IN : WORD; END_VAR RETURN; END_FUNCTION
   513 FUNCTION WORD_BCD_TO_ULINT : ULINT VAR_INPUT IN : WORD; END_VAR RETURN; END_FUNCTION
       
   514 FUNCTION BCD_TO_ULINT : ULINT VAR_INPUT IN : WORD; END_VAR RETURN; END_FUNCTION
   496 FUNCTION DWORD_BCD_TO_USINT : USINT VAR_INPUT IN : DWORD; END_VAR RETURN; END_FUNCTION
   515 FUNCTION DWORD_BCD_TO_USINT : USINT VAR_INPUT IN : DWORD; END_VAR RETURN; END_FUNCTION
       
   516 FUNCTION BCD_TO_USINT : USINT VAR_INPUT IN : DWORD; END_VAR RETURN; END_FUNCTION
   497 FUNCTION DWORD_BCD_TO_UINT : UINT VAR_INPUT IN : DWORD; END_VAR RETURN; END_FUNCTION
   517 FUNCTION DWORD_BCD_TO_UINT : UINT VAR_INPUT IN : DWORD; END_VAR RETURN; END_FUNCTION
       
   518 FUNCTION BCD_TO_UINT : UINT VAR_INPUT IN : DWORD; END_VAR RETURN; END_FUNCTION
   498 FUNCTION DWORD_BCD_TO_UDINT : UDINT VAR_INPUT IN : DWORD; END_VAR RETURN; END_FUNCTION
   519 FUNCTION DWORD_BCD_TO_UDINT : UDINT VAR_INPUT IN : DWORD; END_VAR RETURN; END_FUNCTION
       
   520 FUNCTION BCD_TO_UDINT : UDINT VAR_INPUT IN : DWORD; END_VAR RETURN; END_FUNCTION
   499 FUNCTION DWORD_BCD_TO_ULINT : ULINT VAR_INPUT IN : DWORD; END_VAR RETURN; END_FUNCTION
   521 FUNCTION DWORD_BCD_TO_ULINT : ULINT VAR_INPUT IN : DWORD; END_VAR RETURN; END_FUNCTION
       
   522 FUNCTION BCD_TO_ULINT : ULINT VAR_INPUT IN : DWORD; END_VAR RETURN; END_FUNCTION
   500 FUNCTION LWORD_BCD_TO_USINT : USINT VAR_INPUT IN : LWORD; END_VAR RETURN; END_FUNCTION
   523 FUNCTION LWORD_BCD_TO_USINT : USINT VAR_INPUT IN : LWORD; END_VAR RETURN; END_FUNCTION
       
   524 FUNCTION BCD_TO_USINT : USINT VAR_INPUT IN : LWORD; END_VAR RETURN; END_FUNCTION
   501 FUNCTION LWORD_BCD_TO_UINT : UINT VAR_INPUT IN : LWORD; END_VAR RETURN; END_FUNCTION
   525 FUNCTION LWORD_BCD_TO_UINT : UINT VAR_INPUT IN : LWORD; END_VAR RETURN; END_FUNCTION
       
   526 FUNCTION BCD_TO_UINT : UINT VAR_INPUT IN : LWORD; END_VAR RETURN; END_FUNCTION
   502 FUNCTION LWORD_BCD_TO_UDINT : UDINT VAR_INPUT IN : LWORD; END_VAR RETURN; END_FUNCTION
   527 FUNCTION LWORD_BCD_TO_UDINT : UDINT VAR_INPUT IN : LWORD; END_VAR RETURN; END_FUNCTION
       
   528 FUNCTION BCD_TO_UDINT : UDINT VAR_INPUT IN : LWORD; END_VAR RETURN; END_FUNCTION
   503 FUNCTION LWORD_BCD_TO_ULINT : ULINT VAR_INPUT IN : LWORD; END_VAR RETURN; END_FUNCTION
   529 FUNCTION LWORD_BCD_TO_ULINT : ULINT VAR_INPUT IN : LWORD; END_VAR RETURN; END_FUNCTION
       
   530 FUNCTION BCD_TO_ULINT : ULINT VAR_INPUT IN : LWORD; END_VAR RETURN; END_FUNCTION
   504 FUNCTION ABS_REAL : REAL VAR_INPUT IN : REAL; END_VAR RETURN; END_FUNCTION
   531 FUNCTION ABS_REAL : REAL VAR_INPUT IN : REAL; END_VAR RETURN; END_FUNCTION
   505 FUNCTION ABS : REAL VAR_INPUT IN : REAL; END_VAR RETURN; END_FUNCTION
   532 FUNCTION ABS : REAL VAR_INPUT IN : REAL; END_VAR RETURN; END_FUNCTION
   506 FUNCTION ABS_LREAL : LREAL VAR_INPUT IN : LREAL; END_VAR RETURN; END_FUNCTION
   533 FUNCTION ABS_LREAL : LREAL VAR_INPUT IN : LREAL; END_VAR RETURN; END_FUNCTION
   507 FUNCTION ABS : LREAL VAR_INPUT IN : LREAL; END_VAR RETURN; END_FUNCTION
   534 FUNCTION ABS : LREAL VAR_INPUT IN : LREAL; END_VAR RETURN; END_FUNCTION
   508 FUNCTION ABS_SINT : SINT VAR_INPUT IN : SINT; END_VAR RETURN; END_FUNCTION
   535 FUNCTION ABS_SINT : SINT VAR_INPUT IN : SINT; END_VAR RETURN; END_FUNCTION