——來自迪文開發(fā)者論壇
本期為大家推送的論壇獲獎(jiǎng)開源案例可用于建筑行業(yè)檢測水泥成分含量——基于T5L智能屏的水泥多量測定儀。工程師基于T5L智能屏來控制電子重量檢測模塊、測溫模塊、加熱模塊、水分傳感器、攪拌模塊,實(shí)現(xiàn)了固溶和液溶水泥成分含量檢測功能,并支持速率實(shí)時(shí)顯示、溫度設(shè)置、歷史記錄、階段參數(shù)設(shè)定等功能。
方案架構(gòu)
UI開發(fā)示例 51軟件設(shè)計(jì)
工程師采用T5L串口2與控制板通訊的初始化命令程序如下:
void app_init()
{
is_testing = 0;
test_run_time = 0;
is_sec = 0;
period1 = 0;
is_period1 = 0;
uart2_init(115200);
send_bytes("AT+INIT=0\r\n",sizeof("AT+INIT=0\r\n")-1);
sys_delay_ms(2500);
sys_pic(1);
send_bytes("AT+START\r\n",sizeof("AT+START\r\n")-1);
}
T5L智能屏與控制板交互實(shí)現(xiàn)水泥成分檢測功能的主要程序如下:void btn_click_handler()
{
#define BTN_VAL_ADDR 0x1000
u16 btn_val; if(is_testing&&is_sec)
{
is_sec = 0;
test_run_time++; btn_val=sprintf(commbuff,"%02u:%02u",(u16)(test_run_time/60),(u16)(test_run_time%60)); commbuff[btn_val+1] = 0;
sys_write_vp(TEST_TIME_VP,commbuff,5); if(uart2rxsta&UART2_PACKET_OK)
{
if(uart2buf[0]==0x01&&uart2buf[1]==0x02)
{
init_weight = *(float*)(uart2buf+2);
init_weight *= (*(float*)flashdat);
sys_write_vp(0x1178, (u8*)&init_weight, 2); }else if(uart2buf[0]==0x02&&uart2buf[1]==0x05)
{
init_ml = *(float*)(uart2buf+2);
init_ml /= (*(float*)flashdat+20);
sys_write_vp(0x1180, (u8*)&init_ml, 2); }else if(uart2buf[0]==0x03&&uart2buf[1]==0x07)
{
speed_val = *(float*)(uart2buf+2);
disp_val += (speed_val*2.45f);
sys_write_vp(0x1180, (u8*)&disp_val, 2);
}else if(uart2buf[0]==0x04)
{ total_num = uart2buf[1]*256+uart2buf[2];
}else if(uart2buf[0]==0x05)
{
is_en_tmp = uart2buf[2];
} uart2rxsta = 0; } } if(is_period1) { is_period1 = 0; t_sample(); if(is_testing&&is_en_tmp) sys_write_vp(0x1170,(u8*)&tmp,2);
}
if(is_btn_scan==0)
return;
is_btn_scan = 0;
sys_read_vp(BTN_VAL_ADDR,(u8*)&btn_val,1); if(btn_val==0) return;
if(btn_val<=0x10) ???????start_win_btn_click_handler(btn_val); ???btn_val = 0;
sys_write_vp(BTN_VAL_ADDR,(u8*)&btn_val,1);
}更多內(nèi)容請參考源碼。
-
傳感器
+關(guān)注
關(guān)注
2564文章
52713瀏覽量
764648 -
工程師
+關(guān)注
關(guān)注
59文章
1589瀏覽量
69283 -
檢測
+關(guān)注
關(guān)注
5文章
4620瀏覽量
92597 -
測定儀
+關(guān)注
關(guān)注
0文章
846瀏覽量
14660
發(fā)布評論請先 登錄
多形態(tài)材料一機(jī)搞定!DZDR-AS導(dǎo)熱系數(shù)測定儀已上市

準(zhǔn)確測熱,高效智能—DZDR-AS 導(dǎo)熱系數(shù)測定儀新品上市

導(dǎo)熱系數(shù)測定儀用途是什么?

?EC測定儀的特點(diǎn)是什么
蘇州大學(xué)采購南京大展的DZDR-S導(dǎo)熱系數(shù)測定儀

炭黑含量測定儀在色母中的應(yīng)用

檢測飼料發(fā)熱量儀器|飼料總能量測定儀
濁度測定儀帶來了什么重要作用
吉林大學(xué)采購南京大展的導(dǎo)熱系數(shù)測定儀

電導(dǎo)率測定儀的基礎(chǔ)應(yīng)用與探索
電導(dǎo)率測定儀的應(yīng)用優(yōu)勢
濰坊科技學(xué)院采購了南京大展的導(dǎo)熱系數(shù)測定儀


導(dǎo)熱系數(shù)測定儀 #導(dǎo)熱系數(shù) #導(dǎo)熱系數(shù)測定儀 #導(dǎo)熱系數(shù)測定儀
微量水分測定儀的操作方法——每日了解電力知識

【科研新助力】南方科技大學(xué)采購南京大展的導(dǎo)熱系數(shù)測定儀

評論