DTGetTimeZone

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Read the Time Zone.

This functionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. block is specific for PCMM2G only.

Inputs

Input

Data Type

Range

Unit

Default

Description

Execute

BOOL

TRUE, FALSE

N/A

No default

If TRUE, request to read the time zone.

Outputs

Output

Data Type

Range

Unit

Description

Done

BOOL

TRUE, FALSE

N/A

If TRUE, the command completed successfully.

Error

BOOL

TRUE, FALSE

N/A

If TRUE, an error has occurred.

ErrorID

DINT

No range

N/A

Indicates the error if the Error output is set to TRUE.

Error Codes

  • 23 = Internal error.
    See the controller log for details.
  • 15000 = Controller type does not support this function block.

TimeZone

STRING

No range

N/A

The time zone the controller should use.

Remarks

None

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

// read the configured time zone
Inst_DTGetTimeZone( bGetDTZone );
if Inst_DTGetTimeZone.Done then
   bGetDTZone := false;

   if NOT Inst_DTGetTimeZone.Error then
      TimeZone := Inst_DTGetTimeZone.TimeZone;
   else
      ErrorID := Inst_DTGetTimeZone.ErrorID;
   end_if;
end_if;

See Also