Epson机器人远程控制指令测试


公司有一批机器,使用PLC控制机器人动作,通过网口进行通讯。

经测试,使用发送ascii码字符方式,可以正常与EPSON机械人进行通讯。


勇哥用网络助手做了一下实验,下文中所记录的远程指令是可以用的。

image.png

要注意的是,做这个实验前,把机器人的配置为“远程以太网”。

image.png

在远程控制的时候,机器人做为服务器,因此只有个端口号可以改变。

注意CRLF是尾结束符,这意味着你在网络助手里发送字符串指令的最后在加上一个回车,再发送。

image.png


$Execute,"Go XY( 100.000,  450.000,  260.000,  090.000,  000.000,  180.000)/R /A /NF /J6F0 /J4F0"


16:03:48 发送数据:$Execute,"Go XY( 100.000+  010.020,  450.000+ - 010.020,  260.000+  010.020,  090.000+  020.020,  000.000,  180.000)/R /A /NF /J6F0 /J4F0"
[1次]
16:03:49 收到数据:#Execute,0
相机处理的数据是:如果是0.001  发过 000.001 
ascii码的形式:一个符合3位整数加一个小数点加三位小数。 100=( 100.000)        -100=(-100.000)   
1.010=( 001.010)    -13.321=(-013.321)


10:37:16 发送数据:$Login,123

[1次]

10:37:16 收到数据:#Login,0

10:45:06 发送数据:$SetCurRobot,0

[1次]

10:45:06 收到数据:#SetCurRobot,0


10:52:00 发送数据:$Execute,"Reset"

[1次]

10:52:00 收到数据:#Execute,0


10:52:51 发送数据:$SetMotorsOn,0

[1次]

10:52:51 收到数据:#SetMotorsOn,0


10:53:29 发送数据:$GetStatus

[1次]

10:53:29 收到数据:#GetStatus,00100000001,0000


10:56:14 发送数据:$Execute,"Go XY(0, 450, 260, 90, 0, 180)"

[1次]

10:56:14 收到数据:#Execute,0


11:01:32 发送数据:$Execute,"Go XY(0, 450, 260, 90, 0, 180)"

[1次]

11:01:32 收到数据:#Execute,0


11:02:39 发送数据:$Execute,"move  XY(0, 450, 260, 90, 0, 180)"

[1次]

11:02:39 收到数据:#Execute,0


11:03:58 发送数据:$Execute,"move  XY(0, 450, 260, 90, 0, 180)"

[1次]

11:03:58 收到数据:#Execute,0


11:05:01 发送数据:$Execute,"Jump3 Here -TLZ(50), Pallet(1, 1) -TLZ(50), Pallet(1, 2)"

[1次]

11:05:08 收到数据:#Execute,0


13:37:56 发送数据:$Login,123,$r$n[1次]

13:37:56 收到数据:#Login,0


18:37:13 发送数据:$Execute,"move Here + x(50)"

[1次]

24 45 78 65 63 75 74 65 2C 22 6D 6F 76 65 20 48 65 72 65 20 2B 20 78 28 35 30 29 22 0D 0A 

18:37:15 收到数据:#Execute,0


8:10:16 发送数据:$Execute,"move  XY(cx(P0)+5, cy(p0), cz(p0), cu(p0), 0, 180)"

[1次]

8:10:18 收到数据:#Execute,0

8:02:48 发送数据:$Execute,"move  XY(cx(P0), 450, 260, 90, 0, 180)"

[1次]

8:02:52 收到数据:#Execute,0

8:17:31 发送数据:$Execute,"print RealPos"

[1次]

8:17:31 收到数据:#Execute," X:  200.001 Y:  450.000 Z:  260.000 U:   90.000 V:    0.000 W:  179.999 /R /A /NF /J6F0 /J4F0 /0

"


8:59:20 发送数据:$Execute,"Tool 0"

[1次]

8:59:20 收到数据:#Execute,0


8:54:31 发送数据:$Execute,"print Pls(1)"

[1次]

8:54:31 收到数据:#Execute," 5729

"


8:55:31 发送数据:$Execute,"print Pls(2)"

[1次]

8:55:31 收到数据:#Execute," -40789

"


10:22:04 发送数据:$Execute,"P25=XY(0,0.1,0.2,0.3,0.4,0.5)/R/A"

[1次]

10:22:04 收到数据:#Execute,0


14:17:54 发送数据:$Execute,"PLabel 25, "pick""

[1次]

14:17:54 收到数据:#Execute,0


14:32:13 发送数据:$Execute,"P25=XY( -41.937,356.920,345.823, -42.691,14.518, -166.718)/R/A"

[1次]

14:32:13 收到数据:#Execute,0


14:33:11 发送数据:$Execute,"PLabel 25, "pick""

[1次]

14:33:11 收到数据:#Execute,0


14:32:13 发送数据:$Execute,"P25=XY( -41.937,356.920,345.823, -42.691,14.518, -166.718)/R/A"

[1次]

14:32:13 收到数据:#Execute,0


14:33:11 发送数据:$Execute,"PLabel 25, "pick""

[1次]

14:33:11 收到数据:#Execute,0



13:50:54 发送数据:$Execute," plist 10"

[1次]

13:50:54 收到数据:#Execute,"P10  = XY(   246.488,  259.917,  -20.311,   -0.440 )  /R /0   RotaryWait

"


13:53:52 发送数据:$Execute," plist 10 ,20"

[1次]

13:53:52 收到数据:#Execute,"P10  = XY(   246.488,  259.917,  -20.311,   -0.440 )  /R /0   RotaryWait

P11  = XY(   253.359,  276.309,  -88.435,   -1.387 )  /R /0   RotaryGet

P12  = XY(  -275.063,   80.182,  -21.663,    3.388 )  /R /0   ConveyerWait

P13  = XY(  -275.063,   80.182,  -51.558,    3.388 )  /R /0   ConveyerGet

P14  = XY(  -277.911,   80.182,  -87.741,    3.388 )  /R /0   ConveyerGet2

P15  = XY(   -80.679,  303.231,   -7.821, -176.860 )  /R /0   WastePutWait

P16  = XY(   -80.679,  303.231,  -29.471, -176.860 )  /R /0   WastePut

P17  = XY(   200.531,  279.717,  -24.501,  -19.951 )  /R /0   GrapImage

P20  = XY(   242.832,  268.062,  -87.521,   -1.939 )  /R /0   xia

"


9:30:46 发送数据:$Execute,"on 10  "

[1次]

19:30:46 收到数据:#Execute,0


19:31:16 发送数据:$Execute,"off 10"

[1次]

19:31:16 收到数据:#Execute,0



19:43:47 发送数据:$Execute,"print sw(9)"

[1次]

19:43:47 收到数据:#Execute," 1

"


19:45:32 发送数据:$Execute,"print sw(9)"

[1次]

19:45:32 收到数据:#Execute," 0


13:23:41 发送数据:$Execute,"Jump3 Here -TLZ(50), P0 -TLZ(50), P0"

[1次]

13:23:48 收到数据:#Execute,0

13:57:48 发送数据:$Execute,"Go Here -TLZ(50)"

[1次]

13:57:49 收到数据:#Execute,0

14:02:14 发送数据:$Execute,"pass p2"

[1次]

14:02:16 收到数据:#Execute,0


14:25:40 发送数据:$Execute,"pass p0;go p4"

[1次]

14:25:45 收到数据:#Execute,0


14:29:30 发送数据:$Execute,"pass p4;go p0"

[1次]

14:29:34 收到数据:#Execute,0


14:31:32 发送数据:$Execute,"Jump3 Here -TLZ(5), P0 -TLZ(50), P0"

[1次]

14:31:37 收到数据:#Execute,0

15:04:00 发送数据:$Execute,"pass p4; ON 10"

[1次]

15:04:02 收到数据:#Execute,0


15:05:03 发送数据:$Execute,"pass p4; OFF 10"

[1次]

15:05:03 收到数据:#Execute,0



9:54:14 发送数据:$Execute,"Hand P0, Lefty"

[1次]

9:54:14 收到数据:#Execute,0


9:54:57 发送数据:$Execute,"Plist 0"

[1次]

9:54:57 收到数据:#Execute,"P0   = XY(  ****.***, ****.***, ****.***, ****.***, ****.***, ****.*** )  /L /AB* /NF* /J6F* /J4F* /0   

"


9:55:50 发送数据:$Execute,"Plist 1"

[1次]

9:55:50 收到数据:#Execute,"P1   = XY(   291.057,  308.640,  -10.000,  -80.000,    0.000,    0.000 )  /L /A /NF /J6F0 /J4F0 /0   GetWait

"


9:56:48 发送数据:$Execute,"Hand P1, Righty"

[1次]

9:56:48 收到数据:#Execute,0


9:57:07 发送数据:$Execute,"Plist 1"

[1次]

9:57:07 收到数据:#Execute,"P1   = XY(   291.057,  308.640,  -10.000,  -80.000,    0.000,    0.000 )  /R /A /NF /J6F0 /J4F0 /0   GetWait

"


9:51:41 发送数据:$Execute,"Go XY(100, 450, 260, 90, 0, 180)/R /A /NF /J6F0 /J4F0"

[1次]

9:51:42 收到数据:#Execute,0



9:47:33 发送数据:$Execute,"print here"

[1次]

9:47:33 收到数据:#Execute," X:  100.000 Y:  450.000 Z:  260.000 U:   90.000 V:    0.000 W:  180.000 /R /A /NF /J6F0 /J4F0 /0



9:47:33 发送数据:go align(here,0)





要用到的指令



10:37:16 发送数据:$Login,123

[1次]

10:37:16 收到数据:#Login,0



9:49:36 发送数据:$Logout

[1次]

9:49:37 收到数据:#Logout,0



10:45:06 发送数据:$SetCurRobot,0

[1次]

10:45:06 收到数据:#SetCurRobot,0



10:52:51 发送数据:$SetMotorsOn,0

[1次]

10:52:51 收到数据:#SetMotorsOn,0



10:52:51 发送数据:$SetMotorsOFF,0

[1次]

10:52:51 收到数据:#SetMotorsOFF,0



10:52:00 发送数据:$Execute,"Reset"

[1次]

10:52:00 收到数据:#Execute,0



18:37:13 发送数据:$Execute,"move Here + x(50)"

[1次]

18:37:15 收到数据:#Execute,0



8:17:31 发送数据:$Execute,"print RealPos"

[1次]

8:17:31 收到数据:#Execute," X:  200.001 Y:  450.000 Z:  260.000 U:   90.000 V:    0.000 W:  179.999 /R /A /NF /J6F0 /J4F0 /0

"


9:51:41 发送数据:$Execute,"Go XY(0100.000, 0450.000, 0260.000, 0090.000, 0000.000, 0180.000)/R /A /NF /J6F0 /J4F0"

[1次]

9:51:42 收到数据:#Execute,0


13:16:12 发送数据:$Execute,"Go XY(0100.000, 0450.000, 0260.000, 0090.000, 0000.000, 0180.000)/R /A /NF /J6F0 /J4F0"

[1次]

13:16:14 收到数据:#Execute,0


13:16:12 发送数据:$Execute,"Go XY(-100.000, +450.000, 0260.000, 0090.000, 0000.000, 0180.000)/R /A /NF /J6F0 /J4F0"

[1次]

13:16:14 收到数据:#Execute,0


13:18:32 发送数据:$Execute,"Go XY( 100.000,  450.000,  260.000,  090.000,  000.000,  180.000)/R /A /NF /J6F0 /J4F0"

[1次]

13:18:33 收到数据:#Execute,0



9:51:41 发送数据:$Execute,"PASS(100, 450, 260, 90, 0, 180)/R /A /NF /J6F0 /J4F0"

[1次]

9:51:42 收到数据:#Execute,0


错误代码


错误代码 内容

10 远程命令未以$开头

11 远程命令错误

未执行Login

12 远程命令格式错误

13 Login命令密码错误

14 要获取的指定数量超出范围

(小于1或大于100)

忽略了要获取的数量

指定了一个字符串参数

15 参数不存在

参数尺寸错误

调用了超出了范围的元素

19 请求超时

20 控制器未准备好

21 因为正在运行Execute,所以无法执行

99 系统错误

通信错误

$Execute,"Go XY( 100.000,  450.000,  260.000,  090.000,  000.000,  180.000)/R /A /NF /J6F0 /J4F0"



下面勇哥把epson的帮助搬过来,以方便查阅。

分别为:远程以太网指令、指令输出结果、指令错误表


Remote Ethernet Command

 

Format: $ remote command {, parameter....} terminator

 

Remote CommandParameterContentsInput Acceptance Condition
LoginPasswordStart the Controller Remote Ethernet function Authentication by password Execute Login correctly, commands execution is enabled until LogoutAvailable any time
(*10)
Logout
Exit Controller Remote Ethernet function After Logout, execute the Login command to start remote Ethernet function. Logout during task execution causes an error.Available any time
(*10)
StartFunction No.Execute the function of specified number (*2)Auto ON
Ready ON
Error OFF
EStop OFF
Safeguard ON
Stop
Stop all tasks and commandsAuto ON
Pause
Pause all tasks (*3)Auto ON
Running ON
Continue
Continue paused tasksAuto ON
Paused ON
Reset
Clear emergency stop and error (*4)Auto ON
Ready ON
SetMotorsOn
Turn ON the robot motor (*5)Auto ON
Ready ON
EStop OFF
Safeguard OFF
SetMotorsOff
Turn OFF the robot motorAuto ON
Ready ON
Home
Move the arm to home position defined by userAuto ON
Ready ON
Error OFF
EStop OFF
Safeguard OFF
GetIOI/O bit No.Acquire the specified I/O bitAvailable any time (*10)
SetIOI/O bit No. & valueSet the specified I/O bit
1: Turn ON the bit
0: Turn OFF the bit
Ready ON
GetIOByteI/O port No.Acquire the specified I/O port (8 bit) (*8)Available any time
(*10)
SetIOByteI/O port No. & valueSet the I/O specified port (8 bit) (*8)Ready ON
GetIOWordI/O word port No.Acquire the specified I/O word port (16 bit) (*8)Available any time
(*10)
SetIOWordI/O word port No. & valueSet the I/O specified word port (8 bit) (*8)Auto ON
Ready ON
GetMemIOMemory I/O bit No.Acquire the specified memory I/O bit (*8)Available any time
(*10)
SetMemIOMemory I/O bit No. & valueSet the specified memory I/O bit (*8)
1: Turn ON the bit
0: Turn OFF the bit
Auto ON
Ready ON
GetMemIOByteMemory I/O port No.Acquire the specified memory I/O port (*8)Available any time
(*10)
SetMemIOByteMemory I/O port No. & valueSet the specified memory I/O port (8 bit) (*8)Auto ON
Ready ON
GetMemIOWordMemory I/O word port No.Acquire the specified memory I/O word port (16 bit) (*8)Available any time
(*10)
SetMemIOWordMemory I/O word port No. & valueSet the specified memory I/O word port (16 bit) (*8)Auto ON
Ready ON
GetVariable

Parameter name {, type}

____________________________

[Parameter name] (Array element), [Parameter name type], [Number to acquire]

Acquire the value of backup (Global Preserve) parameter (*6)

_________________________________________________________

Acquire the value of backup (Global Preserve) array parameter (*7)

Available any time (*10)
SetVariableParameter name & value {, type}Set the value in the backup (Global Preserve) parameter (*6)Auto ON
Ready ON
GetStatus
Acquire the Controller stateAvailable any time (*10)
ExecuteCommand stringExecute the command (*8) (*9)Auto ON Ready ON Error OFF
EStop OFF Safeguard OFF
Abort
Abort the command execution (*8)Auto ON

 


(*1) The Controller state bit from GetStatus.

(*2) Execute the function specified in the Main[Function No.].

Function NameFunction No.
Main0
Main11
Main22
Main33
Main44
Main55
Main66
Main77

 

 

 

(*3) Pause command is not available for “NoPause task” and “NoEmgAbort task”. For the details, refer to the help or the section “Pause” in the EPSON RC+5.0 Language reference manual.

(*4) I/O output will be turned OFF and the robot parameter will be initialized. For the details, refer to the help or the section “Reset” in the EPSON RC+5.0 Language reference manual.

(*5) The robot parameter will be initialized. For the details, refer to the help or the section “Motor” in the EPSON RC+5.0 Language reference manual.

(*6) Parameter type means {Boolean | Byte | Double | Integer | Long | Real | String}.
Type specified: for the backup parameters when the parameter name and type are same.
Type not specified: for the backup parameters when the parameter names are same.

 

(7) Acquiring the value of array parameter is supported in the firmware Ver.1.10.*.* or later.

For the array element, specify an element you acquire as the following:

You need to specify an element if when acquiring from the head of the array.

image.png

You cannot omit the parameter type and number to acquire.

You cannot specify a string for the parameter type.

Available number to acquire is up to 100. If you specify a number over the number of array elements, you have an error.

 

e.g.) "$GetVariable,gby2(3,0),Byte,3"

Acquires values of gby2(3,0), gby2(3,1), gby2(3,2) of Byte type 2D array parameter gby2.

 

(*8) Following functions are supported in the firmware 1.13.*.* or later..

  • Acquiring and setting I/O port

  • Acquiring and setting I/O word port

  • Acquiring and setting memory I/O

  • Acquiring and setting memory I/O port

  • Acquiring and setting memory I/O word port

  • Execution and abortion of command

(*9) Specify the command and parameters in the double quotation marks.

Following commands are available while Execute is running.

Commands available while Execute is running

Remote Command
Abort
GetStatus
SetIO
SetIOByte
SetIOWord
SetMemIO
SetMemIOByte
SetMemIOWord

When the commands specified in (SetIO, SetIOByte, SetIOWord, SetMemIO, SetMemIOByte, SetMemIOWord) are the same and executed at the same time, the command executed later will result in error. Make sure to check the execution result by using GetStatus after the execution of Execute command and output command which the Execute command is being executed.

(*10) “Available anytime” applies only when the following conditions are met.

When “Remote Ethernet” is set as the control device, or “Remote Ethernet” is not set as the control device, but set to be used for monitoring.

Commands available for monitoring

When the Remote Ethernet control is not set as the control device but set to be used for monitoring, the following commands are only available to be executed.

 

Remote command
Main
Login
Logout
GetIO
GetIOByte
GetIOWord
GetMemIO
GetMemIOByte
GetMemIOWord
GetVariable
GetStatus


Remote Ethernet Response

 

When the Controller receives the command correctly, the response in the following format is shown in the executing command.

 

Command Format
Remote command that acquire the value Except GetIO, GetVariable, and GetStatus#[Remote command],[0] terminator
GetIO#GetIO,[0 | 1] terminator             *1
GetMemIO#GetMemIO,[0 | 1] terminator    *1
GetIOByte#GetIOByte,[ Hex string (00 to FF) of Byte (8Bit)] terminator  
GetMemIOByte#GetMemIOByte,[ Hex string (00 to FF) of Byte (8Bit)] terminator
GetIOWord#GetIOWord,[ Hex string (0000 to FFFF) of Word (16Bit)] terminator
GetIOMemWord#GetMemIOWord,[ Hex string (0000 to FFFF) of Word (16Bit)] terminator
GetVariable# GetVariable,[Parameter value] terminator
GetVariable (array)# GetVariable,[ Parameter value 1],[ Parameter value 2],...,terminator *4
GetStatus#GetStatus,[Status],[Error, Warning code] terminator Example) #GetStatus,aaaaaaaaaa,bbbb
*2 *3
ExecuteIf the value is returned as a result of command execution
#Execute,”[Execution result]” terminator

 

*1 [0 | 1] I/O bit ON: 1/ OFF: 0

*2 Status
In the example above, 10 digits “aaaaaaaaaa” is for the following 10 flags. Teach/Auto/Warning/SError/Safeguard/EStop/Error/Paused/Running/Ready
1 is ON /0 is OFF
If Teach and Auto are ON, it is 1100000000.

*3 Error / Warning code

It is indicated in 4 digits. If there is no error and warning, it is 0000.

e.g.)1 : #GetStatus,0100000001,0000

The bits for Auto and Ready is ON (1).

This means that AutoMode is ON and be in Ready state. Command execution is enabled.

e.g.)2 : #GetStatus,0110000010,0517

This means the warning occurs during the operation. Take appropriate action for the warning code. (In this case, warning code is 0517 )

 

FlagContents
TeachTurn ON in the TEACH mode
AutoTurn ON in the remote input acceptance condition
WarningTurn ON in the warning condition
Task can be executed as usual even a warning condition. However, take action for the warning as soon as possible.
SErrorTurn ON in the serious error condition
When a serious error occurs, Reboot the Controller to recover from the error condition. “Reset input” is not available.
SafeguardTurn ON with safety door open
EStopTurn ON in the emergency condition
ErrorTurn ON in the error condition
Use “Reset input” to recover from the error condition.
PausedTurn ON with paused task
RunningTurn ON with task executing
Turn OFF when “Paused output” is ON
ReadyTurn ON with the Controller completed the startup and no task executing

 

*4 It returns values of specified number in the Number to acquire.

 

 

Remote Ethernet Error Response

 

When the Controller can not receive the remote command correctly, the error response is shown in the following format.

Format: ![Remote command],[Error code] terminator

 

Error Code Contents
10Remote command does not begin with $
11Remote command is wrong
Login is not executed
12Remote command format is wrong
13Login command password is wrong
14Specified number to acquire is out of range
(Less than 1 or more than 100)
Number to acquire is omitted
Specified a string parameter
15Parameter does not exist
Dimension of parameter is wrong
Element out of range is called
19Request time out
20Controller is not ready
99System error
Communication error

 

Communication Sequence

 

image.png

 


 




--------------------- 

作者:hackpig
来源:
www.skcircle.com
版权声明:本文为博主原创文章,转载请附上博文链接!


本文出自勇哥的网站《少有人走的路》wwww.skcircle.com,转载请注明出处!讨论可扫码加群:

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

会员中心
搜索
«    2024年4月    »
1234567
891011121314
15161718192021
22232425262728
2930
网站分类
标签列表
最新留言
    热门文章 | 热评文章 | 随机文章
文章归档
友情链接
  • 订阅本站的 RSS 2.0 新闻聚合
  • 扫描加本站机器视觉QQ群,验证答案为:halcon勇哥的机器视觉
  • 点击查阅微信群二维码
  • 扫描加勇哥的非标自动化群,验证答案:C#/C++/VB勇哥的非标自动化群
  • 扫描加站长微信:站长微信:abc496103864
  • 扫描加站长QQ:
  • 扫描赞赏本站:
  • 留言板:

Powered By Z-BlogPHP 1.7.2

Copyright Your skcircle.com Rights Reserved.

鄂ICP备18008319号


站长QQ:496103864 微信:abc496103864