DTSetNTPServer
Function Block A function block groups an algorithm and a set of private data. It has inputs and outputs. - Set the NTP server address.
This function 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 set the NTP server address. |
NTP Server |
STRING |
No range |
N/A |
No default |
The address of the NTP server used for clock Clock signal. synchronization Combines an axis or axes group (as slave) with an axis as master. The slave executes its path with synchronization to the progress of the master. This is linked to a one dimension source for synchronization.. |
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
|
Remarks
None
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
// configure the NTP server address
Inst_DTSetNTPServer( bSetNTPServer, NTPServer );
if Inst_DTSetNTPServer.Done then
bSetNTPServer := false;
bError := Inst_DTSetNTPServer.Error;
ErrorID := Inst_DTSetNTPServer.ErrorID;
end_if;
See Also