好象很多组态软件都分单机版和网络版,而且有的网络版价格很贵,有同时在线的用户限制,还分局域网版和Web版,搞的那么复杂,晕死.最近琢磨了一下怎么用单机版就实现网络功能,发现其实很简单,而且网络功能强大的不能再强大了,不仅可以用电脑通过Internet访问,用普通手机也可以访问数据!而且不像短信那样落后,这些数据都是实时的,想什么时候看就什么时候看,想看什么就看什么!而且没有用户限制,让我们充分享受免费大餐!
下面详细道来,欢迎大家一起探讨....
第一步,首先确认你所用的组态软件必须得具备一个条件,就是数据能往Oracle或者access等数据库里存,实在不行excel也可以。下面就以组态王6.5为例做详细介绍,数据库咱们就用Access吧,随便买张Office里就有,方便,好用,我一直用它。
在组态王里设置好表格模板和记录体,具体方法自己翻翻组态王的使用手册。


第二步,在access数据里建表,注意字段顺序和组态王里一一对应。

第三步,别忘了在组态王里建立往数据库里存储变量数据的事件命令语言。
SQLConnect( DeviceID, "dsn=mine;uid=;pwd=");
SQLUpdateCurrent( DeviceID, "bind1" );
SQLUpdate( DeviceID, "tabel1","bind1","a1>0" );
SQLUpdate( DeviceID, "tabel1","bind1","a2>0" );
SQLUpdate( DeviceID, "tabel1","bind1","a3>0" );
SQLUpdate( DeviceID, "tabel1","bind1","a4>0" );
SQLUpdate( DeviceID, "tabel1","bind1","a5>0" );
SQLUpdate( DeviceID, "tabel1","bind1","a6>0" );
SQLUpdate( DeviceID, "tabel1","bind1","a7>0" );
SQLUpdate( DeviceID, "tabel1","bind1","a8>0" );
SQLUpdate( DeviceID, "tabel1","bind1","b1>0" );
SQLUpdate( DeviceID, "tabel1","bind1","b2>0" );
SQLUpdate( DeviceID, "tabel1","bind1","b3>0" );
SQLUpdate( DeviceID, "tabel1","bind1","b4>0" );
SQLUpdate( DeviceID, "tabel1","bind1","b5>0" );
SQLUpdate( DeviceID, "tabel1","bind1","b6>0" );
SQLUpdate( DeviceID, "tabel1","bind1","b7>0" );
SQLUpdate( DeviceID, "tabel1","bind1","b8>0" );
SQLUpdate( DeviceID, "tabel1","bind1","c1>0" );
SQLUpdate( DeviceID, "tabel1","bind1","c2>0" );
SQLUpdate( DeviceID, "tabel1","bind1","c3>0" );
SQLUpdate( DeviceID, "tabel1","bind1","c4>0" );
SQLUpdate( DeviceID, "tabel1","bind1","c5>0" );
SQLUpdate( DeviceID, "tabel1","bind1","c6>0" );
SQLUpdate( DeviceID, "tabel1","bind1","c7>0" );
SQLUpdate( DeviceID, "tabel1","bind1","c8>0" );
SQLUpdate( DeviceID, "tabel1","bind1","d1>0" );
SQLUpdate( DeviceID, "tabel1","bind1","d2>0" );
SQLUpdate( DeviceID, "tabel1","bind1","d3>0" );
SQLUpdate( DeviceID, "tabel1","bind1","d4>0" );
SQLUpdate( DeviceID, "tabel1","bind1","d5>0" );
SQLUpdate( DeviceID, "tabel1","bind1","d6>0" );
SQLUpdate( DeviceID, "tabel1","bind1","d7>0" );
SQLUpdate( DeviceID, "tabel1","bind1","d8>0" );
SQLUpdate( DeviceID, "tabel1","bind1","e1>0" );
SQLUpdate( DeviceID, "tabel1","bind1","e2>0" );
SQLUpdate( DeviceID, "tabel1","bind1","e3>0" );
SQLUpdate( DeviceID, "tabel1","bind1","e4>0" );
SQLUpdate( DeviceID, "tabel1","bind1","e5>0" );
SQLUpdate( DeviceID, "tabel1","bind1","e6>0" );
SQLUpdate( DeviceID, "tabel1","bind1","e7>0" );
SQLUpdate( DeviceID, "tabel1","bind1","e8>0" );
SQLDisconnect( DeviceID);
SQLUpdate需要存多少个变量就写多少