SCARA, 6-Axis and Modules
Technical Support Notes

Article ID: T1006
Date: 4/12/00
Product: EPSON RC+ 
Subject: Exception occurs in VB for SetSPELVar with empty TextBox

Symptoms
If a VB string variable is set to the value of an empty TextBox and then passed in the SetSPELVar method, an exception occurs and the system must be re-booted.

    Dim tmpStr As String

    tmpStr = Text1  ' Text1 is empty

    SPELCom1.SetSPELVar "g_Parameter$", tmpStr

Cause
The cause is not yet known.

Remedies

There are two methods for work around:

Method 1
Pass the text box directly:

    SPELCom1.SetSPELVar "g_Parameter$", Text1

Method 2
If the string is empty, then pass an empty string, otherwise pass the string variable.

    Dim tmpStr As String

    tmpStr = Text1

    If tmpStr = "" Then
        SPELCom1.SetSPELVar "g_Parameter$", ""
    Else
        SPELCom1.SetSPELVar "g_Parameter$", tmpStr
    End If

Status
This problem is being investigated.

Click here to return to the EPSON Robots home page
The Power of Choice!