Side-connect api initialization functions – ProSoft Technology MVI69-ADM User Manual

Page 304

Advertising
background image

Side-Connect API Library Functions

MVI-ADM ♦ 'C' Programmable

Developer's Guide

'C' Programmable Application Development Module

Page 304 of 342

ProSoft Technology, Inc.

February 20, 2013

11.3 Side-connect API Initialization Functions

MVIsc_Open

Syntax

int MVIsc_Open(HANDLE *handle);

Parameters

handle

Pointer to variable of type handle

Description
MVIsc_Open acquires access to the API and sets handle to a unique ID that the
application uses in subsequent functions. This function must be called before any
of the other API functions can be used.

IMPORTANT: After the API has been opened, MVIsc_Close should always be called before exiting

the application.

Return Value

MVISC_SUCCESS

Side-connect API was opened successfully

MVISC_ERR_REOPEN

Side-connect API is already open

MVISC_ERR_PLCTIMEOUT

No response from PLC detected. Check side-connect.

Example

HANDLE Handle;
if (MVIsc_Open(&Handle) != MVISC_SUCCESS) {
printf("Open failed!\n");
}

Advertising