ProSoft Technology MVI69-ADM User Manual
Page 325

MVI-ADM ♦ 'C' Programmable
Side-Connect API Library Functions
'C' Programmable Application Development Module
Developer's Guide
ProSoft Technology, Inc.
Page 325 of 342
February 20, 2013
MVIsc_SetPLCMode
Syntax
int MVIsc_SetPLCMode(HANDLE handle, BYTE mode);
Parameters
handle
Handle returned by previous call to MVIsc_Open
mode
PLC-5 mode to set
Description
MVIsc_SetPLCMode sets the PLC-5 mode. The PLC-5 keyswitch must be in the
Remote position for this function to succeed. The valid mode definitions are
shown below:
Mode Description
MVISC_PLCMODE_RUN
Run mode
MVISC_PLCMODE_PROG
Program mode
MVISC_PLCMODE_TEST
Test mode
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
MVISC_ERR_PCCCFAIL
The PLC-5 denied the request. Check the keyswitch position.
Example
HANDLE Handle;
/* Put the PLC-5 in Run mode */
MVIsc_SetPLCMode(Handle, MVISC_PLCMODE_RUN);