OperationMode Property
Description
Reads or sets the Epson RC+ 8.0 mode of operation.
Syntax
Property OperationMode As SpelOperationMode
Return value
SpelOperationMode value
Remarks
When OperationMode is set to Program, the Epson RC+ 8.0 GUI for the current instance of the Spel class is opened and the Controller operation mode is set to Program. If the user closes the GUI, OperationMode is set to Auto. If OperationMode is set to Auto from Visual Basic, the GUI also closes.
OperationMode Example
VB Example:
Sub btnSpelProgramMode_Click _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles btnHideIOMonitor.Click
Try
m_spel.OperationMode = _
RCAPINet.SpelOperationMode.Program
' If you want to wait for the user to close the RC+ GUI,
' you can wait here for OperationMode to change to Auto
Do
Application.DoEvents()
System.Threading.Thread.Sleep(10)
Loop Until m_spel.OperationMode = _
RCAPINet.SpelOperationMode.Auto
Catch ex As RCAPINet.SpelException
MsgBox(ex.Message)
End Try
End If
C# Example:
void btnSpelProgramMode_Click(object sender, EventArgs e)
{
try {
m_spel.OperationMode = RCAPINet.SpelOperationMode.Auto;
// If you want to wait for the user to close the RC+ GUI, you can wait here
Do {
Application.DoEvents();
Systme.Threading.Thread.Sleep(10);
} while(\!m_spel.OperationMode = RCAPINet.OperationMode.Auto);
}
Catch (SpelException ex){
MessageBox.Show(ex.Message);
}
}