vladbogun1 opened a new issue, #1785:
URL: https://github.com/apache/plc4x/issues/1785

   ### 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 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");
   ```
   
![image](https://github.com/user-attachments/assets/dd23a649-f48d-42e9-9c51-a953efc0ae8d)
   
   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
   
![image](https://github.com/user-attachments/assets/7a0c9a8f-9efe-49c9-b089-0cabecc97b14)
   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
   
   - [X] plc4j
   - [ ] plc4go
   - [ ] plc4c
   - [ ] plc4net
   
   ### Protocols
   
   - [ ] AB-Ethernet
   - [X] ADS /AMS
   - [ ] BACnet/IP
   - [ ] CANopen
   - [ ] DeltaV
   - [ ] DF1
   - [ ] EtherNet/IP
   - [ ] Firmata
   - [ ] KNXnet/IP
   - [ ] Modbus
   - [ ] OPC-UA
   - [ ] S7


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to