alison-gravley opened a new issue, #959:
URL: https://github.com/apache/plc4x/issues/959

   ### What would you like to happen?
   
   PLC/Protocols:
   Not sure which one below is for AB PLCs, I think EIP? Specifically Logix and 
Compact Logix PLCs. Also Siemens (S300, 1200, and 1500) and probably OPC UA. 
All are over Ethernet connections. The table 
[here](https://plc4x.apache.org/users/protocols/index.html) seems to suggest 
that EIP is not supported? 
   
   I would like to have a POJO for UDTs. I tried to find an example in your 
repo and it looks like the OPM requires the tag address to be hardcoded? We 
would have multiple tags of the same type. Potentially hundreds of the same 
type. This is the first time I have used this library and I am pretty lost. We 
are using Java with microservices (Spring Boot) and we would like to use open 
source libraries if possible.
   
   I used [PLCIO](https://www.ctiplcio.com/), which is paid, for a few years at 
my previous company, and it was pretty nice to use, for C at least. One of the 
nice utilities it had was a discovery program that scans all of the tags in the 
PLC and then it could spit out C style structs for any UDTs, with a special 
conversion string you can pass once you get the plc read part of your program. 
I think it can work without the conversion string, but their manual doesn't 
mention it.
   
   What I am trying to accomplish is this:
   Create POJOs of PLC structs/UDTs that are commonly used in our programs. 
These may be fairly nested. Similar functionality to jackson xml/json.
   
   Then, we would have our list of tags to read via polling, or subscription if 
supported, using the root tag name in the case of a struct, or the normal types 
such as BOOL, DINT, STRING, etc. We would like the UDTs to map to a registered 
POJO, or however you would need to do it.
   
   Example:
   POJO without nested UDTs. 
   ```
   package com.mycompany.devicecommunication.plc4x.UDT;
   import lombok.Data;
   
   @Data
   public class HoldStatusRequestUDT {
       //Do I use PlcDINT, PlcBOOL, etc  type or just an int, log, etc?
       //Probably need some sort of Alias annotation, or make the field name 
exactly the same as the PLC.
       private boolean TRIGGER;  
       private int sequenceId;
       private String barcode; 
   }
   ```
   
   List of tags of type "HoldStatusRequestUDT" that we would read from
   SCAN100_REQ
   SCAN101_REQ
   SCAN102_REQ
   
   
![image](https://github.com/apache/plc4x/assets/5222103/c545d7f4-4490-46f9-b354-5d3e766e3ae6)
   
   and then I would expect updates for each tag and when we read, we would be 
able to map those values into the POJO.
   
   Please let me know if this is already possible and maybe an example or two 
of how to do it. Thank you!
   
   ### Programming Languages
   
   - [X] plc4j
   - [ ] plc4go
   - [ ] plc4c
   - [ ] plc4net
   
   ### Protocols
   
   - [ ] AB-Ethernet
   - [ ] ADS /AMS
   - [ ] BACnet/IP
   - [ ] CANopen
   - [ ] DeltaV
   - [ ] DF1
   - [X] EtherNet/IP
   - [ ] Firmata
   - [ ] KNXnet/IP
   - [ ] Modbus
   - [X] OPC-UA
   - [X] 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