前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Tool之StethoScope

Tool之StethoScope

作者头像
Taishan3721
发布2021-11-12 18:33:11
2890
发布2021-11-12 18:33:11
举报

欢迎关注VxWorks567

如转发 请标明出处!

ScopeTools里还有个成员叫做StethoScope,从Vx67开始,改名为Data Monitor。

它的简介如下,懒得翻译了。有兴趣的,自行回顾初中词汇吧

  • Real-Time Graphical Display. The Data Monitor full-color, real-time graphical displays let you watch your program execute. Multiple windows can be open at the same time, displaying a rich mixture of signals and functionality.Minimal Intrusion. The Data Monitor does not impact the performance of your real-time system. Collection is very fast; data transfer takes place in the background at low priority.
  • Modify Data. The Data Monitor can also modify program variables. Experiment quickly, isolate problems, and run test cases by changing the value of variables and parameters while your program executes.
  • Dynamic Signal Installation. Install variables by name as your program runs, including structs, classes, and unions, by simply typing in the name of the variable you want to view.
  • Data Storage. The Data Monitor exports data in many formats. It is organized (each run is timestamped and labeled with signal names and units), and accompanied by your notes. You can choose which data to save, or have the Data Monitor save them automatically.
  • Support for Large Systems. With this program, you can register literally hundreds of variables for monitoring. You can collect any subset of the registered variables, and organize your variables with a powerful hierarchical tree browser.
  • Type Support. The Data Monitor supports many data types without loss of precision. This includes support for all common data types—from one-byte char to eight-byte double, support for pointers and structures to make it easier to monitor complex data structures, user-defined buffers, and support for hexadecimal data display.
  • Multiple Target Connections .You can connect to more than one target during a Data Monitor session. This allows you to simultaneously view the results from multiple targets as needed on a single screen for live comparison.

它功能非常强大,使用时略微复杂,今天只验证它最基本的功能: 动态展示全局变量值的变化

例如使用如下代码,一个正弦值和一个余弦值

#include <math.h>
#include <taskLib.h>
#include <sysLib.h>

double f1;
double f2;

void testToolData()
{
    double i = 0.0;
    while(1)
        {
        f1 = sin(i);
        f2 = cos(i);
        i += 0.1;
        taskDelay(sysClkRateGet()/10);
        }
    }

使用Vx69的Data Monitor实时追踪f1和f2的效果如下图。横轴是时间,纵轴是数值

在Vx6中的具体操作流程如下

  • 编译示例、启动VxWorks
  • 在WorkBench中,连接Target Connection
  • 设置Data Monitor属性
本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2021-11-09,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 这里只有VxWorks 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档