Thanks! Just so it’s available, I wrote this macro for converting those bit addressed tags.
Function ConvertDirectlyAddressedModbus(tag) As String
Dim numberPart As Integer
Dim numberPartStart As Integer
Dim stringPart As String
Dim bit As String
bit = ""
For Index = (Len(tag)) To 1 Step -1
testvalue = Mid(tag, Index, 1)
If Not IsNumeric(testvalue) Then
numberPartStart = Index
Exit For
End If
Next Index
Dim numberpartString As String
numberpartString = Mid(tag, numberPartStart + 1, (Len(tag) - numberPartStart))
address = (numberpartString)
stringPart = Mid(tag, 1, numberPartStart)
plcIndex = InStr(tag, "[") + 1
plcDelim = "]"
bitIndex = InStr(stringPart, ",bit=")
If bitIndex > 0 Then
BitStart = bitIndex + Len(",bit=")
BitEnd = InStr(stringPart, "]")
bit = Mid(stringPart, BitStart, BitEnd - BitStart)
plcDelim = ","
End If
plc = Mid(stringPart, plcIndex, Len(stringPart) - (Len(stringPart) - InStr(stringPart, plcDelim) + 2))
result = "[" + plc + "]" + address
If bit <> "" Then
result = result + "." + bit
End If
ConvertDirectlyAddressedModbus = result
End Function