Hi,
I'm trying to get my Hometroller SEL to communicate with another device via RS232. I can send a string to the device and the device can read the string, but HS3 cannot read a string from the device. I use Tera Term to verify that the device is indeed sending a string. If I use Tera Term to send a string to HS3, it still does not read the string.
I have the following lines at the end of Startup.vb script that basically opens my com port on the SEL:
'Open USB COM Port 1 for RTI Controller
Dim e As String
e = hs.opencomportterm(1, "19200,N,8,1", 1, "RTIUpdate.vb", "",chr(13))
If e <> "" Then
hs.writelog("Error Opening Com Port 1", e)
Else
hs.writelog("COM 1 ", "Successfully Opened")
End If
I have the following test script that sends a string to the device and it is works perfect:
Sub Main(parm as object)
dim e as string
e="Hello world"
hs.SendToComPort(1,e +chr(10)+chr(13))
hs.writelog("RTI", e)
End Sub
The following is the RTIUpdate.vb(receiving data from com port) script:
Sub Main(ByVal Feedback As String)
'Log Zone and level
hs.writelog("RTI", "Serial Data:"&Feedback)
End Sub
I believe my issue is in the RTIUpdate.vb script. When I try to send a string from the device or from Tera Term I don't think the script is executing. hs.writelog("RTI", "Serial Data:"&Feedback) doesn't get logged to the log file. Also, If I run the script manually, the Feedback string is blank in the logs. It would just state RTI Serial Data in the log file.
I'm I missing something here?
I'm trying to get my Hometroller SEL to communicate with another device via RS232. I can send a string to the device and the device can read the string, but HS3 cannot read a string from the device. I use Tera Term to verify that the device is indeed sending a string. If I use Tera Term to send a string to HS3, it still does not read the string.
I have the following lines at the end of Startup.vb script that basically opens my com port on the SEL:
'Open USB COM Port 1 for RTI Controller
Dim e As String
e = hs.opencomportterm(1, "19200,N,8,1", 1, "RTIUpdate.vb", "",chr(13))
If e <> "" Then
hs.writelog("Error Opening Com Port 1", e)
Else
hs.writelog("COM 1 ", "Successfully Opened")
End If
I have the following test script that sends a string to the device and it is works perfect:
Sub Main(parm as object)
dim e as string
e="Hello world"
hs.SendToComPort(1,e +chr(10)+chr(13))
hs.writelog("RTI", e)
End Sub
The following is the RTIUpdate.vb(receiving data from com port) script:
Sub Main(ByVal Feedback As String)
'Log Zone and level
hs.writelog("RTI", "Serial Data:"&Feedback)
End Sub
I believe my issue is in the RTIUpdate.vb script. When I try to send a string from the device or from Tera Term I don't think the script is executing. hs.writelog("RTI", "Serial Data:"&Feedback) doesn't get logged to the log file. Also, If I run the script manually, the Feedback string is blank in the logs. It would just state RTI Serial Data in the log file.
I'm I missing something here?
Comment