【源码】SIMULINK实时运行时间追踪器

在这里插入图片描述
RealTime Pacer能够放慢仿真时间,使得运行时间与真实的挂钟时间同步。

The RealTime Pacer block slows down (“paces”) simulation time so that it synchronizes with real elapsed time.

通过Speedup参数可以控制仿真时间的实际运行节奏。

The degree of slowdown is controllable via a Speedup parameter.

该模块使用M文件的S函数实现,可以支持任何Simulink平台,但不支持代码产生。

  1. The block is implemented using an M S-function, so it works on any supported Simulink platform. It does not support code generation.

该模块使用MATLAB PAUSE函数对仿真时间进行降速,PAUSE命令在暂停期间放弃对处理器的控制,因此系统性能不会下降。

  1. The block uses the MATLAB PAUSE function to slow down the simulation. The PAUSE command gives up the processor during the pause, so system performance does not degrade.

M-S函数描述了如何使用嵌套函数来简化代码设计。

  1. The M-S function illustrates how to use nested functions to simplify the code.

仿真时间和真实的实时时间之间的匹配是近似的,预期差异在10到30毫秒的量级。这种限制是由于多任务操作系统难以精确定时导致的。

The matching between simulation time and elapsed real time is approximate, with expected differences on the order of 10 to 30 milliseconds. This limitation is due to difficulties of precise timing with a multitasking operating system.

源码下载地址:

http://page5.dfpan.com/fs/1lc6j2d21829a165ac7/

更多精彩文章请关注微信号:在这里插入图片描述

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值