ProSoft Technology MVI69-ADM User Manual

Page 324

Advertising
background image

Side-Connect API Library Functions

MVI-ADM ♦ 'C' Programmable

Developer's Guide

'C' Programmable Application Development Module

Page 324 of 342

ProSoft Technology, Inc.

February 20, 2013

MVIsc_ClearFault

Syntax

int MVIsc_ClearFault(HANDLE handle, BYTE fault_flag);

Parameters

handle

Handle returned by previous call to MVIsc_Open

fault_flag

Bit flag specifying which faults to clear (major and minor)

Description
MVIsc_ClearFault clears the PLC-5 fault words in the status file as specified by
the bits set in fault_flag. The following bit definitions are valid for fault_flag:

Flag Description
MVISC_CLRFLT_MAJOR Major fault words are cleared (S:11 to S:14)

MVISC_CLRFLT_MINOR Minor fault words are cleared (S:10, S:17)

These flags may be logically OR'ed together to clear both major and minor faults.

Return Value

MVISC_SUCCESS

The fault was cleared successfully.

MVISC_ERR_NOACCESS

handle does not have access

MVISC_ERR_PLCTIMEOUT

PLC-5 did not respond

Example

HANDLE Handle;
/* Clear major and minor faults */
MVIsc_ClearFault(Handle, MVISC_CLRFLT_MAJOR|MVISC_CLRFLT_MINOR);

Advertising