Yes, I saw these topics. But I can’t implement this code in B4J myself because I don’t understand how this VBA code worksSearch Results
www.b4x.com
there are comments in russianIs it possible you could resave the txt files in a different [Unicode] format because most of the characters are not legible:
Dim vh As Byte 'ñåðèéíûé íîìåð êîíòðîëëåðà
Maybe I can do rdp connection to computer with this device for you?And without a device similar to the one controlled by the application, it is very difficult to test.
VB still runs on Windows 10 PC's, so can I ask why you want to change platforms?It is to control some devices through rs-485
Public Function tstKv () As String
'we convert the string and check the type of converter, if it is Z397-Guard then return its operating mode
Dim stro As String 'formed string
Dim i as byte
Dim rr as string
i = 0
'prepare a message
Do While i <pssl
stro = stro + Chr (m5 (i)) 'convert to symbol
i = i + 1
Loop
'MsgBox Trim (stro)
'MsgBox Mid (Trim (stro), 1, 10)
If Mid (Trim (stro), 1, 10) = "Z397-Guard" Then
rr = Mid (Trim (stro), 27, 1)
Else: rr = 8
Call CloseHandle (ss)
End if
You mean you need Mid (Trim (stro), 27, 1)?This is very specific, do you have the operation manual for that equipment?
Rich (BB code):Public Function tstKv () As String 'we convert the string and check the type of converter, if it is Z397-Guard then return its operating mode Dim stro As String 'formed string Dim i as byte Dim rr as string i = 0 'prepare a message Do While i <pssl stro = stro + Chr (m5 (i)) 'convert to symbol i = i + 1 Loop 'MsgBox Trim (stro) 'MsgBox Mid (Trim (stro), 1, 10) If Mid (Trim (stro), 1, 10) = "Z397-Guard" Then rr = Mid (Trim (stro), 27, 1) Else: rr = 8 Call CloseHandle (ss) End if
I think he means that these routines are communicating with the device using a very specific protocol. And hopefully the operation manual will describe this protocol in detail so we can better understand the command set and handshaking requirements to communicate with the device.You mean you need Mid (Trim (stro), 27, 1)?
This code apparently handles the response: Z397-Guard S/N:00214,Mode:0This is very specific, do you have the operation manual for that equipment?
Rich (BB code):Public Function tstKv () As String 'we convert the string and check the type of converter, if it is Z397-Guard then return its operating mode Dim stro As String 'formed string Dim i as byte Dim rr as string i = 0 'prepare a message Do While i <pssl stro = stro + Chr (m5 (i)) 'convert to symbol i = i + 1 Loop 'MsgBox Trim (stro) 'MsgBox Mid (Trim (stro), 1, 10) If Mid (Trim (stro), 1, 10) = "Z397-Guard" Then rr = Mid (Trim (stro), 27, 1) Else: rr = 8 Call CloseHandle (ss) End if