• <cite id="uwv89"></cite>
      1. 亚洲综合小综合中文字幕,国产久爱免费精品视频,精品国产品香蕉在线,国产午夜精品在人线播放,精品一二三四区在线观看,国产成人无码免费看视频软件 ,色欲久久人妻内射,午夜在线观看成人av
        wjun7610
        級別: 略有小成
        精華主題: 0
        發(fā)帖數(shù)量: 127 個
        工控威望: 249 點
        下載積分: 708 分
        在線時間: 35(小時)
        注冊時間: 2007-09-16
        最后登錄: 2025-07-30
        查看wjun7610的 主題 / 回貼
        樓主  發(fā)表于: 2013-06-22 19:51
        Omron_Fins.dll V1.0 Fins通信協(xié)議串口通訊動態(tài)鏈接庫DLL(以下簡稱DLL),是為滿足工業(yè)通信需要,

        針對工業(yè)領(lǐng)域要求上位機對歐姆龍系列PLC通訊實時采集與控制的組態(tài)編程而設(shè)計。

        可以適用于常用的各種開發(fā)環(huán)境如:Vb6、Vb.net、Delphi、C#、VC++、powerbuilder、易語言、labviEW等進(jìn)行上位機軟件開發(fā)。

        本DLL是采用Delphi語言開發(fā)的標(biāo)準(zhǔn)串口通訊庫,具有以下特點:

        1)、遵循歐姆龍最新Fins通信協(xié)議;

        2)、支持多串口并發(fā)操作,支持多線程串口通訊,將串口通訊對主程序的影響降至最低;

        3)、實時性、可靠性好,通用性強;

        4)、適用于多PLC(下位機)聯(lián)網(wǎng)和上位機通信,滿足多方面的需要;

        5)、函數(shù)接口功能全,操作簡單,支持歐姆龍PLC的絕大部分地址的讀寫功能函數(shù);

        6)、支持USB、PC擴展卡等擴展串口號;

        7)、支持多種操作系統(tǒng)win2000/winXP/Win7(標(biāo)準(zhǔn)Win32 DLL);

        8)、易于快速開發(fā)(VC等非RAD開發(fā)環(huán)境的開發(fā));

        9)、采用數(shù)組指針調(diào)用數(shù)據(jù)發(fā)生與接收,初學(xué)者快速入門;對于不方便使用指針的開發(fā)環(huán)境可采用DLL緩沖區(qū)傳遞;

        10)、可在多種編程環(huán)境下使用,例如VB、VC、Delphi、PB、Labview、易語言等開發(fā)環(huán)境;

        11)、擴展了函數(shù)功能讀取下位機中的雙字、單精度浮點等類型數(shù)據(jù),更加符合工業(yè)自動化領(lǐng)域的工控軟件的開發(fā)。

        軟件版本及相關(guān)說明:

        Omron_Fins.dll V1.0 Fins通信協(xié)議串口通訊鏈接庫,實現(xiàn)了對歐姆龍全系列PLC的Fins協(xié)議的支持,

        wangjun于2013年在原有Omron_HostLink.dll V3.2版基礎(chǔ)上基于Finsi協(xié)議重寫通訊底層協(xié)議結(jié)構(gòu)。

        對于16位整數(shù)和32位整數(shù)讀取寫入均按有符號整數(shù)處理,小數(shù)的返回按單精度浮點型(2進(jìn)制浮點)

        處理讀取方式。提供擴展功能函數(shù),方便用戶實現(xiàn)混合數(shù)據(jù)讀取。能夠同時滿足32個串口并發(fā)

        情況下的正常使用。

        Omron_Fins.dll V1.0 分為完美版和單機版兩個版本。

        注意:實例在使用時不能超出試用版的地址限制,否則無法正確通訊。


        龍帥工作室為您提供專業(yè)串口通訊控件,也可為您訂制

        專用通訊協(xié)議串口控件。目前龍帥系列串口通訊協(xié)議

        控件包括modbus_rtu、modbus_tcp、三菱FX PLC編程口、

        歐姆龍HostLink、西門子PPI等多個系列產(chǎn)品。

        淘-寶-店:http://shop34821629.taobao.com

        電 話:13912935690

        騰訊QQ:157610979

        阿里旺旺: wj_longshuai

        郵 箱:[url=mailto:157610979@QQ.com]157610979@QQ.com[/url] ;   [url=mailto:chinawanglong@163.com]chinawanglong@163.com[/url]
        [ 此帖被wjun7610在2016-11-24 14:06重新編輯 ]
        附件: 歐姆龍fins協(xié)議動態(tài)庫.rar (1353 K) 下載次數(shù):664
        wjun7610
        級別: 略有小成
        精華主題: 0
        發(fā)帖數(shù)量: 127 個
        工控威望: 249 點
        下載積分: 708 分
        在線時間: 35(小時)
        注冊時間: 2007-09-16
        最后登錄: 2025-07-30
        查看wjun7610的 主題 / 回貼
        1樓  發(fā)表于: 2013-06-22 19:52
        DLL串口操作函數(shù)包括:

          1)、finsComOpen打開串口;

             finsCvComOpen打開串口; //CV模式通訊串口打開

          2)、finsComClose關(guān)閉串口;
              
          3)、finsSetDelay串口通訊延時設(shè)定;
                            
          4)、finsComTrue判斷串口是否打開成功;
                    
          5)、finsComWork判斷串口是否正在工作中;

        Fins協(xié)議基本功能函數(shù)包括:

          1)、finsPlcRs  讀取PLC運行狀態(tài);

          2)、finsPlcWs 更改PLC運行狀態(tài);  

          3)、finsBitForced  PLC位元件強制;

          4)、finsCancelAllF 取消全部PLC強制;

          5)、finsReadBit 讀PLC位元件值;

          6)、finsReadInt 讀PLC字元件值;

          7)、finsWriteBit 寫PLC位元件值;  

          8)、finsWriteInt 寫PLC字元件值;

        Fins協(xié)議擴展功能函數(shù)包括:

          1)、finsSet PLC的位元件置位;

          2)、finsReSet PLC的位元件復(fù)位;  

          3)、finsReadDInt 讀PLC的雙字整數(shù)值;

          4)、finsReadFloat 讀PLC的浮點數(shù)據(jù)值;

          5)、finsWriteDInt 寫PLC的雙字整數(shù)值;

          6)、finsWriteFloat 寫PLC的浮點數(shù)據(jù)值;

        Fins協(xié)議DLL緩沖區(qū)傳遞功能函數(shù)包括

          1)、finsClearBuf  清除復(fù)位DLL緩存區(qū);

          2)、finsReadBitBuf 讀PLC的位元件值  

          3)、finsReadIntBuf 讀PLC的字元件值;

          4)、finsReadDIntBuf 讀PLC雙字整數(shù)值;

          5)、finsIntDllBufRead 讀DLL整數(shù)緩存區(qū)值;

          6)、finsReadFloatBuf 讀PLC浮點數(shù)據(jù)值;  

          7)、finsFloatDllBufRead 讀DLL浮點緩存區(qū)值;

          8)、finsWriteIntDllBuf  寫DLL整數(shù)緩存區(qū)值;

          9)、finsBitBufWrite  寫PLC的位元件值;

          10)、finsIntBufWrite 寫PLC的字元件值;  

          11)、finsDIntBufWrite 寫PLC雙字整數(shù)值;

          12)、finsWriteFloatDllBuf 寫DLL浮點緩存區(qū)值;  

          13)、finsFloatBufWrite 寫PLC浮點數(shù)據(jù)值;
        當(dāng)需要進(jìn)行16位整數(shù)、32位整數(shù)、32位浮點數(shù)值進(jìn)行混合讀寫時,所需拓展函數(shù)包括:

          1)、DecBitBin  字整數(shù)的位抽取;

          2)、Int32ToInt_16h  雙字到字轉(zhuǎn)換高位字;  

          3)、Int32ToInt_16l  雙字到字轉(zhuǎn)換低位字;

          4)、Int16ToInt32  字到雙字的轉(zhuǎn)換;

          5)、Float32ToInt_16h 浮點到字轉(zhuǎn)換高位字;

          6)、Float32ToInt_16l 浮點到字轉(zhuǎn)換低位字;

          7)、Int16ToFloat32  字到浮點的轉(zhuǎn)換;

          8)、Int16Unsign   16位有符號整數(shù)轉(zhuǎn)無符號整數(shù)  
        wjun7610
        級別: 略有小成
        精華主題: 0
        發(fā)帖數(shù)量: 127 個
        工控威望: 249 點
        下載積分: 708 分
        在線時間: 35(小時)
        注冊時間: 2007-09-16
        最后登錄: 2025-07-30
        查看wjun7610的 主題 / 回貼
        2樓  發(fā)表于: 2013-06-22 19:52
        在VC中使用DLL一般都是采用動態(tài)聲明的方式,函數(shù)說明中給出的是Delphi的函數(shù)原型,

        在VC中聲明時只要注意一下類型的對應(yīng)即可,Delphi中的longint類型對應(yīng)VC中的int類型

        Delphi中的Pchar對應(yīng)VC中的char* ,下面給出主要函數(shù)的聲明:

        在使用的文件的cpp中聲明一個句柄:

        HINSTANCE hinstDLL;

        用來標(biāo)識導(dǎo)入的動態(tài)鏈接庫。

        1)、按下例說明聲明相關(guān)各個函數(shù):(在cpp文件的頭處聲明)

        typedef int (_stdcall *pOpen)(int nport, int BaudRate, int DataBits, char* Parity, int StopBits, char* User);
        typedef int (_stdcall *pClose)(int nport);
        typedef int (_stdcall *pSetDelay)(int value);
        typedef int (_stdcall *pComTrue)(int nport);
        typedef int (_stdcall *pComWork)(int nport);

        typedef int (_stdcall *pRs)(int nport, int node);
        typedef int (_stdcall *pWs)(int nport, int node, int State);
        typedef int (_stdcall *pBitForced)(int nport, int node, int address, int Bit, int value, char* Area);
        typedef int (_stdcall *pCancelAllF)(int nport, int node);
        typedef int (_stdcall *pReadBit)(int nport, int node, int address, int Bit, int Count, char* Area, int* RxdBuffer);
        typedef int (_stdcall *pReadInt)(int nport, int node, int address, int Count, char* Area, int* RxdBuffer);
        typedef int (_stdcall *pWriteBit)(int nport, int node, int address, int Bit, int Count, char* Area, int* TxdBuffer);
        typedef int (_stdcall *pWriteInt)(int nport, int node, int address, int Count, char* Area, int* TxdBuffer);

        typedef int (_stdcall *pSet)(int nport, int node, int address, int Bit, char* Area);
        typedef int (_stdcall *pReSet)(int nport, int node, int address, int Bit, char* Area);
        typedef int (_stdcall *pReadDInt)(int nport, int node, int address, int Count, int* RxdBuffer);
        typedef int (_stdcall *pReadFloat)(int nport, int node, int address, int Count, float* RxdBuffer);
        typedef int (_stdcall *pWriteDInt)(int nport, int node, int address, int Count, int* TxdBuffer);
        typedef int (_stdcall *pWriteFloat)(int nport, int node, int address, int Count, float* TxdBuffer);

        typedef int (_stdcall *pBitBin)(int value, int Bitaddress);
        typedef int (_stdcall *p32I_16h)(int value);
        typedef int (_stdcall *p32I_16l)(int value);
        typedef int (_stdcall *p16I_32I)(int valueH, int valueL);
        typedef int (_stdcall *p32f_16h)(float value);
        typedef int (_stdcall *p32f_16l)(float value);
        typedef float (_stdcall *p16I_32f)(int valueH, int valueL);
        typedef int (_stdcall *pInt16Unsign)(int value);

        2)、建立動態(tài)鏈接庫的新函數(shù)名:(在cpp文件的頭處聲明)

        pOpen mOpen;
        pClose mClose;
        pSetDelay mSetDelay;
        pComTrue mComTrue;
        pComWork mComWork;

        pRs mRs;
        pWs mWs;
        pBitForced mBitForced;
        pCancelAllF mCancelAllF;
        pReadBit mReadBit;
        pReadInt mReadInt;
        pWriteBit mWriteBit;
        pWriteInt mWriteInt;

        pSet mSet;
        pReSet mReSet;
        pReadDInt mReadDInt;
        pReadFloat mReadFloat;
        pWriteDInt mWriteDInt;
        pWriteFloat mWriteFloat;

        pBitBin mBitBin;
        p32I_16h m32I_16h;
        p32I_16l m32I_16l;
        p16I_32I m16I_32I;
        p32f_16h m32f_16h;
        p32f_16l m32f_16l;
        p16I_32f m16I_32f;
        pInt16Unsign mInt16Unsign;

        3)、導(dǎo)入動態(tài)鏈接庫,如例所示:(在cpp文件的OnInitDialog過程建立):

        hinstDLL = LoadLibrary("Omron_fins.dll");

        4)、判斷dll文件是否存在并聲明并建立動態(tài)鏈接庫中的函數(shù)與新函數(shù)名的對應(yīng)關(guān)系,

        如下:(在cpp文件的OnInitDialog過程建立):

           if (hinstDLL)
           {
              mOpen = (pOpen)GetProcAddress (hinstDLL,"finsComOpen");
              //mOpen = (pOpen)GetProcAddress (hinstDLL,"finsCvComOpen");  CV模式plc使用這個打開串口
              mClose = (pClose)GetProcAddress (hinstDLL,"finsComClose");
              mSetDelay = (pSetDelay)GetProcAddress (hinstDLL,"finsSetDelay");
              mComTrue = (pComTrue)GetProcAddress (hinstDLL,"finsComTrue");
              mComWork = (pComWork)GetProcAddress (hinstDLL,"finsComWork");
            
              mRs = (pRs)GetProcAddress (hinstDLL,"finsPlcRs");
              mWs = (pWs)GetProcAddress (hinstDLL,"finsPlcWs");
              mBitForced = (pBitForced)GetProcAddress (hinstDLL,"finsBitForced");
              mCancelAllF = (pCancelAllF)GetProcAddress (hinstDLL,"finsCancelAllF");
              mReadBit = (pReadBit)GetProcAddress (hinstDLL,"finsReadBit");
              mReadInt = (pReadInt)GetProcAddress (hinstDLL,"finsReadInt");
              mWriteBit = (pWriteBit)GetProcAddress (hinstDLL,"finsWriteBit");
              mWriteInt = (pWriteInt)GetProcAddress (hinstDLL,"finsWriteInt");

              mSet = (pSet)GetProcAddress (hinstDLL,"finsSet");
              mReSet = (pReSet)GetProcAddress (hinstDLL,"finsReSet");
              mReadDInt = (pReadDInt)GetProcAddress (hinstDLL,"finsReadDInt");
              mReadFloat = (pReadFloat)GetProcAddress (hinstDLL,"finsReadFloat");
              mWriteDInt = (pWriteDInt)GetProcAddress (hinstDLL,"finsWriteDInt");
              mWriteFloat = (pWriteFloat)GetProcAddress (hinstDLL,"finsWriteFloat");


             mBitBin = (pBitBin)GetProcAddress (hinstDLL,"DecBitBin");
             m32I_16h = (p32I_16h)GetProcAddress (hinstDLL,"Int32ToInt_16h");
             m32I_16l = (p32I_16l)GetProcAddress (hinstDLL,"Int32ToInt_16l");
             m16I_32I= (p16I_32I)GetProcAddress (hinstDLL,"Int16ToInt32");
             m32f_16h = (p32f_16h)GetProcAddress (hinstDLL,"Float32ToInt_16h");
             m32f_16l = (p32f_16l)GetProcAddress (hinstDLL,"Float32ToInt_16l");
             m16I_32f= (p16I_32f)GetProcAddress (hinstDLL,"Int16ToFloat32");
             mInt16Unsign = (pInt16Unsign)GetProcAddress (hinstDLL,"Int16Unsign");
          
             AfxMessageBox("Omron_fins.dll已成功載入!");
          }
          else
        {
            AfxMessageBox("沒找到Omron_fins.dll!");
            SendMessage(WM_CLOSE);
          }

        注:雙引號中為動態(tài)鏈接庫中的原有函數(shù)名。


        函數(shù)中用到了char*型參數(shù),這里介紹下char*與Cstring的相互轉(zhuǎn)換的函數(shù):

        (1)char*->CString

        char* sz;
        CString str;
        str.Format("%s",sz);  //可以用此函數(shù)將讀取的值轉(zhuǎn)成字符串

        (2) CString -> char*

        CString str;
        char* sz = str.GetBuffer(0);//可將字符串轉(zhuǎn)成char*給函數(shù)賦值


        5)、當(dāng)不再需要使用DLL時記得關(guān)閉串口及釋放動態(tài)鏈接庫,(在OnDestroy事件中釋放)

        if(hinstDLL)
        {
           int k = mComTrue(mnport);
           if (k==1)
           {
              mClose(mnport);
           }    
           FreeLibrary(hinstDLL);
        }
        cmsn
              
        級別: 略有小成
        精華主題: 0
        發(fā)帖數(shù)量: 275 個
        工控威望: 451 點
        下載積分: 1037 分
        在線時間: 281(小時)
        注冊時間: 2012-09-10
        最后登錄: 2025-09-02
        查看cmsn的 主題 / 回貼
        3樓  發(fā)表于: 2013-06-22 20:57
        這個關(guān)注下
        manjialin
        專業(yè)工業(yè)控制軟件開發(fā)!
        級別: 略有小成
        精華主題: 0
        發(fā)帖數(shù)量: 144 個
        工控威望: 334 點
        下載積分: 718 分
        在線時間: 110(小時)
        注冊時間: 2008-11-28
        最后登錄: 2020-08-26
        查看manjialin的 主題 / 回貼
        4樓  發(fā)表于: 2013-07-02 08:55
        干了那么多年軟件開發(fā),第一次聽說OMRON能全系支持FINS
        945785181
        做自己,信自己。
        級別: 探索解密
        精華主題: 0
        發(fā)帖數(shù)量: 20 個
        工控威望: 128 點
        下載積分: 619 分
        在線時間: 17(小時)
        注冊時間: 2011-01-15
        最后登錄: 2015-08-13
        查看945785181的 主題 / 回貼
        5樓  發(fā)表于: 2013-07-11 09:14
        下載下來都不能解壓的

        主站蜘蛛池模板: 377P欧洲日本亚洲大胆| 欧美成人精品在线| 蜜桃一区二区三区免费看| 少妇激情一区二区三区视频| 亚洲欧美日韩国产精品一区二区| 精品中文人妻在线不卡| 不卡在线一区二区三区视频| 国产精品久久无码不卡黑寡妇| 久久精品国产清自在天天线| 国产成人不卡无码免费视频| 这里只有精品在线播放| 亚洲成av人片在www鸭子| 亚洲国产日韩一区三区| 精品一区二区三区国产馆| 无码AV中文字幕久久专区| 国产一区二区三区四区色| 久久99精品久久久久久9 | 老司机性色福利精品视频| 亚洲国产精品久久久久秋霞 | 国产精品va在线观看h| 韩国精品久久久久久无码| 亚洲最大成人在线播放| 亚洲国产成人精品女人久久久| 毛片无遮挡高清免费| 日本高清色WWW在线安全| 久久99热只有频精品8| 国产在线中文字幕精品| 桃花岛亚洲成在人线AV| 日本一区二区三区后入式| 精品偷拍一区二区三区在| 国产一区二区三区综合视频| 免费人成再在线观看视频| 欧美xxxxhd高清| 免费无码一区无码东京热| 久久精品国产中文字幕| a级国产乱理伦片在线观看al| 精品国产免费一区二区三区香蕉| 奶头好大揉着好爽视频| 国产精品福利一区二区三区| 蜜臀av一区二区精品字幕| 国产熟女高潮一区二区三区|