You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@plc4x.apache.org by "andvasp (via GitHub)" <gi...@apache.org> on 2026/08/19 16:01:01 UTC

[I] [Feature Request]: (plc4j/eip): Add parse support to read tags for LWORD type

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

   ### What would you like to happen?
   
   Hi @chrisdutz!
   
   I am receiving null reading tags. I noticed that the PLC informs them they are of type LWORD.
   
   The change looks simple but after I change it the system is getting the wrong value.
   
   Do you know if it is not treating this case because of this problem?
   
   
   ### Programming Languages
   
   - [x] plc4j
   - [ ] plc4go
   - [ ] plc4c
   - [ ] plc4net
   
   ### Protocols
   
   - [ ] AB-Ethernet
   - [ ] ADS /AMS
   - [ ] BACnet/IP
   - [ ] CANopen
   - [ ] DeltaV
   - [ ] DF1
   - [x] 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: issues-unsubscribe@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: (plc4j/eip): Add parse support to read tags for DWORD type

Posted by "andvasp (via GitHub)" <gi...@apache.org>.
andvasp commented on issue #2701:
URL: https://github.com/apache/plc4x/issues/2701#issuecomment-5399303830

   Hi @chrisdutz!
   
   I created a Draft PR for this #2711.


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: (plc4j/eip): Add parse support to read tags for DWORD type

Posted by "andvasp (via GitHub)" <gi...@apache.org>.
andvasp commented on issue #2701:
URL: https://github.com/apache/plc4x/issues/2701#issuecomment-5362303976

   Hi @chrisdutz !
   
   I am investigating and intend to give more details but in the meantime I would still like to know if by any chance you remember having faced this type of problem for this specific data type in the past, and if this might be one of the reasons why the handling for it was not implemented?
   
   I am comparing the response with an Opc Server but the request is totally different. They request the tag map first and then use the "identification" address to use on the request.
   
   


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: (plc4j/eip): Add parse support to read tags for DWORD type

Posted by "andvasp (via GitHub)" <gi...@apache.org>.
andvasp commented on issue #2701:
URL: https://github.com/apache/plc4x/issues/2701#issuecomment-5444956300

   Yes. I am testing it and comparing it with an Opc Server.
   
   Address: MyArray
   Plc: Array of bool
   Cip: DWORD
   
   No error happened and I could read the values. But the mapping is different from OPC. Look at the table below.
   
   | Opc | Plc4x |
   | --- | --- |
   |MyArray[0]  | MyArray[0] bit 0 |
   |MyArray[1]  | MyArray[0] bit 1 |
   |MyArray[31] | MyArray[0] bit 31 |
   |MyArray[32] | MyArray[1] bit 0 |
   |MyArray[33] | MyArray[1] bit 1 |
   |MyArray[64] | MyArray[1] bit 0 |
   
   


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: (plc4j/eip): Add parse support to read tags for DWORD type

Posted by "andvasp (via GitHub)" <gi...@apache.org>.
andvasp commented on issue #2701:
URL: https://github.com/apache/plc4x/issues/2701#issuecomment-5439033342

   Ok... Thank you @chrisdutz for adding this support. I like the way it was done.
   
   Just mention that the main development was done here 63482844f9ae6bdd
   


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: (plc4j/eip): Add parse support to read tags for DWORD type

Posted by "andvasp (via GitHub)" <gi...@apache.org>.
andvasp commented on issue #2701:
URL: https://github.com/apache/plc4x/issues/2701#issuecomment-5430216968

   About the reading "wrong" value,  I noticed that the PLC sent the DWORD for the array of BOOL.
   
   And this marches if previous documentation that had this line below but was removed.
   
   |Bit array|DWORD (32-bit boolean array)
   
   Plc Data Type: array of Bool.
   CIP data type returned: DWORD


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: (plc4j/eip): Add parse support to read tags for DWORD type

Posted by "chrisdutz (via GitHub)" <gi...@apache.org>.
chrisdutz commented on issue #2701:
URL: https://github.com/apache/plc4x/issues/2701#issuecomment-5454589569

   It is merged.
   
   Don't quite understand your question. I think the PLC4X version is correct.


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: (plc4j/eip): Add parse support to read tags for DWORD type

Posted by "chrisdutz (via GitHub)" <gi...@apache.org>.
chrisdutz commented on issue #2701:
URL: https://github.com/apache/plc4x/issues/2701#issuecomment-5435658678

   Should be fixed with 9d1613d3794928b58aae7aca5ca7b48fe331e798


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: (plc4j/eip): Add parse support to read tags for DWORD type

Posted by "andvasp (via GitHub)" <gi...@apache.org>.
andvasp commented on issue #2701:
URL: https://github.com/apache/plc4x/issues/2701#issuecomment-5455952549

   There is nothing wrong with either PLC4X or the OPC server; they simply handle array indexing differently based on how they process tag metadata:
   
   - PLC Data Type: Array of Bool
   - CIP Response: Returns DWORD chunks for both.
   - OPC Server: Exposes boolean values (MyArray[0], MyArray[1], ..., MyArray[63]). Does the same request like Plc4x
   - Plc4x: Exposes the DWORD values as returned by the protocol response, so array elements refer to 32-bit chunks (MyArray[0], MyArray[1]) with individual bit extraction (bit 0 to bit 31).
   
   
   **User request:**
   plc4x: MyArray[0..1] (Manually extract the bits)
   Opc: MyArray[0], MyArray[1], MyArray[2], ..., MyArray[63]
   
   **Mapping Comparison:**
   Opc -> plc4x (The bit part is manually decoded)
   [0] -> [0].0 (Bit 0)
   [1] -> [0].1
   [2] -> [0].2
   ..
   [31]-> [0].31
   [32]-> [1].0
   [33]-> [1].1
   ..
   [63]-> [1].31
   
   Given this mapping difference, do you think PLC4X should align with the OPC server behavior in the future since Opc Server is one of the primary ways to check tag values?


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: (plc4j/eip): Add parse support to read tags for DWORD type

Posted by "chrisdutz (via GitHub)" <gi...@apache.org>.
chrisdutz commented on issue #2701:
URL: https://github.com/apache/plc4x/issues/2701#issuecomment-5456063614

   Given how much I hate OPC, OPC-UA and don't really like Kepware... I'd say: No 😁
   
   In the automation industry there are so many different notations and I just streamlined them all with a format that has the biggest expessiveness. I'm not going to work on needing that up again. 


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: (plc4j/eip): Add parse support to read tags for DWORD type

Posted by "chrisdutz (via GitHub)" <gi...@apache.org>.
chrisdutz commented on issue #2701:
URL: https://github.com/apache/plc4x/issues/2701#issuecomment-5439050464

   Please test it though ;) 


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: (plc4j/eip): Add parse support to read tags for LWORD type

Posted by "chrisdutz (via GitHub)" <gi...@apache.org>.
chrisdutz commented on issue #2701:
URL: https://github.com/apache/plc4x/issues/2701#issuecomment-5354263895

   I think I could need a bit more information on this ...


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: (plc4j/eip): Add parse support to read tags for DWORD type

Posted by "chrisdutz (via GitHub)" <gi...@apache.org>.
chrisdutz commented on issue #2701:
URL: https://github.com/apache/plc4x/issues/2701#issuecomment-5445207417

   You might want to wait and retest as soon as the other PR I created is merged ... it totally cleans up how array notation works. 
   
   But looking at the difference it will remain. MyArray is a DWORD ... a DWORD is 64 bits ... a DWORD is an IEC BitString ... so a PlcDWORD reports true on isBoolean() ... and getBooleanArray() returns an array of 64 boolean values.
   
   Technically the MyArray[31] and alike is not really correct .... BOOL[64] would be, yes ... but a DWORD is 64 bits in one chunk ... if you wanted to let's say read 4 DWORDS, then the array notation would come back into play because you'd have 4 chunks of each 64 bits. 


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: (plc4j/eip): Add parse support to read tags for DWORD type

Posted by "andvasp (via GitHub)" <gi...@apache.org>.
andvasp commented on issue #2701:
URL: https://github.com/apache/plc4x/issues/2701#issuecomment-5454555526

   > You might want to wait and retest as soon as the other PR I created is merged ... it totally cleans up how array notation works.
   
   Yeah... Let me know when it is merged.
   
    
   > Technically the MyArray[31] and alike is not really correct .... BOOL[64] would be, yes ... but a DWORD is 32 bits in one chunk ... if you wanted to let's say read 4 DWORDS, then the array notation would come back into play because you'd have 4 chunks of each 32 bits.
   
   I did not understand this. "BOOL[64] would be". why since is 32 bits?
   
   What do you think about the different mapping arrays (not about the unified addressing array elements) between them shown on the table below? Do you believe it should be aligned in the future?
   
   | Opc - Bool | Plc4x DWORD|
   | --- | --- |
   |MyArray[0]  | MyArray[0] bit 0 |
   |MyArray[1]  | MyArray[0] bit 1 |
   |MyArray[31] | MyArray[0] bit 31 |
   |MyArray[32] | MyArray[1] bit 0 |
   |MyArray[33] | MyArray[1] bit 1 |
   |MyArray[64] | MyArray[1] bit 0 |
   
   
   


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: (plc4j/eip): Add parse support to read tags for DWORD type

Posted by "chrisdutz (via GitHub)" <gi...@apache.org>.
chrisdutz closed issue #2701: [Feature Request]: (plc4j/eip): Add parse support to read tags for DWORD type
URL: https://github.com/apache/plc4x/issues/2701


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature Request]: (plc4j/eip): Add parse support to read tags for DWORD type

Posted by "andvasp (via GitHub)" <gi...@apache.org>.
andvasp commented on issue #2701:
URL: https://github.com/apache/plc4x/issues/2701#issuecomment-5364575767

   Some details about reading the wrong value after changing the code to support DWORD.
   
   --connection-string=logix:tcp://PLC:44818 --tag-addresses ESTADOS5[3]
   
   [ESTADOS5-pcap.zip](https://github.com/user-attachments/files/31287480/ESTADOS5.zip)
   
   Request: 700026000198006D00000000504C433458202020000000000000000000000200A1000400B252AAFFB100120001004C06910845535441444F533528030100
   Response: 700020000198006D000000000000000000000000000000000000000000000200A100040098840000B1000C000100CC000000D30060950900
   
   Extracting the fields, I get the value **628064** that is the same that I have after modifying the source code. However, the correct value is 0!
   
   
   


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org