虎符电竞官网

关注官方微信

en

EN.

chanpinzhongxin

产品中心

《设备接入OneNET方法》—卓岚物联

发布时间:2020-04-27 作者:上海卓岚 浏览量:8356
1.设备接入OneNET

onenetshiyouzhongguoyidongdazaodepaaswulianwangkaifangpingtai。pingtainenggoubangzhukaifazheqingsongshixianshebeijieruyushebeilianjie,kuaisuwanchengchanpinkaifabushu。danshiduiyuchuantongdianqigongchengshidechuanganqi、chuankoushebei、plcdengsihulianjiedaoonenetshiyigefuzadeguocheng,benwenjiujieshaoruhejiangchuantongdeshebeilianjiedaoonenet。

zheilizhuyaojieshao2leishebeijieruonenet,diyileishichuankoushebei,birurs485/232shebei,zheixieshebeiyibancaiyongmodbus rtuhuozhe645xieyi。cishishiyongchuankouzhuanjsonwangguankeyishixianjieruonenet。

dierleishijiangshuziliangshuru、moniliangshuru,zheixieliangcaijihouxuyaoshangchuanonenet,huozhetongguoonenetxiafakongzhijidianqishuchu。cishi,keyishiyongzlan6844,di、ai、dozhuanjsonwangguanlaishixian,shiyongfangfaleisidiyilei。zheilizhuyaoyidiyileiweilijieshaocaiyongmqtt+jsongeshiduijieonenetpingtaishangchuanmodbus rtushebeishuju。

2.操作和实战
2.1.注册OneNET

qingdenglu,zhuceonenetzhanghao。zhuceguochengbijiaojiandanzheilijiubuzaileishu。dengluhoujinrukaifazhezhongxin,dianjizuoshangjiaoquanbuchanpin,quanbuchanpinduoxieyijierumqtt(jiuban)。ranhoudianji“tianjiachanpin”。

jiashezheilitianjiayige“wodeceshi”zheiyangdechanpin,qitaxuanzekeyianzhaoshijiqingkuangjinxing。

tishitianjiashebei(houmianyekeyitongguodianjichanpinshebeiliebiaotianjiashebeilaizengjiashebei)。zheilitianjiayige“wodeshebei”zheiyangdeshebei。zheilide“jianquanxinxi”shihoumianshebeilianjieshiyongdaode,jianquanxinxishizijishurudesuiyidemima。

zheiyangonenetduandecaozuojiuwanchengle。

2.2.设备配置

假设我们需要将一个站地址为1、功能码为03、寄存器为01的仪表数据上传到OneNET,这里需要一个MQTT+JSON转Modbus功能的网关(比如ZLAN5144J)。拿到网关之后,将这个仪表连接到网关的RS485接口,连接上网线,使用ZLVircom工具进行网关配置。进入ZLVircom的设备管理→搜索设备→选中设备→编辑设备→固件与配置:

dianji“jsonpeizhi”,dakaijsonzhuanmodbus rtushezhiduihuakuang。

zaijieruyunpingtaineilixuanze“onenet”。ranhoudianji“jsonshangfa”jinxingmodbusjicunqipeizhi,fanhuihouhaixuyaodianji“baocunjsonshezhi”,ranhoudianjifanhui。zheilixianjieshaoyixia“jsonshangfa”peizhi:

zheilijiangzheigeshujudiandemingchengshezhiweimydata(houmianonenetpingtaihuixianshizheigemingcheng)。zhandizhiwei1、gongnengmawei03、jicunqidizhiwei1。dianji“baocunquanbubingtuichu”,zheiyanghuidaoshangyigeduihuakuanghoudianji“baocunjsonshezhi”hou,dianji“fanhui”。cishixitongtishishifoujinxingmqttpeizhi,youyuwomencaiyongmqttxieyiheonenetpingtaiduijie,suoyizheilixuyaodianji“shi”。

zaimqttpeizhiduihuazhongzhixuyaotianxie3gecanshujike,qizhongdeyonghumingjichanpingaishuzhongkechadechanpinid,mimajishebeixinxizhongkechadejianquanxinxi,kehuduanidjishebeiliebiaozhongkechadeshebeiid。peizhihaohou,dianji“baocunmqttshezhi”,fanhuidaodiyige“gujianyupeizhi”duihuakuang,dianji“xiazai”anniu,xiazaipeizhidaowangguanneibu,wangguansuihouzhongqi。cishikandaoguanwangdetcplinkdenglansedianliang,bingqiezaionenetshangkandaozheigezaixianle。

2.3.数据查看

dangshebeilianjieshangonenetzhihou,shebeijiuanzhaozhiqianpeizhide1000ms(1miao)shangfayicimydatadedangqianzhi。zaishebeiliebiaozhong,dianji“shujuliu”keyikandaoshuju。

keyikandaoxianzaizaishujuliuzhongyijingyoulewomentianjiadejsonguanjianciduiyingdeshuju“mydata”,xianzaishujugeshuyijingshangfa286ge。

dianjimydatazheigeshuju,haikeyikandaoshujudelishiquxian。

2.4.其它

lingwaishiyongonenetdemqttjierufangshihaikeyishixianshebeiheshebeizhijiandetongxun,onenetpingtaixiafashujujimodbus rtukongzhiqideng。youyupianfusuoxianzheiliwufayiyixiangshu。zongzhishiyongonenetpingtaipeihemqtt+jsonzhuanmodbus rtudewangguan,keyikuaisushixianchuanganqiheonenetpingtaideduijie,shiwulianwangshebeilianjiexianzailiuxingyunpingtaidekuaisufangfa。