This function block sets the components of a date for a data type connected to the input IO. The values of the subcomponents can be set via the input DD, MM, and YY.
For any component input containing a 0 or a negative value (or is not connected at all), this subcomponent will be taken directly out of the data type connected to the IO.
The new date will always be a valid date, even if the values of the subcomponents are out of proper range. In this case a correct date will be calculated by adjusting the other components:
If the values of the component inputs cannot directly be combined into a valid date, the output Err will be set to HIGH.
The parameter dialog can be used to select a data type.
|DATE, DT, OLEDATETIME
The current data type will be depicted on the function block.
The data type can also be changed by connecting the input IO.
For the LONG based data types 1970 is the smallest accepted and 2105 is the highest accepted value for the year. For the DOUBLE based data type 100 is the smallest possible and 9999 is the highest possible value for the year. A date beyond/under the defined maximum/minimum will be set to that limit.