Open nexus1203 opened 2 years ago
Yes it work
Would you be kind enough to share how you setup the motoman controller for Ethernet IP access. Everytime I try this code, it gives me connection error: Host actively refused the connection.
Only open Ethernet I/P function What Motoman controller do you use.
On Tue, May 10, 2022 at 11:50 AM Samuel19xd @.***> wrote:
Would you be kind enough to share how you setup the motoman controller for Ethernet IP access. Everytime I try this code, it gives me connection error: Host actively refused the connection.
— Reply to this email directly, view it on GitHub https://github.com/prapattrianakpinit/ETHERNETIP_MOTOMAN_YASKAWA_PYTHON/issues/1#issuecomment-1121929564, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM3X2T4E4SRC2A7UVAB3DMLVJHTKPANCNFSM5VHFF2VQ . You are receiving this because you commented.Message ID: <prapattrianakpinit/ETHERNETIP_MOTOMAN_YASKAWA_PYTHON/issues/1/1121929564@ github.com>
I am using DX200
Could you please send me data back up include cmos.bin. to me via email: @.***
On Tue, May 10, 2022 at 4:59 PM Samuel19xd @.***> wrote:
I am using DX200
— Reply to this email directly, view it on GitHub https://github.com/prapattrianakpinit/ETHERNETIP_MOTOMAN_YASKAWA_PYTHON/issues/1#issuecomment-1122181816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM3X2T6ANFNBVXEBZWSFBHLVJIXPPANCNFSM5VHFF2VQ . You are receiving this because you commented.Message ID: <prapattrianakpinit/ETHERNETIP_MOTOMAN_YASKAWA_PYTHON/issues/1/1122181816@ github.com>
from cpppo.server.enip.get_attribute import proxy_simple
def bytes_to_int(bytes): result = 0 for b in bytes: result = result * 256 + int(b) return result
def int_to_bytes(value, length): result = [] for i in range(0, length): result.append(value >> (i * 8) & 0xff) result.reverse() return result
ipaddress = '192.168.255.1' # controller IP address
A = int_to_bytes(12345,2) print(A)
value, = @.***/2703/1/0x10=(USINT)'+str(A[0]),"USINT")],1) print(value) #True
value, = @.***/2703/1/0x10',"USINT")],1) print(value) # [255]
value, = @./1/1/0x10=(USINT)'+str(A[1])+','+str(A[0]),"USINT")],1) print(value) #True value, = @./1/1/0x10',"USINT")],1) print(value) # [255]
B = bytes_to_int(value[::-1]) print(B)
via = proxy_simple('192.168.255.1') with via:
result, =
@.**@./2702/1/0x10')],1) print(result)
On Tue, May 10, 2022 at 5:03 PM Prapat TRIANAKPINIT @.***> wrote:
Could you please send me data back up include cmos.bin. to me via email: @.***
On Tue, May 10, 2022 at 4:59 PM Samuel19xd @.***> wrote:
I am using DX200
— Reply to this email directly, view it on GitHub https://github.com/prapattrianakpinit/ETHERNETIP_MOTOMAN_YASKAWA_PYTHON/issues/1#issuecomment-1122181816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM3X2T6ANFNBVXEBZWSFBHLVJIXPPANCNFSM5VHFF2VQ . You are receiving this because you commented.Message ID: <prapattrianakpinit/ETHERNETIP_MOTOMAN_YASKAWA_PYTHON/issues/1/1122181816 @github.com>
I will definitely do that first thing tomorrow morning. And thank you for your code.
I am wonder if you ever get this thing to work with a motoman controller.