Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: CPPPO Server configuration as Generic Ethernet Module in Studio 5000 #113

Open
damian-stempel-xberry opened this issue Jun 30, 2023 · 0 comments

Comments

@damian-stempel-xberry
Copy link

damian-stempel-xberry commented Jun 30, 2023

Hi,
did anyone successfully configure CPPPO Server/Adapter to communicate as Generic Ethernet Module in Studio 5000?

I tried to use one of the provided examples (poll_test.py) and create my own server, only with few attributes (enip_server --print SCADA@22/1/1=INT[1000] TEXT@22/1/2=SSTRING[100] FLOAT@22/1/3=REAL), but all attempts finished with the same result - errors below.

I'm not familiar with CIP communication, so apologize if I misunderstand the concept of communication, or try to do something in an improper way. I would be grateful for any working examples or information what is wrong with my configuration. As I understand, I use the wrong service, but I'm not sure how to configure the proper one.

xxx@xxx-NUC7CJYHN:~$ python3 -m cpppo.server.enip.poll_test
Set sys.path: ['/home/formic/.local/lib/python3.10/site-packages', '/home/formic', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/home/formic/.local/lib/python3.10/site-packages', '/usr/local/lib/python3.10/dist-packages', '/usr/lib/python3/dist-packages']
06-30 03:12:29.978 MainThread enip.srv NORMAL   main       Loaded config files: []
06-30 03:12:29.978 MainThread enip.srv NORMAL   main       EtherNet/IP Simulator: ('', 44818)
06-30 03:12:29.978 MainThread network  NORMAL   server_mai enip_srv server PID [51269] running on ('', 44818)
06-30 03:12:29.978 MainThread network  NORMAL   server_mai enip_srv server PID [51269] responding to external done/disable signal in object 140265607389984
06-30 03:12:29.979 Thread-1 ( enip.srv NORMAL   enip_srv   EtherNet/IP Server enip_UDP begins serving peer None
06-30 03:12:31.296 Thread-2 ( enip.srv NORMAL   enip_srv   EtherNet/IP Server enip_54850 begins serving peer ('192.168.1.9', 54850)
06-30 03:12:31.307 Thread-2 ( enip.ucm NORMAL   __init__   UCMM accepts route_path: False
06-30 03:12:31.328 Thread-2 ( enip.dev NORMAL   request    (0x06,  1) Connection_Manager Service 0xd4 Forward Open Reply failed with Exception: 'segment'
Request: {
    'input':                        array( 'B', hexload(r'''
        00000000:  54 02 20 06 24 01 05 9c  00 00 00 00 00 00 00 00   |T. .$...........|
        00000010:  09 00 01 00 ad 6c 5f d0  00 00 00 00 40 0d 03 00   |.....l_.....@...|
        00000020:  08 48 40 0d 03 00 04 28  01 09 34 04 00 00 00 00   |.H@....(..4.....|
        00000030:  00 00 00 00 20 04 24 01  2c 01 2c 01               |.... .$.,.,.|
    ''')),
    'service':                      212,
    'path.size':                    2,
    'path.segment[0].class':        6,
    'path.segment[1].instance':     1,
    'forward_open.priority_time_tick': 5,
    'forward_open.timeout_ticks':   156,
    'forward_open.O_T.size':        8,
    'forward_open.O_T.variable':    0,
    'forward_open.O_T.priority':    2,
    'forward_open.O_T.type':        2,
    'forward_open.O_T.redundant':   0,
    'forward_open.O_T.large':       False,
    'forward_open.O_T.NCP':         18440,
    'forward_open.O_T.connection_ID': 1608442893,
    'forward_open.O_T.RPI':         200000,
    'forward_open.O_T.API':         200000,
    'forward_open.T_O.size':        4,
    'forward_open.T_O.variable':    0,
    'forward_open.T_O.priority':    2,
    'forward_open.T_O.type':        1,
    'forward_open.T_O.redundant':   0,
    'forward_open.T_O.large':       False,
    'forward_open.T_O.NCP':         10244,
    'forward_open.T_O.connection_ID': 194689003,
    'forward_open.T_O.RPI':         200000,
    'forward_open.T_O.API':         200000,
    'forward_open.connection_serial': 9,
    'forward_open.O_vendor':        1,
    'forward_open.O_serial':        3495914669,
    'forward_open.connection_timeout_multiplier': 0,
    'forward_open.transport_class_triggers': 1,
    'forward_open.connection_path.size': 9,
    'status':                       8,
}
xxx@xxx-NUC7CJYHN:~$ enip_server --print -v SCADA@22/1/1=INT[1000] TEXT@22/1/2=SSTRING[100] FLOAT@22/1/3=REAL
06-30 03:14:55.912 MainThread enip.srv NORMAL   main       Loaded config files: []
06-30 03:14:55.912 MainThread enip.srv NORMAL   main       New Tag: SCADA         @22/1/1           INT[1000]
06-30 03:14:55.913 MainThread enip.srv NORMAL   main       New Tag: TEXT          @22/1/2       SSTRING[ 100]
06-30 03:14:55.913 MainThread enip.srv NORMAL   main       New Tag: FLOAT         @22/1/3          REAL[   1]
06-30 03:14:55.913 MainThread enip.srv NORMAL   main       EtherNet/IP Simulator: ('', 44818)
06-30 03:14:55.913 MainThread network  NORMAL   server_mai enip_srv server PID [51291] running on ('', 44818)
06-30 03:14:55.913 MainThread network  NORMAL   server_mai enip_srv server PID [51291] responding to external done/disable signal in object 140325873764384
06-30 03:14:55.914 Thread-1 ( enip.srv NORMAL   enip_srv   EtherNet/IP Server enip_UDP begins serving peer None
06-30 03:14:58.357 Thread-2 ( enip.srv NORMAL   enip_srv   EtherNet/IP Server enip_54900 begins serving peer ('192.168.1.9', 54900)
06-30 03:14:58.370 Thread-2 ( enip.ucm NORMAL   __init__   UCMM accepts route_path: (any)
06-30 03:14:58.371 Thread-2 ( enip.lgx NORMAL   setup_tag  Set Tag SCADA         @22/1/1   : Class    22/0x0016       Instance   1 Created
06-30 03:14:58.371 Thread-2 ( enip.lgx NORMAL   setup_tag  Set Tag SCADA         @22/1/1   : Class    22/0x0016       Instance   1 Added: SCADA        ... 0, 0, 0, ...]
06-30 03:14:58.371 Thread-2 ( enip.lgx NORMAL   setup_tag  Set Tag TEXT          @22/1/2   : Class    22/0x0016       Instance   1 Added: TEXT         ..., '', '', ...]
06-30 03:14:58.372 Thread-2 ( enip.lgx NORMAL   setup_tag  Set Tag FLOAT         @22/1/3   : Class    22/0x0016       Instance   1 Added: FLOAT        ...L x1    == 0.0
06-30 03:14:58.393 Thread-2 ( enip.dev NORMAL   request    (0x06,  1) Connection_Manager Service 0xd4 Forward Open Reply failed with Exception: 'segment'
Request: {
    'input':                        array( 'B', hexload(r'''
        00000000:  54 02 20 06 24 01 05 9c  00 00 00 00 00 00 00 00   |T. .$...........|
        00000010:  09 00 01 00 ad 6c 5f d0  00 00 00 00 40 0d 03 00   |.....l_.....@...|
        00000020:  08 48 40 0d 03 00 04 28  01 09 34 04 00 00 00 00   |.H@....(..4.....|
        00000030:  00 00 00 00 20 04 24 01  2c 01 2c 01               |.... .$.,.,.|
    ''')),
    'service':                      212,
    'path.size':                    2,
    'path.segment[0].class':        6,
    'path.segment[1].instance':     1,
    'forward_open.priority_time_tick': 5,
    'forward_open.timeout_ticks':   156,
    'forward_open.O_T.size':        8,
    'forward_open.O_T.variable':    0,
    'forward_open.O_T.priority':    2,
    'forward_open.O_T.type':        2,
    'forward_open.O_T.redundant':   0,
    'forward_open.O_T.large':       False,
    'forward_open.O_T.NCP':         18440,
    'forward_open.O_T.connection_ID': 603132271,
    'forward_open.O_T.RPI':         200000,
    'forward_open.O_T.API':         200000,
    'forward_open.T_O.size':        4,
    'forward_open.T_O.variable':    0,
    'forward_open.T_O.priority':    2,
    'forward_open.T_O.type':        1,
    'forward_open.T_O.redundant':   0,
    'forward_open.T_O.large':       False,
    'forward_open.T_O.NCP':         10244,
    'forward_open.T_O.connection_ID': 3909624177,
    'forward_open.T_O.RPI':         200000,
    'forward_open.T_O.API':         200000,
    'forward_open.connection_serial': 9,
    'forward_open.O_vendor':        1,
    'forward_open.O_serial':        3495914669,
    'forward_open.connection_timeout_multiplier': 0,
    'forward_open.transport_class_triggers': 1,
    'forward_open.connection_path.size': 9,
    'status':                       8,
}

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant