You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tag Mod1.FDPRT.PAP2.Axis[3].Drive.NcToPlc.ActTorque "Axis[3]" its not an array, its name of plc tag, so i expext that everything works okay, but seems like it is not parsed in AdsDataTypeTableEntry during connecting, so it throws exception PlcRuntimeException: Couldn't find child with name 'Axis[2]' for type 'FB_PAP2_FDPRT'
in this piece of code, when it succesfully come to "Axis[3]" in remainingAddressParts.get(0), in adsDataTypeTableEntry.getChildren() there is no such child, so i made conclusion that it is missed during connection fetching of dataTypeTable
// Go through all children looking for a matching one.
for (AdsDataTypeTableChildEntry child : adsDataTypeTableEntry.getChildren()) {
if (child.getPropertyName().equals(remainingAddressParts.get(0))) {
AdsDataTypeTableEntry childAdsDataTypeTableEntry = dataTypeTable.get(child.getDataTypeName());
return resolveDirectAdsTagForSymbolicNameFromDataType(
remainingAddressParts.subList(1, remainingAddressParts.size()),
currentGroup, currentOffset + child.getOffset(), childAdsDataTypeTableEntry);
}
}
i made an app that will just do browse request and read all children in a tree
and as soon as i can see that it contains many similar tags defined on my plc
var browseRequest = plcConnection.browseRequestBuilder()
.addQuery("browse", "")
.build();
var browseResponse = browseRequest.execute().get();
var browseItems = browseResponse.getValues("browse");
and as soon as my plc return this tag, i expect that read request will succeed, but seems readSymbolTableAndDatatypeTable acts strange
P.S. or actually that can be a mistake of plcBrowserequest, why it returns me Axis[*] structure in root of request
as i can see it also contains
| +-- Mod1.TSHLN.PAP2.Axis: [List]
debugged a little, here is content of it
Why list does not contain definition of structure?
and some of array content structure just thrown in root of Browse items list?
maybe thats why i just thought that its not an array but static tag name defined by our plc developers
Version
v0.12.0
Programming Languages
plc4j
plc4go
plc4c
plc4net
Protocols
AB-Ethernet
ADS /AMS
BACnet/IP
CANopen
DeltaV
DF1
EtherNet/IP
Firmata
KNXnet/IP
Modbus
OPC-UA
S7
The text was updated successfully, but these errors were encountered:
Yeah ... I noticed this some time ago and am planning on working on it ... arrays in combination with UDTs does make things a LOT more complicated. But yeah ... I'm aware of the issue. However it's probably going to take a while to implement as I have only limited time and will be traveling to he US next Friday to Community over Code NA in Denver and will be returning 8 days later. So it's just this Friday 4h and then 3 weeks later the next ones.
chrisdutz
changed the title
[Bug]: Cannot map tag if it looks like array in AdsDataTypeTableEntry
[Bug]: Cannot map tag if array notation is used in-between elements of an ADS tag address
Oct 18, 2024
What happened?
I have tag
Mod1.FDPRT.PAP2.Axis[3].Drive.NcToPlc.ActTorque
"Axis[3]"
its not an array, its name of plc tag, so i expext that everything works okay, but seems like it is not parsed inAdsDataTypeTableEntry
during connecting, so it throws exceptionPlcRuntimeException: Couldn't find child with name 'Axis[2]' for type 'FB_PAP2_FDPRT'
in this piece of code, when it succesfully come to
"Axis[3]"
inremainingAddressParts.get(0)
, inadsDataTypeTableEntry.getChildren()
there is no such child, so i made conclusion that it is missed during connection fetching ofdataTypeTable
i made an app that will just do browse request and read all children in a tree
and as soon as i can see that it contains many similar tags defined on my plc
and as soon as my plc return this tag, i expect that read request will succeed, but seems
readSymbolTableAndDatatypeTable
acts strangeP.S. or actually that can be a mistake of plcBrowserequest, why it returns me Axis[*] structure in root of request
as i can see it also contains
| +-- Mod1.TSHLN.PAP2.Axis: [List]
debugged a little, here is content of it
Why list does not contain definition of structure?
and some of array content structure just thrown in root of Browse items list?
maybe thats why i just thought that its not an array but static tag name defined by our plc developers
Version
v0.12.0
Programming Languages
Protocols
The text was updated successfully, but these errors were encountered: