⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dll调用说明.txt

📁 delphi 编写的云镜控制支持PELCO P/D协议的DLL。 支持对云台镜头及辅助开关的操作。直接封装了SPCOM类
💻 TXT
字号:
{************************************命令代码转换为操作代码*********************
function  commCS(BR:integer;comm_name:Shortstring):boolean;stdcall;export;
*  result:          返回com口状态 
*  comm_name         :COM口号  
*  Br                :波特率                                                    *

function StrtoCommand(Scommand:ShortString;sed_addr:integer;
          yunjingSeep:integer;spelco:integer):shortstring;stdcall;export; 
*  result:           返回发给COM口的指令
*  Scommand          :指令码                                                    *
*  comm_name         :COM口号                                                   *
*  sed_addr          :解码器地址                                                *
*  yunjingseep       :云镜速度                                                  *
*  spelco            :解码器协议( 0.P 1.D)
********************************************************************************}
1.首先调用commCS(BR:integer;comm_name:Shortstring)打开一个COM口
2.调用StrtoCommand(Scommand:ShortString;sed_addr:integer;
          yunjingSeep:integer;spelco:integer)给COM口发相应指令。

3.指令见如下:例如向下(解码器地址为0,云台速度为10,协议为PELCO D)
StrtoCommand('sbdown',0,10,1);
{+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
    if (Scommand='ClainClose')or (Scommand='sbautoN')or(Scommand='sbstop') then
      result:='停止'+senddata(sed_addr,spelco) ;
{------------云台控制----------------------------------------------------------}
    if Scommand='sbup' then
      result:='向上'+senddata(sed_addr,spelco) ;
    end;
    if Scommand='sbdown' then
      result:='向下' +senddata(sed_addr,spelco);
    if Scommand='sbleft' then
      result:='向左'+senddata(sed_addr,spelco) ;

    if Scommand='sbright' then
      result:='向右'+senddata(sed_addr,spelco) ;

    if Scommand='sbautoY' then
      result:='打开自动扫描'+senddata(sed_addr,spelco) ;
{---------------镜头控制-------------------------------------------------------}
    if Scommand='sbzoom-' then
      result:='变倍-'+senddata(sed_addr,spelco) ;
    if Scommand='sbzoom+' then
      result:='变倍+'+senddata(sed_addr,spelco) ;
    if Scommand='sbfocus+' then
       result:='聚焦近'+senddata(sed_addr,spelco) ;
    if Scommand='sbfocus-' then
      result:='聚焦远'+senddata(sed_addr,spelco) ;
    if Scommand='sbiris-' then
      result:='光圈-'+senddata(sed_addr,spelco) ;
    if Scommand='sbiris+' then
      result:='光圈+'+senddata(sed_addr,spelco) ;
{-----------辅助开关-----------------------------------------------------------}
    if Scommand='sbbrush_close' then
      result:='关闭雨刷'+senddata(sed_addr,spelco) ;
    if Scommand='sbbrush_open' then
      result:='打开雨刷'+senddata(sed_addr,spelco) ;
    if Scommand='sbfz2_close' then
      result:='关闭辅助开关2'+senddata(sed_addr,spelco) ;
    if Scommand='sbfz1_close' then
      result:='关闭辅助开关1'+senddata(sed_addr,spelco);
    if Scommand='sbfz2_open' then
      result:='打开辅助开关2'+senddata(sed_addr,spelco) ;       
    if Scommand='sbfz1_open' then
      result:='打开辅助开关1'+senddata(sed_addr,spelco);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -