AdvancedHMI Software
General Category => Open Discussion => Topic started by: Igor on March 18, 2015, 01:12:03 PM
-
I am trying create simple HMI application and i need read and write tags. With Integers and float points is OK but String tags I get trouble:
for EthernetIPforPLCSLCMicroCom1.Write("ST10:30", "12") in PLC I am reading: "^A^B"
for EthernetIPforPLCSLCMicroCom1.Write("ST10:30", "AB")
interrupts program and gives me this message (http://) (Attached image), what I am doing wrong?
-
There is a problem that was created when porting the code to Linux. Try this:
- Download the latest version of 3.98a
- Open AllenBradleySLCMicro.vb
- go to line 1957
- Change the code where the error is occurring to this:
ConvertedData(0) = CByte(dataToWrite.Length - 1)
Dim i As Integer = 2
Dim StringBytes() As Byte = System.Text.Encoding.ASCII.GetBytes(dataToWrite)
While i <= dataToWrite.Length
ConvertedData(i + 1) = StringBytes(i - 2)
ConvertedData(i) = StringBytes(i - 1)
i += 2
End While
-
It works great