当前位置: 首页 > news >正文

系统安装两个wordpress公司网站优化方案

系统安装两个wordpress,公司网站优化方案,网站建设框架怎么做,平台网站如何做推广LUA脚本的好处是用户可以根据自己注册的一批API(当前TOOL已经提供了几百个函数供大家使用),实现各种小程序,不再限制Flash里面已经下载的程序,就跟手机安装APP差不多,所以在H7-TOOL里面被广泛使用&#xff…

LUA脚本的好处是用户可以根据自己注册的一批API(当前TOOL已经提供了几百个函数供大家使用),实现各种小程序,不再限制Flash里面已经下载的程序,就跟手机安装APP差不多,所以在H7-TOOL里面被广泛使用,支持在线调试运行,支持离线运行。TOOL的LUA教程争取做到大家可以无痛调用各种功能函数,不需要学习成本。


简介

电压,电流,NTC热敏电阻以及4-20mA输入,可以在上位机端设置,也可以显示屏端设置

详细使用说明可以看在线或者离线操作说明手册:H7-TOOL操作说明和客户常见问题汇总贴,含PDF离线版(2024-08-16) - H7-TOOL开发工具 - 硬汉嵌入式论坛 - Powered by Discuz!

建议优先熟悉下,特别是这几个功能对应使用的引脚。


LUA函数说明:

1、启动模拟量采集。

启动模拟量采集仅需用到两个大类配置,一个负载电流测量,还有一个低速多通道。

所以启动模拟信号采集封装了两种配置

(1)负载电流测量,配置代码固定如下:

function start_dso(void)write_reg16(0x01FF, 1) -- 测量模式 0:示波器 1:负载电流 2:多路低速扫描write_reg16(0x0200, 1) -- CH1耦合,0:AC 1:DCwrite_reg16(0x0201, 1) -- CH2耦合,0:AC 1:DC--量程取值 0:±13.8V 1:±6.4V 2:±3.2V 3:±1.6V 4:±800mV 5:±400mV 6:±200mV 7:±100mVwrite_reg16(0x0202, 0) -- CH1量程write_reg16(0x0203, 0) -- CH2量程write_reg16(0x0204, 0) -- CH1通道直流偏值,未用write_reg16(0x0205, 0) -- CH2通道直流偏值,未用write_reg16(0x0206, 12) --采样频率 0:100 1:200 2:500 3:1K 4:2K 5:5K 6:10K 7:20K--8:50K 9:100K 10:200K 11:500K 12:1M 13:2M 14:5Mwrite_reg16(0x0207, 0) --采样深度 0:1K 1:2K 3:4K 4:8K 5:16K 6:32Kwrite_reg16(0x0208, 32768) --触发电平ADC 0-65535write_reg16(0x0209, 50) --触发位置百分比 0-100write_reg16(0x020A, 0) --触发模式 0:自动 1:普通 2:单次write_reg16(0x020B, 0) --触发通道 0:CH1 1:CH2write_reg16(0x020C, 0) --触发边沿 0:下降沿 1:上升沿 write_reg16(0x020D, 0x03) --通道使能控制 bit0 = CH1  bit1 = CH2write_reg16(0x020E, 1) --采集控制 0:停止 1:启动end

(2)低速多通道测量,配置代码固定如下:

--启动模拟量电路
function start_dso(void)write_reg16(0x01FF, 2) -- 测量模式 0:示波器 1:负载电流 2:多路低速扫描write_reg16(0x0200, 1) -- CH1耦合,0:AC 1:DCwrite_reg16(0x0201, 1) -- CH2耦合,0:AC 1:DC--量程取值 0:±13.8V 1:±6.4V 2:±3.2V 3:±1.6V 4:±800mV 5:±400mV 6:±200mV 7:±100mVwrite_reg16(0x0202, 0) -- CH1量程write_reg16(0x0203, 0) -- CH2量程write_reg16(0x0204, 0) -- CH1通道直流偏值,未用write_reg16(0x0205, 0) -- CH2通道直流偏值,未用write_reg16(0x0206, 12) --采样频率 0:100 1:200 2:500 3:1K 4:2K 5:5K 6:10K 7:20K--8:50K 9:100K 10:200K 11:500K 12:1M 13:2M 14:5Mwrite_reg16(0x0207, 0) --采样深度 0:1K 1:2K 3:4K 4:8K 5:16K 6:32Kwrite_reg16(0x0208, 32768) --触发电平ADC 0-65535write_reg16(0x0209, 50) --触发位置百分比 0-100write_reg16(0x020A, 0) --触发模式 0:自动 1:普通 2:单次write_reg16(0x020B, 0) --触发通道 0:CH1 1:CH2write_reg16(0x020C, 0) --触发边沿 0:下降沿 1:上升沿 write_reg16(0x020D, 0x03) --通道使能控制 bit0 = CH1  bit1 = CH2write_reg16(0x020E, 1) --采集控制 0:停止 1:启动end

2、测量函数,读取模拟值

测量函数比较简单,周期调用即可,建议100ms以上读取一次,因为所有数据100ms更新一轮

read_analog(9) --9 - 读取4-20mA


(1)电压读取

read_analog(0) -- 0 - CH1电压
read_analog(1) -- 1 - CH2电压

举例:每500ms读取一次CH1和CH2通道电压

实现代码如下:

--启动模拟量电路
function start_dso(void)write_reg16(0x01FF, 2) -- 测量模式 0:示波器 1:负载电流 2:多路低速扫描write_reg16(0x0200, 1) -- CH1耦合,0:AC 1:DCwrite_reg16(0x0201, 1) -- CH2耦合,0:AC 1:DC--量程取值 0:±13.8V 1:±6.4V 2:±3.2V 3:±1.6V 4:±800mV 5:±400mV 6:±200mV 7:±100mVwrite_reg16(0x0202, 0) -- CH1量程write_reg16(0x0203, 0) -- CH2量程write_reg16(0x0204, 0) -- CH1通道直流偏值,未用write_reg16(0x0205, 0) -- CH2通道直流偏值,未用write_reg16(0x0206, 12) --采样频率 0:100 1:200 2:500 3:1K 4:2K 5:5K 6:10K 7:20K--8:50K 9:100K 10:200K 11:500K 12:1M 13:2M 14:5Mwrite_reg16(0x0207, 0) --采样深度 0:1K 1:2K 3:4K 4:8K 5:16K 6:32Kwrite_reg16(0x0208, 32768) --触发电平ADC 0-65535write_reg16(0x0209, 50) --触发位置百分比 0-100write_reg16(0x020A, 0) --触发模式 0:自动 1:普通 2:单次write_reg16(0x020B, 0) --触发通道 0:CH1 1:CH2write_reg16(0x020C, 0) --触发边沿 0:下降沿 1:上升沿 write_reg16(0x020D, 0x03) --通道使能控制 bit0 = CH1  bit1 = CH2write_reg16(0x020E, 1) --采集控制 0:停止 1:启动endprint("启动电压测量")
start_dso() -- 调用一次初始化for i = 1, 10, 1 do -- 读取10次
data1 = read_analog(0) -- 0 - CH1电压
data2 = read_analog(1) -- 1 - CH2电压
print(string.format("CH1电压:%f,CH2电压:%f", data1,data2))
delayms(500)
end

实际效果:


(2)高侧负载测量

read_analog(2) --2 - 高侧负载电压
read_analog(3) --3 - 高端负载电流

举例:每500ms读取一次

实现代码如下

--启动模拟量电路
function start_dso(void)write_reg16(0x01FF, 1) -- 测量模式 0:示波器 1:负载电流 2:多路低速扫描write_reg16(0x0200, 1) -- CH1耦合,0:AC 1:DCwrite_reg16(0x0201, 1) -- CH2耦合,0:AC 1:DC--量程取值 0:±13.8V 1:±6.4V 2:±3.2V 3:±1.6V 4:±800mV 5:±400mV 6:±200mV 7:±100mVwrite_reg16(0x0202, 0) -- CH1量程write_reg16(0x0203, 0) -- CH2量程write_reg16(0x0204, 0) -- CH1通道直流偏值,未用write_reg16(0x0205, 0) -- CH2通道直流偏值,未用write_reg16(0x0206, 12) --采样频率 0:100 1:200 2:500 3:1K 4:2K 5:5K 6:10K 7:20K--8:50K 9:100K 10:200K 11:500K 12:1M 13:2M 14:5Mwrite_reg16(0x0207, 0) --采样深度 0:1K 1:2K 3:4K 4:8K 5:16K 6:32Kwrite_reg16(0x0208, 32768) --触发电平ADC 0-65535write_reg16(0x0209, 50) --触发位置百分比 0-100write_reg16(0x020A, 0) --触发模式 0:自动 1:普通 2:单次write_reg16(0x020B, 0) --触发通道 0:CH1 1:CH2write_reg16(0x020C, 0) --触发边沿 0:下降沿 1:上升沿 write_reg16(0x020D, 0x03) --通道使能控制 bit0 = CH1  bit1 = CH2write_reg16(0x020E, 1) --采集控制 0:停止 1:启动endprint("启动高侧测量")
start_dso() -- 调用一次初始化for i = 1, 10, 1 do -- 读取10次
data1 = read_analog(2) --2 - 高侧负载电压
data2 = read_analog(3) --3 - 高端负载电流
print(string.format("负载电压:%f,负载电流:%f", data1,data2))
delayms(500)
end

实际效果:


(3)TVCC测量

read_analog(4) --4 - TVCC电压
read_analog(5) --5 - TVCC电流

举例:每500ms读取一次

实现代码如下:

--启动模拟量电路
function start_dso(void)write_reg16(0x01FF, 2) -- 测量模式 0:示波器 1:负载电流 2:多路低速扫描write_reg16(0x0200, 1) -- CH1耦合,0:AC 1:DCwrite_reg16(0x0201, 1) -- CH2耦合,0:AC 1:DC--量程取值 0:±13.8V 1:±6.4V 2:±3.2V 3:±1.6V 4:±800mV 5:±400mV 6:±200mV 7:±100mVwrite_reg16(0x0202, 0) -- CH1量程write_reg16(0x0203, 0) -- CH2量程write_reg16(0x0204, 0) -- CH1通道直流偏值,未用write_reg16(0x0205, 0) -- CH2通道直流偏值,未用write_reg16(0x0206, 12) --采样频率 0:100 1:200 2:500 3:1K 4:2K 5:5K 6:10K 7:20K--8:50K 9:100K 10:200K 11:500K 12:1M 13:2M 14:5Mwrite_reg16(0x0207, 0) --采样深度 0:1K 1:2K 3:4K 4:8K 5:16K 6:32Kwrite_reg16(0x0208, 32768) --触发电平ADC 0-65535write_reg16(0x0209, 50) --触发位置百分比 0-100write_reg16(0x020A, 0) --触发模式 0:自动 1:普通 2:单次write_reg16(0x020B, 0) --触发通道 0:CH1 1:CH2write_reg16(0x020C, 0) --触发边沿 0:下降沿 1:上升沿 write_reg16(0x020D, 0x03) --通道使能控制 bit0 = CH1  bit1 = CH2write_reg16(0x020E, 1) --采集控制 0:停止 1:启动endprint("启动TVCC测量")
start_dso() -- 调用一次初始化for i = 1, 10, 1 do -- 读取10次
data1 = read_analog(4) --4 - TVCC电压
data2 = read_analog(5) --5 - TVCC电流
print(string.format("TVCC电压:%f,TVCC电流:%f", data1,data2))
delayms(500)
end

(4)NTC热敏电阻测量

read_analog(6) --6 - NTC热敏电阻阻值

举例:每500ms读取一次

--启动模拟量电路
function start_dso(void)write_reg16(0x01FF, 2) -- 测量模式 0:示波器 1:负载电流 2:多路低速扫描write_reg16(0x0200, 1) -- CH1耦合,0:AC 1:DCwrite_reg16(0x0201, 1) -- CH2耦合,0:AC 1:DC--量程取值 0:±13.8V 1:±6.4V 2:±3.2V 3:±1.6V 4:±800mV 5:±400mV 6:±200mV 7:±100mVwrite_reg16(0x0202, 0) -- CH1量程write_reg16(0x0203, 0) -- CH2量程write_reg16(0x0204, 0) -- CH1通道直流偏值,未用write_reg16(0x0205, 0) -- CH2通道直流偏值,未用write_reg16(0x0206, 12) --采样频率 0:100 1:200 2:500 3:1K 4:2K 5:5K 6:10K 7:20K--8:50K 9:100K 10:200K 11:500K 12:1M 13:2M 14:5Mwrite_reg16(0x0207, 0) --采样深度 0:1K 1:2K 3:4K 4:8K 5:16K 6:32Kwrite_reg16(0x0208, 32768) --触发电平ADC 0-65535write_reg16(0x0209, 50) --触发位置百分比 0-100write_reg16(0x020A, 0) --触发模式 0:自动 1:普通 2:单次write_reg16(0x020B, 0) --触发通道 0:CH1 1:CH2write_reg16(0x020C, 0) --触发边沿 0:下降沿 1:上升沿 write_reg16(0x020D, 0x03) --通道使能控制 bit0 = CH1  bit1 = CH2write_reg16(0x020E, 1) --采集控制 0:停止 1:启动endprint("启动NTC热敏电阻测量")
start_dso() -- 调用一次初始化for i = 1, 10, 1 do -- 读取10次
data1 = read_analog(6) --6 - NTC热敏电阻阻值
print(string.format("NTC热敏电阻:%f", data1))
delayms(500)
end

(5)供电电压测量

read_adc(7) --7 - 外部供电电压
read_analog(8) --8 - USB供电电压

举例:每500ms读取一次

--启动模拟量电路
function start_dso(void)write_reg16(0x01FF, 2) -- 测量模式 0:示波器 1:负载电流 2:多路低速扫描write_reg16(0x0200, 1) -- CH1耦合,0:AC 1:DCwrite_reg16(0x0201, 1) -- CH2耦合,0:AC 1:DC--量程取值 0:±13.8V 1:±6.4V 2:±3.2V 3:±1.6V 4:±800mV 5:±400mV 6:±200mV 7:±100mVwrite_reg16(0x0202, 0) -- CH1量程write_reg16(0x0203, 0) -- CH2量程write_reg16(0x0204, 0) -- CH1通道直流偏值,未用write_reg16(0x0205, 0) -- CH2通道直流偏值,未用write_reg16(0x0206, 12) --采样频率 0:100 1:200 2:500 3:1K 4:2K 5:5K 6:10K 7:20K--8:50K 9:100K 10:200K 11:500K 12:1M 13:2M 14:5Mwrite_reg16(0x0207, 0) --采样深度 0:1K 1:2K 3:4K 4:8K 5:16K 6:32Kwrite_reg16(0x0208, 32768) --触发电平ADC 0-65535write_reg16(0x0209, 50) --触发位置百分比 0-100write_reg16(0x020A, 0) --触发模式 0:自动 1:普通 2:单次write_reg16(0x020B, 0) --触发通道 0:CH1 1:CH2write_reg16(0x020C, 0) --触发边沿 0:下降沿 1:上升沿 write_reg16(0x020D, 0x03) --通道使能控制 bit0 = CH1  bit1 = CH2write_reg16(0x020E, 1) --采集控制 0:停止 1:启动endprint("启动供电电压测量")
start_dso() -- 调用一次初始化for i = 1, 10, 1 do -- 读取10次
data1 = read_adc(7) --7 - 外部供电电压
data2 = read_analog(8) --8 - USB供电电压
print(string.format("外部供电电压:%f, USB供电电压:%f", data1, data2))
delayms(500)
end

(6)4-20mA测量
read_analog(9) -- 4-20mA测量

举例:每500ms读取一次

--启动模拟量电路
function start_dso(void)write_reg16(0x01FF, 2) -- 测量模式 0:示波器 1:负载电流 2:多路低速扫描write_reg16(0x0200, 1) -- CH1耦合,0:AC 1:DCwrite_reg16(0x0201, 1) -- CH2耦合,0:AC 1:DC--量程取值 0:±13.8V 1:±6.4V 2:±3.2V 3:±1.6V 4:±800mV 5:±400mV 6:±200mV 7:±100mVwrite_reg16(0x0202, 0) -- CH1量程write_reg16(0x0203, 0) -- CH2量程write_reg16(0x0204, 0) -- CH1通道直流偏值,未用write_reg16(0x0205, 0) -- CH2通道直流偏值,未用write_reg16(0x0206, 12) --采样频率 0:100 1:200 2:500 3:1K 4:2K 5:5K 6:10K 7:20K--8:50K 9:100K 10:200K 11:500K 12:1M 13:2M 14:5Mwrite_reg16(0x0207, 0) --采样深度 0:1K 1:2K 3:4K 4:8K 5:16K 6:32Kwrite_reg16(0x0208, 32768) --触发电平ADC 0-65535write_reg16(0x0209, 50) --触发位置百分比 0-100write_reg16(0x020A, 0) --触发模式 0:自动 1:普通 2:单次write_reg16(0x020B, 0) --触发通道 0:CH1 1:CH2write_reg16(0x020C, 0) --触发边沿 0:下降沿 1:上升沿 write_reg16(0x020D, 0x03) --通道使能控制 bit0 = CH1  bit1 = CH2write_reg16(0x020E, 1) --采集控制 0:停止 1:启动endprint("启动4-20mA测量")
start_dso() -- 调用一次初始化for i = 1, 10, 1 do -- 读取10次
data1 = read_analog(9) -- 4-20mA测量
print(string.format("4-20mA读取:%f", data1, data2))
delayms(500)
end

测量的10mA,精度还是非常不错的


3、测量函数,直接读取ADC值

这个用法和第2步读取模拟值是完全一样的。只是这里获取的是ADC支持。

read_adc(0) --0 - CH1电压
read_adc(1) --1 - CH2电压
read_adc(2) --2 - 高侧负载电压
read_adc(3) --3 - 高端负载电流
read_adc(4) --4 - TVCC电压
read_adc(5) --5 - TVCC电流
read_adc(6) --6 - NTC热敏电阻阻值
read_adc(7) --7 - 外部供电电压
read_adc(8) --8 - USB供电电压
read_adc(9) -- 9 - 4-20mA输入
 

4、使用上位机同时展示这些数值


文章转载自:
http://dinncopif.zfyr.cn
http://dinncolanoline.zfyr.cn
http://dinncoscarce.zfyr.cn
http://dinncohoise.zfyr.cn
http://dinncofrore.zfyr.cn
http://dinncooxyneurine.zfyr.cn
http://dinncoradiomicrometer.zfyr.cn
http://dinncobinocular.zfyr.cn
http://dinncoarbitratorship.zfyr.cn
http://dinncomeemies.zfyr.cn
http://dinncotampon.zfyr.cn
http://dinncoamalgamate.zfyr.cn
http://dinncokerry.zfyr.cn
http://dinncomaelstrom.zfyr.cn
http://dinncowryly.zfyr.cn
http://dinncoedmonton.zfyr.cn
http://dinncorink.zfyr.cn
http://dinncoreporting.zfyr.cn
http://dinncobottlebrush.zfyr.cn
http://dinncohallucinatory.zfyr.cn
http://dinncopurfle.zfyr.cn
http://dinncoaristocratism.zfyr.cn
http://dinncointervention.zfyr.cn
http://dinnconameable.zfyr.cn
http://dinncopressburg.zfyr.cn
http://dinncoamity.zfyr.cn
http://dinnconoetic.zfyr.cn
http://dinncomca.zfyr.cn
http://dinncomarcia.zfyr.cn
http://dinncoassyria.zfyr.cn
http://dinncodregs.zfyr.cn
http://dinncobergen.zfyr.cn
http://dinncomuleteer.zfyr.cn
http://dinncoverism.zfyr.cn
http://dinncohaemoglobin.zfyr.cn
http://dinncolana.zfyr.cn
http://dinncomaintainor.zfyr.cn
http://dinncosteepled.zfyr.cn
http://dinncocacanny.zfyr.cn
http://dinncomicrocephalous.zfyr.cn
http://dinncochronaxie.zfyr.cn
http://dinncobronco.zfyr.cn
http://dinncoforeland.zfyr.cn
http://dinnconooning.zfyr.cn
http://dinncopentothal.zfyr.cn
http://dinncocornbrash.zfyr.cn
http://dinncotasmanian.zfyr.cn
http://dinncoleaching.zfyr.cn
http://dinncotenure.zfyr.cn
http://dinncocorchorus.zfyr.cn
http://dinncoard.zfyr.cn
http://dinncoincurrence.zfyr.cn
http://dinncosinnet.zfyr.cn
http://dinncoshoresman.zfyr.cn
http://dinncojovial.zfyr.cn
http://dinncoglister.zfyr.cn
http://dinncouncounted.zfyr.cn
http://dinncotechnofreak.zfyr.cn
http://dinncokincardine.zfyr.cn
http://dinncopalaeomagnetism.zfyr.cn
http://dinncosorgo.zfyr.cn
http://dinncotanganyika.zfyr.cn
http://dinncocoenesthesis.zfyr.cn
http://dinncodewitt.zfyr.cn
http://dinncoedbiz.zfyr.cn
http://dinncoafricanization.zfyr.cn
http://dinncoauthoritative.zfyr.cn
http://dinncohummock.zfyr.cn
http://dinncodivertissement.zfyr.cn
http://dinncosystematic.zfyr.cn
http://dinncocarlish.zfyr.cn
http://dinncovilayet.zfyr.cn
http://dinncotenpounder.zfyr.cn
http://dinncopremeiotic.zfyr.cn
http://dinncojobber.zfyr.cn
http://dinncoorville.zfyr.cn
http://dinncoinconsecutive.zfyr.cn
http://dinncocrawfish.zfyr.cn
http://dinncoconjugality.zfyr.cn
http://dinncochymosin.zfyr.cn
http://dinncopneumoangiography.zfyr.cn
http://dinncomelting.zfyr.cn
http://dinncoostiole.zfyr.cn
http://dinncocurry.zfyr.cn
http://dinncocoagulant.zfyr.cn
http://dinncoexordial.zfyr.cn
http://dinncomarseillaise.zfyr.cn
http://dinncoleast.zfyr.cn
http://dinncomilan.zfyr.cn
http://dinncodispatch.zfyr.cn
http://dinncoconcealment.zfyr.cn
http://dinncoprotoxylem.zfyr.cn
http://dinncobowsprit.zfyr.cn
http://dinncononprofessional.zfyr.cn
http://dinncoferrate.zfyr.cn
http://dinncotropicana.zfyr.cn
http://dinncoossifrage.zfyr.cn
http://dinncoresident.zfyr.cn
http://dinncodescend.zfyr.cn
http://dinncogynephobia.zfyr.cn
http://www.dinnco.com/news/137450.html

相关文章:

  • 中国疫情最新消息发布排名优化服务
  • 佛山市手机网站建设百度查关键词显示排名
  • 商业门户网站怎么运营网站创建流程
  • 网站做软件有哪些内容全网营销推广软件
  • 杭州互助盘网站开发软文类型
  • seo网站建设及扩词搜索引擎seo是什么意思
  • 嘉定营销型 网站制作网站搜索优化找哪家
  • 霍州做网站网站优化策划书
  • 网站开发顺序关键词搜索
  • 网站建设的服务怎么样网络营销研究背景及意义
  • 防伪查询网站产品如何做市场推广
  • 网站建设合同图片数据分析师培训机构
  • 建网站公建网站公司域名历史查询工具
  • 彩票网站怎么做系统百度搜索排名怎么靠前
  • 政府网站开发的建议最近一个月的热点事件
  • 官方网站建设意义品牌推广活动有哪些
  • 大同网站设计seo整站优化外包公司
  • 公共资源交易中心上班怎么样台州优化排名推广
  • 如何做向日葵官方网站巨量引擎广告投放平台代理
  • 大型网站改版抖音seo是什么意思
  • 哪个网站可以做思维导图百度搜索词排名
  • 灰色项目网站代做seo教程最新
  • 哪些网站可以做电脑画画赚钱云南最新消息
  • 网站中的滚动照片怎么做百度地图网页版
  • 什么网站可以在图片上做超链接seo刷排名公司
  • 天津做网站选津坤科技东营seo
  • 表白网站建设百度手机助手app安卓版官方下载
  • 网站空间服务器供应商海淀区seo引擎优化多少钱
  • 可以制作网站的软件绍兴seo排名
  • python 网站架构前端seo优化