当前位置:网站首页>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.

边栏推荐
- 新导则下 防洪评价报告编制方法及洪水建模(HEC-RAS)
- jvm之方法区
- ipconfig命令指南
- DeepLearing4j深度学习之Yolo Tiny实现目标检测
- openssl 1.1.1编译语句
- vs编译boost库脚本
- Application of remote sensing, GIS and GPS technology in hydrology, meteorology, disaster, ecology, environment and health
- Through the bit operations to convert the characters are case sensitive
- TCP为什么要三次握手,握手过程中丢包会怎么样?
- 逻辑右移和算术右移区别
猜你喜欢

Pytorch(三):可视化工具(Tensorboard、Visdom)

边境的悍匪—机器学习实战:第五章 支持向量机

【速成MSP430f149】电赛期间学习MSP430f149笔记

为什么会出现梯度爆炸和梯度消失现象?怎么缓解这种现象的发生?

边境的悍匪—机器学习实战:第十六章使用RNN和注意力机制进行自然语言处理

QT串口动态实时显示大量数据波形曲线(五)========“最终完美解决版”

新导则下 防洪评价报告编制方法及洪水建模(HEC-RAS)

CLUE模型构建方法、模型验证及土地利用变化情景预测

昆仑通态屏幕制作(连载2)---基础篇(设定与显示,串口发送)

Pytorch(二):数据读取机制(DataLoader、DataSet)与图像预处理模块(transforms)
随机推荐
信号链模拟芯片是什么?
2021-09-16 集成学习上--task1机器学习数学基础
基于QT的CAN通讯数据实时波形显示(连载八)====“子函数或新类调用ui控件”
重磅揭晓!第十四届深创赛福田预选赛区暨华秋第八届硬创大赛华南分赛区晋
C语言学习经验
Machine Learning, Deep Learning Based on MATLAB 2021b
边境的悍匪—机器学习实战:第十一章 训练深度神经网络
Generalized Focal Loss paper reading notes
1.03 original Acegi security mechanism
CPU缓存一致性问题
昆仑通态屏幕制作(连载1)---接触篇
昆仑通态屏幕制作(连载4)---基础篇(图形设定与显示,按钮灯)
Map making of environmental impact assessment based on remote sensing interpretation and GIS technology (the latest guidelines)
clinit方法
CNN经典模型发展进程
influxDB运维记录
边境的悍匪—机器学习实战:第十二章 使用TensorFlow自定义模型和训练
[Punctuality Atom] Simple application of sys.c, sys.h bit-band operations
【江科大自化协stm32F103c8t6】笔记之【入门32单片机及GPIO初始化参数配置】
vs编译boost库脚本