EPSON LS3-401S机器人学习笔记 3

SPEL+语言学习

 

调用函数

 

To get a return value, you must use the function as an argument in a statement. You can also omit the Call statement if you don't need the return value. When Call is omitted, then parentheses for the arguments must not be supplied.

要获得返回值,必须在语句中使用该函数作为参数。如果不需要返回值,也可以省略Call语句。当省略调用时,则不能提供参数的圆括号。

 

Call MyFunc(1, 2)
MyFunc 1, 2

 

String variables must have an additional dollar sign ('$') suffix, as shown in the example below:

字符串变量必须有额外的美元符号('$')后缀,如下例所示:


Function Test
String modname$
Print "Enter model name:"
Line Input modname$
Print "model is ", modname$
Fend

 

 

Variable scopes

 

There are three different scopes for variables in SPEL+:
-Local
-Module
-Global

 

Module variables are available to all functions in the same program file.

To declare module variables in a program, use one of the variable declaration instructions at the beginning of the program before any Function statements:

模块变量可用于同一程序文件中的所有函数。

要在程序中声明模块变量,请在程序开头任何函数语句之前使用其中一条变量声明指令:

Boolean, Byte, Integer, Long, Real, Double, String

 

The total available number of array elements for local and global preserve variables is 100 for strings and 1000 for all other types.
The total available number of array elements for global and module variables is 1000 for strings and 10000 for all other types.

本地和全局保存变量可用数组元素的总数是字符串的100,其他类型的1000。

全局变量和模块变量的可用数组元素总数为字符串的1000个,其他类型的10000个。

Use Redim to change the bounds of an array at run time.
Integer a(10)
Redim a(20)
To preserve values when using Redim, add the Preserve optional argument.
Integer a(10)
Redim Preserve a(20)
Use UBound to get the upper bound of an array dimension.
Integer i, a(10)
For i = 1 to UBound(a)
a(i) = i
Next i

 

 

 

Multi-tasking

 

SPEL+ supports up to 16 tasks running simultaneously. A task is a function that has been started by the system or by the Xqt statement.

SPEL+支持最多16个任务同时运行。任务是由系统或Xqt语句启动的函数。

 

Robot coordinate systems

 

Robot Coordinate System

This is the native coordinate system of the robot. This is also known as the default base coordinate system.

Local Coordinate System

This is a user defined coordinate system located somewhere within the working envelop.

Tool Coordinate System

This is the coordinate system of the tool mounted on the robot end-effector.

机器人坐标系

这是机器人的本地坐标系。这也被称为默认的基础坐标系统。

局部坐标系

这是位于工作范围内某个位置的用户定义的坐标系统。

工具坐标系

这是安装在机器人末端执行器上的工具的坐标系。

 

Robot Coordinate System

 

 

 

Local Coordinate Systems

 

With SPEL+, a maximum of 15 local coordinate systems can be defined. SPEL+ correlates robot coordinate systems and local coordinate systems by defining in advance the relative positional relationship of the local coordinate system from the robot coordinate system, assigning local numbers (1 to 15), and then assigning the local numbers to coordinate system attributes (local).
To define a local coordinate system, use the Local statement.

使用SPEL+,可以定义最多15个局部坐标系。SPEL+通过预先定义机器人坐标系中局部坐标系的相对位置关系,分配局部编号(1到15),然后将局部编号分配给坐标系属性(local),将机器人坐标系和局部坐标系关联起来。

要定义本地坐标系统,请使用local语句。

 

Tool Coordinate Systems

 

SCARA Tool 0 coordinate system
The origin of tool 0 for SCARA robots is the center of the forth joint (rotation joint). When the fourth joint is adjusted to the position of 0 degrees, the tool 0 coordinate system axes are parallel to the robot coordinate system axes (see the figure below.)
The tool 0 coordinate system rotates as the fourth joint rotates.

SCARA工具0坐标系统

SCARA机器人刀具0的原点是第四个关节(旋转关节)的中心。将第四个关节调整到0度位置时,刀具0坐标系轴线与机器人坐标系轴线平行(下图)。

当第四个关节旋转时,工具0坐标系旋转。

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值