class="hljs-ln-code"> class="hljs-ln-line"> class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="3"> class="hljs-ln-code"> class="hljs-ln-line">void putValueToControl(char panel[], char control[], float val); class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="4"> class="hljs-ln-code"> class="hljs-ln-line"> class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="5"> class="hljs-ln-code"> class="hljs-ln-line">void putValueToControl(char panel[], char control[], float val, long paragraph);1 class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="6"> class="hljs-ln-code"> class="hljs-ln-line"> class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="7"> class="hljs-ln-code"> class="hljs-ln-line">void putValueToControl(char panel[], char control[], long val); class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="8"> class="hljs-ln-code"> class="hljs-ln-line"> class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="9"> class="hljs-ln-code"> class="hljs-ln-line">void putValueToControl(char panel[], char control[], long val, long paragraph);1 class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="10"> class="hljs-ln-code"> class="hljs-ln-line"> class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="11"> class="hljs-ln-code"> class="hljs-ln-line">void putValueToControl(char panel[], char control[], long val, long paragraph, long dispHex);1 class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="12"> class="hljs-ln-code"> class="hljs-ln-line"> class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="13"> class="hljs-ln-code"> class="hljs-ln-line">void putValueToControl(char panel[], char control[], char val[]); class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="14"> class="hljs-ln-code"> class="hljs-ln-line"> class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="15"> class="hljs-ln-code"> class="hljs-ln-line">Message Output class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="16"> class="hljs-ln-code"> class="hljs-ln-line"> class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="17"> class="hljs-ln-code"> class="hljs-ln-line">void putValueToControl(char panel[], char control[], message val); class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="18"> class="hljs-ln-code"> class="hljs-ln-line"> class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="19"> class="hljs-ln-code"> class="hljs-ln-line">void putValueToControl(char panel[], char control[], message val, long paragraph);1 class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="20"> class="hljs-ln-code"> class="hljs-ln-line"> class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="21"> class="hljs-ln-code"> class="hljs-ln-line">void putValueToControl(char panel[], char control[], message val, long paragraph, long dispHex);1 class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}" onclick="hljs.signin(event)">
class="table-box"> panel | Name of the panel, restricted to 128 characters. |
control | Name of the control, restricted to 128 characters. |
val | Value to be displayed. |
paragraph | Indicates if the output shall be written to a new line. 0:NO, 1:YES |
dispHex | Indicates if the output is formatted hexadecimal. |
此处需要注意的是输出是文本的话是不可用换行格式的,但是可以在文本中自行加入换行符\n进行换行。


使用换行符\n后:


想要清除组件内的内容可以使用DeleteControlContent函数。
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="1"> class="hljs-ln-code"> class="hljs-ln-line">on sysvar TestSys::Buttom_clear
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="2"> class="hljs-ln-code"> class="hljs-ln-line">{
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="3"> class="hljs-ln-code"> class="hljs-ln-line"> if(@this)
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="4"> class="hljs-ln-code"> class="hljs-ln-line"> {
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="5"> class="hljs-ln-code"> class="hljs-ln-line"> DeleteControlContent("ReadFlashFile", "Flash");
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="6"> class="hljs-ln-code"> class="hljs-ln-line"> }
class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}" onclick="hljs.signin(event)">
在打印报文的过程中碰到了输出报文与trace里实际显示不一致的情况:

检查了语法以及函数使用help皆没有找到原因,最后发现是因为报文和静态变量一样,也需要进行实时更新。
添加此步骤后问题解决。

1.2 Hex/Text Editor
使用该组件时需要绑定变量,可以设置为同时显示text和Hex,单独显示text,单独显示Hex,以及每行可以显示的字符长度。

需要注意的时,变量的类型只能为以下三种

用到的函数也主要是为系统变量赋值的函数,类似的函数有很多,但是需要注意变量的类型。

此处为输出string:


2 区别
二者在数据的处理上也有一定的区别,CAPL output View 只能够复制和删除组件内的数据,
而Hex/text Editor除了可以复制删除数据外还可以粘贴数据,另存为数据,读取数据以及Edit Wizard
如果只是想显示数据推荐使用CAPL output View要更加简单一些,如果是想做更多的后处理推荐使用Hex/text Editor。

评论记录:
回复评论: