PlantSimulation_ Execute IN

executeIn[持续重复调用]
if not des.empty //目标位置非空禁止直行该任务
 self.executeIn(10)  10秒后调用该程序 如果是Self  会持续间隔10秒调用
 return
end
 Objects Reference Help > Information Flow Objects > Method > Methods of the Method > executeIn 

Syntax

&MyMethod.executeIn(CallAt:time[,Argument1:any, ...]) → boolean
&MyMethod.executeIn(CallAt:dateTime[,Argument1:any, ...]) → boolean 

The method executeIn calls a Method after the number of seconds designated by the parameter of data type time has elapsed. Plant Simulation enters an event into the List of scheduled events in the EventController for the amount of seconds you entered for time after the current simulation time. Since the Method will be called at some time in the future, time must be greater than or equal to 0. For parameters of data type dateTime or date, Plant Simulation computes the time span using the date of the EventController and the date designated by the parameters dateTime or date. 

In the called Method the anonymous identifier ? references the caller, i.e., the Method which contained the Method executeIn or if the caller is a user-defined attribute of data type method it references the location of this user-defined attribute. 

Parameters

•The parameter CallAt of data type time designates the time in seconds after which the Method will be called. 

•The following optional parameters (Argument1, ...) of data type any are passed when the Method is called the next time. 

Note The point in time of the method call has to be in the future.
 

Return Value

The return value has the data type boolean. 

Example

&MyMethod1.executeIn(23.5)
-- throttle the engine in 5 seconds to 85 percent
&ThrottleEngine.executeIn(5, 0.85)
-- New years day 2000 midnight
&MyMethod2.executeIn(str_to_date("1.1.00"))
-- call the method which a local variable references
var obj: object := &MyMethod3
obj.executeIn(4, "my string", true) 

Related Topic

deleteexecuteIn

方法executeIn在经过数据类型time参数指定的秒数后调用Method。 Plant Simulation将事件输入到EventController中的预定事件列表中,以查看当前模拟时间之后输入的秒数。由于将来某个时间将调用Method,因此时间必须大于或等于0.对于数据类型dateTime或date的参数,Plant Simulation使用EventController的日期和指定的日期计算时间跨度。参数dateTime或date。在被叫方法中的匿名标识符?引用调用者,即包含方法executeIn的方法,或者如果调用者是数据类型方法的用户定义属性,则它引用此用户定义属性的位置。参数数据类型time的参数CallAt指定调用Method的时间(以秒为单位)。下次调用Method时,将传递以下数据类型any的可选参数(Argument1,…)。

要想获得更多,欢迎加入PlantSimulation QQ技术进阶群:964485532
本博客每日一更,欢迎关注

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值