Set Rtc To Irig-B Device; Synchronize System Local Time With Irig Rtc; Irig-B Program Example - Moxa Technologies DA-IRIGB-4DIO-PCI104-EMC4 User Manual

Hide thumbs Also See for DA-IRIGB-4DIO-PCI104-EMC4:
Table of Contents

Advertisement

DA-IRIGB-4DIO-PCI104-EMC4 Module
Parameters
in
hDev
in
dwSource
Returns
If the operation completes successfully, the return value is nonzero. If the operation fails or is pending, the
return value is zero. To display detailed error information, use GetLastError.

Set RTC to IRIG-B Device

MXIRIG_API BOOL mxIrigbSetTime (HANDLE hDev, PRTCTIME pRtcTime)
Parameters
in
hDev
in
pRtcTime
Returns
If the operation completes successfully, the return value is nonzero. If the operation fails or is pending, the
return value is zero. To display detailed error information, use GetLastError.

Synchronize System Local Time with IRIG RTC

MXIRIG_API BOOL mxIrigbSyncTime (HANDLE hDev, BOOL bToFrom)
Parameters
in
hDev
in
pRtbToFrom
Returns
If the operation completes successfully, the return value is nonzero. If the operation fails or is pending, the
return value is zero. To display detailed error information, use GetLastError.

IRIG-B Program Example

To develop an IRIG-B program, follow the procedure listed in the program example.
/* 1. Include the header files */
#include "Public.h"
#include "mxirig.h"
/* 2. open the IRIG-B device by mxIrigbOpen(); */
A valid handle value returned from the mxIrigbOpen function.
RTC_SYNC_SOURCE to select the RTC synchronization source.
A valid handle value returned from the mxIrigbOpen function.
The pointer to a PRTCTIME structure that contains the time value.
A valid handle value returned from the mxIrigbOpen function.
0: Sets IRIG RTC to Local Time
1: Sets Local Time to IRIG RTC
4-8
API Reference

Advertisement

Table of Contents
loading

Table of Contents