beautypg.com

ProSoft Technology MVI56E-LDM User Manual

Page 169

background image

ControlLogix Platform ♦ "C" Programmable

CIP API Functions

Linux Application Development Module

Developer's Manual

ProSoft Technology, Inc.

Page 163 of 264

March 12, 2014

OCXcip_SetWCTimeUTC

Syntax

int OCXcip_GetWCTimeUTC (OCXHANDLE apihandle,
BYTE *pPathStr,
OCXCIPWCTUTC *pWCT,
WORD timeout);

Parameters

apihandle

handle returned by previous call to OCXcip_Open

pPathStr

path to device being read

pWCT

Pointer to OCXCIPWCTUTC structure with Wall Clock Time data to
be set

timeout

number of milliseconds to wait for the read to complete

Compatibility
This function is compatible only with Logix controllers with V16 or greater
firmware installed. Firmware versions below v16 will result in error

OCX_CIP_INVALID_REQUEST

. For previous firmware versions, please refer to

OCScip_SetWCTime()

.

Description

OCXcip_SetWCTimeUTC

writes to the Wall Clock Time object in the specified device.

This function allows the time to be specified in two different ways; a specified
data/time expressed in UTC time, or automatically set to the 56SAM system time
(expressed in UTC time). See the description of the pWCT parameter for more
information.

apihandle

must be a valid handle returned from

OCXcip_Open

.

pPathStr

must be a pointer to a string containing the path to a device which

supports the Wall Clock Time object, such as a ControlLogix controller.

pWCT

may point to a structure of type

OCXCIPWCTUTC

, or may be NULL. If

pWTC

is

NULL, the 56SAM system time (UTC) is used.

timeout

is used to specify the amount of time in milliseconds the application

should wait for a response from the device.
The following example defines the

OCXCIPWCTUTC

structure:

typedef struct tagOCXCIPWCTUTC

{

ULARGE_INTEGER CurrentUTCValue;

char TimeZone[84];

int DSTOffset;

int DSTEnable;

SYSTEMTIME SystemTime;

} OCXCIPWCTUTC;