prapattrianakpinit / ETHERNETIP_MOTOMAN_YASKAWA_PYTHON

EthernetIP for yaskawa robot
1 stars 0 forks source link

Have get this to work? #1

Open nexus1203 opened 2 years ago

nexus1203 commented 2 years ago

I am wonder if you ever get this thing to work with a motoman controller.

prapattrianakpinit commented 2 years ago

Yes it work

nexus1203 commented 2 years ago

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.

prapattrianakpinit commented 2 years ago

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>

nexus1203 commented 2 years ago

I am using DX200

prapattrianakpinit commented 2 years ago

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>

prapattrianakpinit commented 2 years ago

from cpppo.server.enip.get_attribute import proxy_simple

2 model

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

first model

write data to controller

@//

A = int_to_bytes(12345,2) print(A)

value, = @.***/2703/1/0x10=(USINT)'+str(A[0]),"USINT")],1) print(value) #True

read data from controller

value, = @.***/2703/1/0x10',"USINT")],1) print(value) # [255]

WRITE M-REGISTER VARIABLE @0X79/ M001 /1/0x10 data byte send right to left

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 = value[::-1]

B = bytes_to_int(value[::-1]) print(B)

second model

via = proxy_simple('192.168.255.1') with via:

if via is True:

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>

nexus1203 commented 2 years ago

I will definitely do that first thing tomorrow morning. And thank you for your code.