当前位置:网站首页>Kunlun State Screen Production (serialization 4) --- Basics (graphical setting and display, button lights)
Kunlun State Screen Production (serialization 4) --- Basics (graphical setting and display, button lights)
2022-07-30 07:14:00 【transparent light】
Preface
After three serializations, almost the basic routine of the screen has been clearly displayed. Of course, this is only the basic usage. There should be many advanced usages in the back. As for how many things are needed in the project, almost all of them can be covered now..
(1) Parameter setting, this link has been completed;
(2) Parameter display: This shows that this link has been completed;
(3) Button action: this button sends this link has been done;
(4) Communication: The timing sending and button sending of this serial port have been completed.(Not yet received, follow-up update)
Content of this section
This is almost a continuation of the content in Serial 3, including:
(1) Content 1: slider input, progress bar output, dial output, dialog output;
(2) Content 2: plus and minus buttons, dialog output;
(3) Content 3: button control, indicator light output.
Section 1: Script
1. Add device channel

Among them: Content 1 corresponds to: slider input, horizontal bar output, dial output, display output;
Corresponding to content 2: auto-change input plus plus, auto-change input minus and minus, auto-change display;
Content 3 corresponds to: button light 1 control, light 1 control.
2. Fill in the script program
Same as the previous section, add channel change variables, namely: interrupt number entry
DIM ButtonChannel as INTEGERButtonChannel = !GetCurrentChannelNum()Corresponding to content 1, input and output:
IF ButtonChannel = 4 THEN!GetSingleChannelValueByName("slider input", gfGetData2)!SetSingleChannelValueByName("Bar output", gfGetData2)!SetSingleChannelValueByName("Dial output", gfGetData2)!SetSingleChannelValueByName("Display output", gfGetData2)ENDIFCorresponding to content 2, input and output:
IF ButtonChannel = 8 THENgnSelfData1 = gnSelfData1 + 1!SetIntChannelValueByName("Automatic display", gnSelfData1)ENDIFIF ButtonChannel = 9 THENgnSelfData1 = gnSelfData1 - 1!SetIntChannelValueByName("Automatic display", gnSelfData1)ENDIFCorresponding to content 3, input and output:
DIM glLedBit as INTEGERIF ButtonChannel = 16 THEN!GetIntChannelValueByNum(ButtonChannel , glLedBit )!SetIntChannelValueByName("Lamp 1 Control", glLedBit )ENDIThe program contains three parts:
(1) Declare variables; own format, look at the scripting help documentation, it is clear at a glance;
(2) Channel number selection: similar to the interrupt entry, equal to how many you can count;
(3) Input and output program: first input the program, usually get, and then output the program, usually set;
Note: There are global variables in it, similar to the program's globe.For both the acquisition channel and the single channel, there is a global variable, where gf is a global float type, and gn is a global int type. This needs to be standardized by yourself, just look at the C language writing specification.

Section 2: Linking script drivers
In the device window, update the driver, add the link corresponding to the data object and channel type, preferably the two are the same text, to prevent yourself from messing up in the end, if you talk too much, you will be tears, mess up once, and find the variablesNo, it's very troublesome.

Section 3: Screen Interface Writing
Just pull the corresponding module yourself, the specific module doesn't matter, as long as it can be displayed.In the operation properties, select the corresponding variable name.

Section 4: Running
Tools, download configuration, project download, start and run.If you can't make a video, just take two screenshots.
1. The first screen
Drag the slider, the other three will display the corresponding value.Click the add button three times to display 3

2. The second screen
Drag the slider to display different values.Click twice, display 1, turn on the light control button, the red light turns green.

Section 5: Conclusion
Kunlun On-state screen feels quite easy after getting started, and it should be almost a fool-like configuration.Looking at the configuration writing tutorial, there are also higher tutorials, which seem to be very troublesome. Usually, everyone uses the following types when writing:
(1) Serial port transceiver;
(2) Box input, box output;
(3) Graphical input, graphic output;
(4) LED light display.
These functions can almost cover most of the screen usage needs.If you need other advanced functions, you can leave a message below, I can give it a try, and then go to the serialization and tell everyone.
Section VI: Outlook
There is still a part that has not been done: the reception of the serial port, and the processing and display of the serial port data.The next section will be written slowly. If you need it, please add WeChat or leave a message. Let’s discuss and communicate together.

边栏推荐
- 华秋第八届硬创赛与安创加速器达成战略合作,助力硬科技项目成长
- CNN经典模型发展进程
- DeepLearing4j深度学习之Yolo Tiny实现目标检测
- 边境的悍匪—机器学习实战:第六章 决策树
- 【江科大自化协stm32F103c8t6】笔记之【入门32单片机及TIM定时中断初始化参数配置】
- [Punctuality Atom] Simple application of sys.c, sys.h bit-band operations
- i++与 ++i 的区别
- HSPF 模型应用
- Atmospheric particulate matter PMF source analysis
- 三种内核结构---宏内核、微内核、混合内核
猜你喜欢

边境的悍匪—机器学习实战:第二章 端到端的机器学习项目

QT串口动态实时显示大量数据波形曲线(四)========“界面的美化与处理”

Pytorch(二):数据读取机制(DataLoader、DataSet)与图像预处理模块(transforms)

边境的悍匪—机器学习实战:第十一章 训练深度神经网络

基于OpenCV的双目重建

DeepLearing4j's deep learning Yolo Tiny realizes target detection

昆仑通态屏幕制作(连载4)---基础篇(图形设定与显示,按钮灯)

CPU缓存一致性问题

Pytorch(一):动态图机制以及框架结构

基于全球模式比较计划CMIP6与区域气候-化学耦合模式 WRF-Chem 的未来大气污染变化模拟
随机推荐
二叉树(一):深度优先遍历与广度优先遍历
无人机生态环境监测、图像处理与GIS数据分析
2021-09-19 集成学习TASK2
Simulation of Future Air Pollution Changes Based on Global Model Comparison Program CMIP6 and Regional Climate-Chemistry Coupling Model WRF-Chem
华秋电子成为开放原子开源基金会openDACS捐赠人,共建 openDACS开源生态
QT每周技巧(3)~~~~~~~~~串口添加
QT连载3:基于QT和STM32H750的LORA试验平台(2)
QT串口动态实时显示大量数据波形曲线(五)========“最终完美解决版”
C语言学习经验
FPGA解析B码----连载1
【Qingdao Station】High-level application of SWAT model and modeling of areas without data, uncertainty analysis and climate change, improvement of land use surface pollution impact model and case analy
Pytorch(一):动态图机制以及框架结构
vs编译boost库脚本
边境的悍匪—机器学习实战:第八章 降维
基于全球模式比较计划CMIP6与区域气候-化学耦合模式 WRF-Chem 的未来大气污染变化模拟
ssh 脚本 空格字符转换
Difference between logical shift right and arithmetic right shift
用pop3收取gmail的邮件
Flood Control Assessment Report Compilation Method and Flood Modelling under the New Guidelines (HEC-RAS)
Target detection, object classification and semantic segmentation of UAV remote sensing images based on PyTorch deep learning