物联网学习thingworx入门——界面mushup使用与绑定数据

前言

最近小编在学习物联网thingworx,关于这个软件的优点就不说了,说说缺点哈哈哈哈哈

缺点:
1.软件平台收费;按用户数量收费,安全权限收费;
2.学习资料较多,且乱
3.开发者而言:无版本控制。得自己备份

官网下载安装+文档参考

官网-菜单-EDUCATION&SUPPORT->Developer Tools

物联网学习thingworx入门——界面mushup使用与绑定数据
点击左下角
物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据申请一个账户然后**试用
物联网学习thingworx入门——界面mushup使用与绑定数据按步骤操作后
物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据这就是我们需要操作的软件了
物联网学习thingworx入门——界面mushup使用与绑定数据

入门

菜单

物联网学习thingworx入门——界面mushup使用与绑定数据

菜单参考

文档教程参考

物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据https://developer.thingworx.com/en/resources/guides

物联网学习thingworx入门——界面mushup使用与绑定数据

thinkworx基础学习计划

物联网学习thingworx入门——界面mushup使用与绑定数据
物联网学习thingworx入门——界面mushup使用与绑定数据
物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据学习文档技巧

物联网学习thingworx入门——界面mushup使用与绑定数据选择入门-入门后就选中间-专家(按难度等级来学习)

深入学习
物联网学习thingworx入门——界面mushup使用与绑定数据

前台界面

物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据
物联网学习thingworx入门——界面mushup使用与绑定数据
物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据

详细介绍添加链接描述

物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据

使用数据

在“ 添加数据”弹出窗口的“ 搜索实体”字段中,输入mbqs。

单击右箭头以选择GetPropertyValues。
现在,已将MBQSThing的GetPropertyValues服务添加到“ 添加数据”弹出窗口右侧的“所选服务”部分。

物联网学习thingworx入门——界面mushup使用与绑定数据

物联网学习thingworx入门——界面mushup使用与绑定数据

将小工具绑定到属性

物联网学习thingworx入门——界面mushup使用与绑定数据
物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据将MBQSThing> GetPropertyValues>返回的数据>所有数据> Gauge_Value拖放到中央Canvas区域中的Gauge Widget中。
物联网学习thingworx入门——界面mushup使用与绑定数据

物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据
物联网学习thingworx入门——界面mushup使用与绑定数据效果:

物联网学习thingworx入门——界面mushup使用与绑定数据升级下

案例

1.新建mushup

MBQSMashup

物联网学习thingworx入门——界面mushup使用与绑定数据
添加标签

1.选择Widgets标签,然后将三个Label Widget拖放到中央Canvas上。
物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据
2.在顶部标签小部件被选中的情况下(通过单击它),将DisplayName更改为label-gears-count并点击键盘上的Tab键以锁定修改。
物联网学习thingworx入门——界面mushup使用与绑定数据

3.在仍选择新命名的label-gears-count的情况下,Gears Count在LabelText字段中键入并按Tab键。
物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据

绑定了这个Customclass才有labelText

4.点击中间标签 ; 然后,在左下角的Widget Properties面板中,将DisplayName更改为label-pistons-count,将Text更改为Pistons Count。

5.同样,将底部Label的DisplayName更改为label-wheels-count,将Text更改为Wheels Count。
物联网学习thingworx入门——界面mushup使用与绑定数据6.点击保存

3.添加文本框

显示有关库存中各个零件数的一些信息。

1.将三个Text Field Widget拖放到中央Canvas上。
物联网学习thingworx入门——界面mushup使用与绑定数据

4.添加复选框

1、将三个Checkbox Widget拖放到中央Canvas上。
物联网学习thingworx入门——界面mushup使用与绑定数据

2、随着顶部复选框控件选择,更改显示名称到checkbox-gears-manual和标签属性Gears Manually Set。
将中间复选框的DisplayName 更改为,checkbox-pistons-manual并将Label更改为Pistons Manually Set。
将底部复选框的DisplayName 更改为,checkbox-wheels-manual并将Label更改为Wheels Manually Set。
物联网学习thingworx入门——界面mushup使用与绑定数据
保存save

效果
物联网学习thingworx入门——界面mushup使用与绑定数据

添加button

输入手动计数后,我们需要触发将其存储在后端。我们可以使用Button Widget来做到这一点

1.将两个Button Widget 拖放到中央Canvas上。

物联网学习thingworx入门——界面mushup使用与绑定数据2.选中顶部的Button Widget,将DisplayName更改为button-manual-set,将Label更改为Manually Set Counts,然后单击并拖动Button的右侧以扩大其大小。

物联网学习thingworx入门——界面mushup使用与绑定数据

3.选中底部的Button Widget,将DisplayName更改为button-manual-retrieve,将Label更改为Manually Retrieve Counts,然后单击并拖动Button的右侧以扩大其大小。

添加数据服务

1.点击“ 数据”标签右上角的+按钮。
2.在“ 选择实体”字段中,搜索并选择MBQSThing。
3.在“ 选择服务”字段中,搜索并选择“ GetPropertyValues”。
4.检查Mashup已加载?GetPropertyValues的复选框。
5.在“ 选择服务”字段中,搜索并选择SetProperties。

物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据注意保存

GetPropertyValues

GetPropertyValues已将Thing的Properties的所有值引入到Mashup中。现在,让我们将这些值绑定到小部件。

1.在“数据”选项卡右侧的“ GetPropertyValues服务” 下,展开“ 所有数据”。

物联网学习thingworx入门——界面mushup使用与绑定数据

2.将Gears_Count拖放到textfield-gears-count小部件上。

物联网学习thingworx入门——界面mushup使用与绑定数据3.在“ 选择绑定目标”弹出窗口上,单击“ 文本”。

物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据4.重复步骤2和3,将Pistons_Count绑定到textfield- pistons -count,并将Wheels_Count绑定到textfield-wheels-count。

物联网学习thingworx入门——界面mushup使用与绑定数据

5.将Gears_Count_Manually_Set拖放到复选框齿轮手动小部件上。

物联网学习thingworx入门——界面mushup使用与绑定数据
重复以上步骤

7.重复步骤5和6,将Pistons_Count_Manually_Set绑定到checkbox- pistons -manual并将Wheels_Count_Manually_Set绑定到checkbox-wheels-manual。
点击保存。

SetProperties

我们希望将小部件绑定到SetProperties服务,以手动设置库存计数,以防仓库中的IoT传感器出现问题。

1.在右侧的“数据”选项卡下,最小化GetPropertyValues服务并展开SetProperties服务。

物联网学习thingworx入门——界面mushup使用与绑定数据2.单击textfield-gears-count小部件以将其选中。

物联网学习thingworx入门——界面mushup使用与绑定数据3.将鼠标悬停在TextBox的左上角下拉菜单上以展开选项。
物联网学习thingworx入门——界面mushup使用与绑定数据

4.将text拖放到SetProperties> Gears_Count上。
物联网学习thingworx入门——界面mushup使用与绑定数据物联网学习thingworx入门——界面mushup使用与绑定数据赋值
物联网学习thingworx入门——界面mushup使用与绑定数据5.重复步骤2到4,结合文本从TextField的活塞-计数到Pistons_Count和文本框轮计数到Wheels_Count。

6.单击复选框齿轮手动小部件以将其选中。

物联网学习thingworx入门——界面mushup使用与绑定数据

7.将鼠标悬停在复选框的左上角下拉菜单上,以展开选项。

物联网学习thingworx入门——界面mushup使用与绑定数据
8.将状态拖放到Gears_Count_Manually_Set上。
物联网学习thingworx入门——界面mushup使用与绑定数据9.重复步骤6至8,将State状态从checkbox- pistons -manual绑定到Pistons_Count_Manually_Set,然后将checkbox-wheels-manual 绑定到Wheels_Count_Manually_Set。
物联网学习thingworx入门——界面mushup使用与绑定数据11.将鼠标悬停在“按钮”的左上角下拉菜单上以展开选项。
物联网学习thingworx入门——界面mushup使用与绑定数据12.将Clicked事件拖放到“数据”选项卡下的SetProperties上。

物联网学习thingworx入门——界面mushup使用与绑定数据

注意:本节中的先前步骤(我们将小部件绑定到属性)仅在将值存储到ThingWorx Foundation后端中定义了定义。要实际推送这些值,必须调用SetProperties Service本身。

13.与setProperties方法服务选择,拖动和放下setProperties方法ServiceInvokeCompleted事件(在右下数据属性部分)到GetPropertyValues服务(在右上方数据标签)。

物联网学习thingworx入门——界面mushup使用与绑定数据

手动数据检索

我们希望将Button绑定到GetPropertyValues,以使用后端不断变化的库存计数更新GUI,而无需重新加载页面。

1.单击按钮手动检索以将其选中。
物联网学习thingworx入门——界面mushup使用与绑定数据
2.将鼠标悬停在此Button Widget的左上角下拉菜单上以展开选项。
物联网学习thingworx入门——界面mushup使用与绑定数据
3.将Clicked事件拖放到GetPropertyValues服务上。

除了重新加载页面之外,这将创建另一种在GUI中更新零件数的方法。

物联网学习thingworx入门——界面mushup使用与绑定数据点击保存。

测试

最后小编失败了,并没有看懂它的测试

总结