谁会写OPC客户端程序啊?(300分)

  • 主题发起人 主题发起人 aiken
  • 开始时间 开始时间
已经发过去了,请查收!
好像它并不“按道理”发布!直接跟OPC服务器交换数据不是更简单、方便吗?
 
正在摸索,请楼主看一下以下网页:
http://www.jetter.de/brd/menu09/images/alles.gif
 
糟糕, 我好不容易到JETTER网站把全部软件下载了(近130M),反正也没手册,只好
看E文帮助文件,发现JetViewSoft(组态软件)是使用JavaScript来写的,以下是部分代码:

function LimitPickPlacePos()
{
if (JVReadTag("Axis1PickPosition") > 1000)
JVWriteTag("Axis1PickPosition",1000);
if (JVReadTag("Axis1PickPosition") < 0)
JVWriteTag("Axis1PickPosition",0);
if (JVReadTag("Axis2PickPosition") > 1000)
JVWriteTag("Axis2PickPosition",1000);
if (JVReadTag("Axis2PickPosition") < 0)
JVWriteTag("Axis2PickPosition",0);
if (JVReadTag("Axis1PlacePosition") > 1000)
JVWriteTag("Axis1PlacePosition",1000);
if (JVReadTag("Axis1PlacePosition") < 0)
JVWriteTag("Axis1PlacePosition",0);
if (JVReadTag("Axis2PlacePosition") > 1000)
JVWriteTag("Axis2PlacePosition",1000);
if (JVReadTag("Axis2PlacePosition") < 0)
JVWriteTag("Axis2PlacePosition",0);
}


function PositionAxis()
{
if (JVReadTag("EnableAxis") != 0 ){
if (JVReadTag("AutomaticMode") == 0 ){
if (JVReadTag("Axis1SetPosition") > 1000)
JVWriteTag("Axis1SetPosition",1000);
if (JVReadTag("Axis1SetPosition") < 0)
JVWriteTag("Axis1SetPosition",0);
if (JVReadTag("Axis2SetPosition") > 1000)
JVWriteTag("Axis2SetPosition",1000);
if (JVReadTag("Axis2SetPosition") < 0)
JVWriteTag("Axis2SetPosition",0);
if (JVReadTag("Axis1SetPosition") !=
JVReadTag("Axis1ActualPosition"))
JVWriteTag("Axis1ActualPosition",JVReadTag("Axis1SetPosition"));
if (JVReadTag("Axis2SetPosition") !=
JVReadTag("Axis2ActualPosition"))
JVWriteTag("Axis2ActualPosition",JVReadTag("Axis2SetPosition"));
LimitPickPlacePos();
}
}
window.setTimeout("PositionAxis()",200);
}


function PickandPlace(Step)
{
if(JVReadTag("AutomaticMode") != 0){
LimitPickPlacePos();
switch ( Step ){
case 1:
JVWriteTag("Axis1ActualPosition",
JVReadTag("Axis1PickPosition"));
JVWriteTag("Axis2ActualPosition",
JVReadTag("Axis2PickPosition"));
JVWriteTag("ObjectPicked",1);
if( JVReadTag("FastSpeed") == 1)
window.setTimeout("PickandPlace(2)",200);
else
window.setTimeout("PickandPlace(2)",500);
break;
case 2:
JVWriteTag("Axis1ActualPosition",
JVReadTag("Axis1PickPosition"));
JVWriteTag("Axis2ActualPosition",1000);
if( JVReadTag("FastSpeed") == 1)
window.setTimeout("PickandPlace(3)",200);
else
window.setTimeout("PickandPlace(3)",500);
break;
case 3:
JVWriteTag("Axis1ActualPosition",
JVReadTag("Axis1PlacePosition"));
JVWriteTag("Axis2ActualPosition",1000);
if( JVReadTag("FastSpeed") == 1)
window.setTimeout("PickandPlace(4)",200);
else
window.setTimeout("PickandPlace(4)",500);
break;
case 4:
JVWriteTag("Axis1ActualPosition",
JVReadTag("Axis1PlacePosition"));
JVWriteTag("Axis2ActualPosition",
JVReadTag("Axis2PlacePosition"));
JVWriteTag("ObjectPicked",0);
if( JVReadTag("FastSpeed") == 1)
window.setTimeout("PickandPlace(5)",200);
else
window.setTimeout("PickandPlace(5)",500);
break;
case 5:
JVWriteTag("Axis1ActualPosition",
JVReadTag("Axis1PlacePosition"));
JVWriteTag("Axis2ActualPosition",1000);
if( JVReadTag("FastSpeed") == 1)
window.setTimeout("PickandPlace(6)",200);
else
window.setTimeout("PickandPlace(6)",500);
break;
case 6:
JVWriteTag("Axis1ActualPosition",
JVReadTag("Axis1PickPosition"));
JVWriteTag("Axis2ActualPosition",1000);
if( JVReadTag("FastSpeed") == 1)
window.setTimeout("PickandPlace(1)",200);
else
window.setTimeout("PickandPlace(1)",500);
break;
}
}
else window.setTimeout("PickandPlace(1)",500);
}


以下是部分PAS代码:
(* Testprogramm zum Lesen und Schreiben von Registern 乥er den JETWAY.

Autor: H.B攈.a.Oe. (JETTER)
Datum: V1.0 31.01.96
V1.1 30.09.96 - Setzen eines Timeout-Wertes
*)

const IOBASE = $310;

JETWAYDATAREG = IOBASE;
JETWAYCOMMANDREG = IOBASE + 4;
JETWAYSTATUSREG = IOBASE + 4;

DEFAULTSLAVENO = 3;


type TLongByteRec = record
LoLo,LoHi,HiLo,HiHi: byte;
end;

const PASEEPLUS = 1;
MIKRO = 3;
DELTA = 4;
NANOA = 5;
NANOB = 6;

var byControllerType : byte;
wControllerVersion: word;

const bJetwaySlaveNo : byte = DEFAULTSLAVENO;
byJetwayVersion: byte = 10; (* Version 1.0 *)


var lTimerTick: longint absolute $40:$6C;
lTimeout : longint;


procedure ClearJetwayBuffer; forward;


procedure InitTimeout;
begin
lTimeout := lTimerTick + 9; (* ca. 0.5 sec *)
end;


function OutOfTime: boolean;
begin
OutOfTime := lTimerTick > lTimeout;
end;


function JetwayExists: boolean;
const TESTLOOPS = 10;

var bLoops : byte;

begin
JetwayExists := False;
for bLoops := 1 to TESTLOOPS do begin
InitTimeout;
repeat
if ( OutOfTime ) then Exit;
until ( Port[JETWAYSTATUSREG] and $60 = $40 ); (* Wait until Togglebit *)
InitTimeout;
repeat
if ( OutOfTime ) then Exit;
until ( Port[JETWAYSTATUSREG] and $60 = $20 ); (* Wait until Togglebit *)
end;
JetwayExists := True;
end;


(* DATA-Jetway - Empfangsroutine *)
function GetByteFromJetway: byte;
begin
InitTimeout;
repeat
if ( OutOfTime ) then begin
WriteLn( 'ERROR: JETWAY timeout !' );
Exit;
end;
until ( Port[JETWAYSTATUSREG] and 1 > 0 ); (* Wait for OBF TRUE *)
GetByteFromJetway := Port[JETWAYDATAREG];
end;


function CheckJetwayMsg: boolean;
var bOrderNo: byte;
bSlaveNo: byte;
bOK : byte;

begin
bOrderNo := GetByteFromJetway;
bSlaveNo := GetByteFromJetway;
bOK := GetByteFromJetway;
if ( bOK = 1 ) then
CheckJetwayMsg := True
else begin
WriteLn( 'ERROR: PASE timeout !' );
CheckJetwayMsg := True;
end;
end;


procedure ClearJetwayBuffer;
begin
(* Puffer komplett auslesen, falls noch voll *)
while ( Port[JETWAYSTATUSREG] and 1 > 0 ) do GetByteFromJetway;
end;


function JetwayReady: boolean;
begin
InitTimeout;
repeat
if ( OutOfTime ) then begin
JetwayReady := False;
Exit;
end;
until ( Port[JETWAYSTATUSREG] and 6 = 0 ); (* Wait until IBF FALSE *)
JetwayReady := True;
end;


procedure SendJetway( b: byte );
begin
if ( JetwayReady ) then Port[JETWAYDATAREG] := b;
end;


procedure SendJetwayKommando( b: char );
begin
if ( JetwayReady ) then Port[JETWAYCOMMANDREG] := byte(b);
end;


procedure SendByte( b: byte );
begin
SendJetway( b );
end;


procedure SendWord( w: word );
begin
SendByte( hi( w ) );
SendByte( lo( w ) );
end;


(* Lesen eines 24-Bit-Registers *)
function JetwayGetRegister( rn: longint; var erg: longint ): boolean;
begin
SendJetwayKommando( 'Q' );
SendWord( word( rn ) );
SendByte( 0 );
SendByte( bJetwaySlaveNo );
CheckJetwayMsg;
erg := 0;
TLongByteRec(erg).HiLo := GetByteFromJetway;
TLongByteRec(erg).LoHi := GetByteFromJetway;
TLongByteRec(erg).LoLo := GetByteFromJetway;
if ( TLongByteRec(erg).HiLo > $80 ) then TLongByteRec(erg).HiHi := $FF;
JetwayGetRegister := True;
end;


(* Lesen eines Gleitkommazahl-Registers *)
function JetwayGetRealRegister( rn: word; var erg: real ): boolean;
(* Realregisterinhalt von PASE holen. Umwandlung FPAL in TurboPascal-real-
Format.
Exponent begrenzen, so da?beim sichern und wiederladen per ASCII kein
I/O-Fehler entsteht!
*)
type t_conv = record
case integer of
0: (b : array[0..5] of byte);
1: (r : real);
end;
var i : byte;
result: array[0..7] of char;
e : array[0..3] of byte;
r : t_conv;
mask : byte;

begin
SendJetwayKommando( 'S' );
SendWord( rn );
SendByte( 0 );
SendByte( bJetwaySlaveNo );
CheckJetwayMsg;
for i := 0 to 3 do begin
e := GetByteFromJetway;
end;
with r do begin
mask := e[0] and $80; (* Vorzeichenbit Mantisse *)
b[5] := mask or (e[1] and $7F);
b[4] := e[2];
b[3] := e[3];
b[2] := 0;
b[1] := 0;
b[0] := (e[0] shl 1) and $FE;
if ( e[1] and $80 > 0 ) then b[0] := b[0] + 1;
if ( b[0] < 254 ) then b[0] := b[0] + 2; (* Exponent angleichen +2 *)
(* pr乫en, ob innerhalb zul剆sigem Bereich f乺 ASCII-I/O *)
if ( b[0] > 253 ) then r := 9.9999E37;
if ( b[0] < 4 ) then r := 0.0;
erg := r;
end;
JetwayGetRealRegister := True;
end;


function WaitForChr1: boolean;
var bOK: boolean;

begin
bOK := CheckJetwayMsg;
WaitForChr1 := ( ( GetByteFromJetway = 255 ) and ( bOK ) );
end;


(* Beschreiben eines 24-Bit-Registers *)
function JetwaySetRegister( rn, rw: longint ): boolean;
begin
SendJetwayKommando( 'R' );
SendWord( word( rn ) );
SendByte( TLongByteRec(rw).HiLo );
SendByte( TLongByteRec(rw).LoHi );
SendByte( TLongByteRec(rw).LoLo );
SendByte( 0 );
SendByte( bJetwaySlaveNo );
JetwaySetRegister := WaitForChr1;
end;


(* Beschreiben eines Gleitkommazahl-Registers *)
function JetwaySetRealRegister( rn: word; rw: real ): boolean;
var bs: array[0..3] of byte;

procedure ConvertReal2Float;
type t_conv = record
case integer of
0: (b: array[0..5] of byte);
1: (r: real);
end;
var r : t_conv;
begin
(* Jetzt die Realzahl von PASCAL-real-Typ in FPAL-Typ umwandeln
(* Zahl im FPAL-Format in e:
High Address Low Address
e[0] e[1] e[2] e[3]
FPAL (V e8..e2) (e1 f22..f16) (f15..f8) (f7..f0)
r.b[5] r.b[4] r.b[3] r.b[2] r.b[1] r.b[0]
Pascal-real: (V f38..f32) (f31..f24) (f23..f16) (f15..f8) (f7..f0) (exp)

*)
with r do begin
r := rw;
if ( b[0] > 1 ) then b[0] := b[0] - 2;
bs[0] := ( b[5] and $80 ) or ( ( b[0] shr 1 ) and $7F );
bs[1] := ( ( b[0] shl 7 ) and $80 ) or ( b[5] and $7F );
bs[2] := b[4];
bs[3] := b[3];
end;
end;

procedure SendBytes;
var i: byte;
begin
for i := 0 to 3 do SendByte(bs)
end;


begin
ConvertReal2Float;
SendJetwayKommando( 'T' );
SendWord( rn );
SendBytes;
SendByte( 0 );
SendByte( bJetwaySlaveNo );
JetwaySetRealRegister := WaitForChr1;
end;


procedure SetJetwayBaudrate( idx: byte );
begin
(* Baudrate senden *)
SendJetwayKommando('/');
SendByte( idx );
SendByte(0);
SendByte( bJetwaySlaveNo );
CheckJetwayMsg;
GetByteFromJetway; (* Dummy-Byte (Baudrate) auslesen *)
end;


procedure SetJetwayTimeout( wTimeout: word );
(* Timeout senden *)
begin
if ( byJetwayVersion >= 12 ) then begin
SendJetwayKommando( ']' );
SendWord( wTimeout div 10 );
SendByte( 0 );
SendByte( bJetwaySlaveNo );
CheckJetwayMsg;
GetByteFromJetway;
end;
end;


procedure GetControllerInfo;
begin
SendJetwayKommando( 'F' );
SendByte( 0 );
SendByte( bJetwaySlaveNo );
CheckJetwayMsg;
byControllerType := GetByteFromJetway;
(* Steuerungs-Versionsnummer *)
wControllerVersion := ( GetByteFromJetway shl 8 ) + GetByteFromJetway;
GetByteFromJetway; (* Protokollversion ... unwichtig *)
end;


procedure GetJetwayVersion;
(* Jetway-Treiberkarten-Version ermitteln *)
begin
SendJetwayKommando( '[' );
SendByte( 0 );
SendByte( bJetwaySlaveNo );
CheckJetwayMsg;
byJetwayVersion := GetByteFromJetway;
end;


var lRegwert: longint;
fRegwert: real;

begin
WriteLn;
(* Testen, ob JETWAY vorhanden *)
if ( JetwayExists ) then begin

ClearJetwayBuffer;

GetJetwayVersion;
GetControllerInfo;

SetJetwayTimeout( 2000 ); (* 2000 ms (default = 250 ms) *)
{
SetJetwayBaudrate( 9 ); (* 9 = 115200 (default); 6 = 19200 *)
}

(* Test 1:
- Register 1 lesen und anzeigen
- Wert verdoppeln und in Register 1 zur乧kschreiben
- Variable auf null setzen
- Register 1 lesen und anzeigen
*)
JetwayGetRegister( 1, lRegwert );
WriteLn( lRegwert );
inc( lRegwert, lRegwert );
JetwaySetRegister( 1, lRegwert );
lRegwert := 0;
JetwayGetRegister( 1, lRegwert );
WriteLn( lRegwert );

(* Test 2:
- Register 8960 lesen und anzeigen
- Wert verdoppeln und in Register 8960 zur乧kschreiben
- Variable auf null setzen
- Register 8960 lesen und anzeigen
*)
JetwayGetRealRegister( 8960, fRegwert );
WriteLn( fRegwert );
fRegwert := fRegwert * 2;
JetwaySetRealRegister( 8960, fRegwert );
fRegwert := 0;
JetwayGetRealRegister( 8960, fRegwert );
WriteLn( fRegwert );
end
else
WriteLn( 'ERROR: JETWAY port is not responding !' );
end.

在帮助文件中找了半天,就是找不到API函数,如JVReadTag和JVWriteTag等类似的函数,
除了教你使用软件外,别的就看不到了.
楼主,你说怎么办?

 
  昨天下午上不来!
 我还是觉得读写OPC服务器比较方便省事,因为我要与2个服务器打交道,你说呢?
 你到这个网站( http://www.dopc.kassl.de )看看,下载一个dopc的控件试试,它就是直
接跟OPC服务器打交道的,可是
 1.我不知道它的"Only a little warning message is displayed"什么时候会冒出来。
 2.没有源码,我不太会用,IOCOMP就直观、方便多了。
 “在帮助文件中找了半天,就是找不到API函数”,我觉得人家要卖钱的东西,不是写得
很明白也是可以理解的!:)
 
楼主真是有心人,谢谢!
所有文件刚刚下载完毕,正运行DELPHI 7。。。。。。。。
好,我们一起学习,准备从那开始?
请参考以下网页:
http://www.opcactivex.com/Support/DCOM_Config/dcom_config.html
http://itcofe.web.cern.ch/itcofe/Services/OPC/GettingStarted/DCOM/RelatedDocuments/ITCODCOMSettings.pdf
 
哈哈,楼主,我找到Jetter的Active了,你安装好Jetter OPC之后,
然后在Delphi的环境中,点击Component-〉Import Active Control菜单,
查找到Jet32X就可以了。以下是它的导出文件,里面的接口函数都有了,
你可以自己编程了:
unit JET32XLib_TLB;

// ************************************************************************ //
// WARNING
// -------
// The types declared in this file were generated from data read from a
// Type Library. If this type library is explicitly or indirectly (via
// another type library referring to this type library) re-imported, or the
// 'Refresh' command of the Type Library Editor activated while editing the
// Type Library, the contents of this file will be regenerated and all
// manual modifications will be lost.
// ************************************************************************ //

// PASTLWTR : 1.2
// File generated on 2003-08-13 8:59:08 from Type Library described below.

// ************************************************************************ //
// Type Lib: C:/WINNT/System32/Jet32X.dll (1)
// LIBID: {AF11C013-9950-11D6-9E18-0050BA6EEA16}
// LCID: 0
// Helpfile:
// HelpString: Jet32X 1.0 Type Library
// DepndLst:
// (1) v2.0 stdole, (C:/WINNT/System32/stdole2.tlb)
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface

uses Windows, ActiveX, Classes, Graphics, OleCtrls, OleServer, StdVCL, Variants;



// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:
// Type Libraries : LIBID_xxxx
// CoClasses : CLASS_xxxx
// DISPInterfaces : DIID_xxxx
// Non-DISP interfaces: IID_xxxx
// *********************************************************************//
const
// TypeLibrary Major and minor versions
JET32XLibMajorVersion = 1;
JET32XLibMinorVersion = 0;

LIBID_JET32XLib: TGUID = '{AF11C013-9950-11D6-9E18-0050BA6EEA16}';

DIID__IJVJet32XEvents: TGUID = '{0D9DCFA6-9A1D-11D6-9E19-0050BA6EEA16}';
IID_IJVJet32X: TGUID = '{0D9DCFA4-9A1D-11D6-9E19-0050BA6EEA16}';
CLASS_JVJet32X: TGUID = '{0D9DCFA5-9A1D-11D6-9E19-0050BA6EEA16}';

// *********************************************************************//
// Declaration of Enumerations defined in Type Library
// *********************************************************************//
// Constants for enum IntType
type
IntType = TOleEnum;
const
eSerial = $00000000;
eJetWay = $00000001;
ePCPPLC = $00000002;
eJetIP = $00000003;

// Constants for enum CtrlType
type
CtrlType = TOleEnum;
const
ePaseE = $00000000;
eMikro = $00000001;
eDelta = $00000002;
eNanoA = $00000003;
eNanoB = $00000004;
eNanoC = $00000005;
ePcPplcCtrl = $00000006;
eNanoD = $00000007;
eDeltaCPU2 = $00000008;
eJetControl24x = $00000009;
eJetControl64x = $0000000A;

type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary
// *********************************************************************//
_IJVJet32XEvents = dispinterface;
IJVJet32X = interface;
IJVJet32XDisp = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library
// (NOTE: Here we map each CoClass to its Default Interface)
// *********************************************************************//
JVJet32X = IJVJet32X;


// *********************************************************************//
// DispIntf: _IJVJet32XEvents
// Flags: (4096) Dispatchable
// GUID: {0D9DCFA6-9A1D-11D6-9E19-0050BA6EEA16}
// *********************************************************************//
_IJVJet32XEvents = dispinterface
['{0D9DCFA6-9A1D-11D6-9E19-0050BA6EEA16}']
procedure JVOnDataChange(const bstrItem: WideString; nClientHandle: Integer;
const bstrValue: WideString); dispid 1;
procedure JVOnReadAsyncComplete(const bstrItem: WideString; const bstrValue: WideString;
bError: WordBool); dispid 2;
procedure JVOnWriteAsyncComplete(const bstrItem: WideString; bError: WordBool); dispid 3;
procedure OnDataChange(const bstrItem: WideString; nClientHandle: Integer;
const bstrValue: WideString); dispid 4;
procedure OnReadAsyncComplete(const bstrItem: WideString; const bstrValue: WideString;
bError: WordBool); dispid 5;
procedure OnWriteAsyncComplete(const bstrItem: WideString; bError: WordBool); dispid 6;
procedure OnError(const bstrErrorCode: WideString; const bstrErrorDescription: WideString); dispid 7;
procedure OnCallbackRead(nPortAddress: Integer; dwIPAddress: LongWord; lRegNo: Integer;
lSize: Integer; lBlockMode: Integer); dispid 8;
procedure OnCallbackWrite(nPortAddress: Integer; dwIPAddress: LongWord; lRegNo: Integer;
lSize: Integer; lBlockMode: Integer; const bstrValues: WideString); dispid 9;
procedure OnDataDumpTransferComplete(bDownload: WordBool; bError: WordBool); dispid 10;
procedure OnDataDumpTransferInit(nNumberOfItems: Integer; const bstrControllerName: WideString;
const bstrInterface: WideString); dispid 11;
procedure OnDataDumpTransferProgress(nNoOfItemsTransferred: Integer); dispid 12;
procedure OnDataDumpTransferNewRange(nType: Integer; nFirstNumber: LongWord;
nLastNumber: LongWord; const bstrComment: WideString); dispid 13;
procedure OnProgramTransferComplete(bDownload: WordBool; bError: WordBool); dispid 14;
procedure OnProgramTransferInit(nNumberOfBytes: Integer; const bstrControllerName: WideString;
const bstrInterface: WideString;
const bstrProgramName: WideString;
const bstrProgramDate: WideString; nProgramVersion: Integer); dispid 15;
procedure OnProgramTransferProgress(nNoOfBytesTransferred: Integer); dispid 16;
procedure OnProgramTransferEndDownload(dwElapsedTime: LongWord); dispid 17;
procedure OnProgrammTransferRamFlashInit(nMaxSteps: Integer); dispid 18;
procedure OnProgramTransferRamFlashProgress(nNoOfStepsPerformed: Integer); dispid 19;
procedure OnOsUpdateComplete(bError: WordBool); dispid 20;
procedure OnOsUpdateInitLoader(nLoaderSize: Integer; nSystemSize: Integer;
nSlotNumber: Integer; nModuleNumber: Integer;
nSlaveNumber: Integer; const bstrControllerName: WideString;
const bstrInterface: WideString); dispid 21;
procedure OnOsUpdateProgressLoader(nNumberOfKiloBytes: Integer); dispid 22;
procedure OnOsUpdateEndLoader(nLoaderSize: Integer); dispid 23;
procedure OnOsUpdateInitSystem(nSystemSize: Integer); dispid 24;
procedure OnOsUpdateProgressSystem(nNumberOfKiloBytes: Integer); dispid 25;
procedure OnOsUpdateProgressRamFlash(nNumberOfKiloBytes: Integer); dispid 26;
procedure OnRamFlashExchangeComplete(nMode: Integer; bError: WordBool); dispid 27;
procedure OnRamFlashExchangeInit(nNoOfSteps: Integer; const bstrControllerName: WideString;
const bstrInterface: WideString); dispid 28;
procedure OnRamFlashExchangeProgress(nNoOfStepsTransferred: Integer); dispid 29;
procedure OnReconnected(lDownTime: Integer); dispid 30;
end;

// *********************************************************************//
// Interface: IJVJet32X
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {0D9DCFA4-9A1D-11D6-9E19-0050BA6EEA16}
// *********************************************************************//
IJVJet32X = interface(IDispatch)
['{0D9DCFA4-9A1D-11D6-9E19-0050BA6EEA16}']
function JVReadTag(const bstrItem: WideString; bNotifyOnChange: WordBool; bAsync: WordBool): WideString; safecall;
function JVWriteTag(const bstrItem: WideString; const bstrValue: WideString;
bNotifyOnChange: WordBool; bAsync: WordBool): WordBool; safecall;
function JVAddItem(const bstrGroup: WideString; const bstrItem: WideString;
nClientHandle: Integer; bActive: WordBool): WordBool; safecall;
function JVRemoveItem(const bstrGroup: WideString; const bstrItem: WideString): WordBool; safecall;
function ReadTag(const bstrItem: WideString; bNotifyOnChange: WordBool; bAsync: WordBool): WideString; safecall;
function WriteTag(const bstrItem: WideString; const bstrValue: WideString;
bNotifyOnChange: WordBool; bAsync: WordBool): WordBool; safecall;
function AddItem(const bstrGroup: WideString; const bstrItem: WideString;
nClientHandle: Integer; bActive: WordBool): WordBool; safecall;
function RemoveItem(const bstrGroup: WideString; const bstrItem: WideString): WordBool; safecall;
function AddGroup(const bstrGroup: WideString; nReqUpdateTime: Integer; bActive: WordBool): WordBool; safecall;
function RemoveGroup(const bstrGroup: WideString): WordBool; safecall;
function SetGroupUpdateTime(const bstrGroup: WideString; nReqUpdateTime: Integer): WordBool; safecall;
function GetGroupUpdateTime(const bstrGroup: WideString): Integer; safecall;
function SetGroupActiveState(const bstrGroup: WideString; bActive: WordBool): WordBool; safecall;
function GetGroupActiveState(const bstrGroup: WideString): WordBool; safecall;
function MapJVItemToItem(const bstrJVItem: WideString; const bstrItem: WideString): WordBool; safecall;
function LoadConfig(const bstrFileName: WideString): WordBool; safecall;
function GetErrorDescription(const bstrErrorCode: WideString): WideString; safecall;
function GetLastErrorCode: WideString; safecall;
function Get_InterfaceType: IntType; safecall;
procedure Set_InterfaceType(pVal: IntType); safecall;
function Get_InterfaceNumber: Integer; safecall;
procedure Set_InterfaceNumber(pVal: Integer); safecall;
function Get_PortAddress: Integer; safecall;
procedure Set_PortAddress(pVal: Integer); safecall;
function Get_IPAddress: WideString; safecall;
procedure Set_IPAddress(const pVal: WideString); safecall;
function Get_SendPortNumber: Integer; safecall;
procedure Set_SendPortNumber(pVal: Integer); safecall;
function Get_ReceivePortNumber: Integer; safecall;
procedure Set_ReceivePortNumber(pVal: Integer); safecall;
function Get_ControllerType: CtrlType; safecall;
procedure Set_ControllerType(pVal: CtrlType); safecall;
function Get_Baudrate: Integer; safecall;
procedure Set_Baudrate(pVal: Integer); safecall;
function Get_TimeOut: Integer; safecall;
procedure Set_TimeOut(pVal: Integer); safecall;
function Get_ForceOldProtocol: WordBool; safecall;
procedure Set_ForceOldProtocol(pVal: WordBool); safecall;
function Connect: WordBool; safecall;
function Disconnect: WordBool; safecall;
function Get_ControllerVersion: Integer; safecall;
function IsConnected: WordBool; safecall;
function Get_ReconnectInterval: Integer; safecall;
procedure Set_ReconnectInterval(pVal: Integer); safecall;
function JVSetItemActiveState(const bstrItem: WideString; bActive: WordBool): WordBool; safecall;
function JVGetItemActiveState(const bstrItem: WideString): WordBool; safecall;
function SetCallback(nPortAddress: Integer): WordBool; safecall;
function KillCallback(nPortAddress: Integer): WordBool; safecall;
function CallbackReturnLongValue(lValue: Integer; lBlockIndex: Integer): WordBool; safecall;
function CallbackReturnFloatValue(fValue: Single; lBlockIndex: Integer): WordBool; safecall;
function GetIPAddressString(ulIPAddress: LongWord): WideString; safecall;
function GetValueFromBlockString(const bstrBlockString: WideString; nIndex: Integer): WideString; safecall;
procedure DoCleanup; safecall;
function AddDataDumpRange(nType: Integer; dwFirstNumber: LongWord; dwLastNumber: LongWord;
const bstrCommentLine: WideString): WordBool; safecall;
procedure ResetDataDumpRanges; safecall;
function GetNoOfDataDumpRanges: Integer; safecall;
function GetDataDumpRange(nIndex: Integer; out lpnType: Integer; out lpdwFirstNumber: LongWord;
out lpdwLastNumber: LongWord; out pbstrComment: WideString): WordBool; safecall;
function UploadDataDumpFile(const bstrFileName: WideString): WordBool; safecall;
function DownloadDataDumpFile(const bstrFileName: WideString): WordBool; safecall;
function AnalyseDataDumpFile(const bstrFileName: WideString): Integer; safecall;
function Get_FireProgressEvents: WordBool; safecall;
procedure Set_FireProgressEvents(pVal: WordBool); safecall;
function Get_HighBaudrate: Integer; safecall;
procedure Set_HighBaudrate(pVal: Integer); safecall;
function Get_ShowProgressDialog: WordBool; safecall;
procedure Set_ShowProgressDialog(pVal: WordBool); safecall;
function Get_DataDumpTransferFlags: LongWord; safecall;
procedure Set_DataDumpTransferFlags(pVal: LongWord); safecall;
function Get_ProgramTransferFlags: LongWord; safecall;
procedure Set_ProgramTransferFlags(pVal: LongWord); safecall;
function Get_OSUpdateFlags: LongWord; safecall;
procedure Set_OSUpdateFlags(pVal: LongWord); safecall;
function Get_DownloadDataDumpRangesOnly: WordBool; safecall;
procedure Set_DownloadDataDumpRangesOnly(pVal: WordBool); safecall;
function Get_TransferAsynchronously: WordBool; safecall;
procedure Set_TransferAsynchronously(pVal: WordBool); safecall;
function GetDataDumpRangeType(nIndex: Integer): Integer; safecall;
function GetDataDumpRangeStartNumber(nIndex: Integer): LongWord; safecall;
function GetDataDumpRangeEndNumber(nIndex: Integer): LongWord; safecall;
function GetDataDumpRangeComment(nIndex: Integer): WideString; safecall;
function UploadProgramFile(const bstrFileName: WideString): WordBool; safecall;
function DownloadProgramFile(const bstrFileName: WideString): WordBool; safecall;
function SetExtensionInfo(nSlotNumber: Integer; nModuleNumber: Integer; nSlaveNumber: Integer): WordBool; safecall;
procedure ResetExtensionInfo; safecall;
function UpdateOperatingSystem(const bstrFileName: WideString): WordBool; safecall;
function GetExtensionSlotNumber: Integer; safecall;
function GetExtensionModuleNumber: Integer; safecall;
function GetExtensionSlaveNumber: Integer; safecall;
function IsTransferRunning: WordBool; safecall;
function Get_RamFlashExchangeFlags: LongWord; safecall;
procedure Set_RamFlashExchangeFlags(pVal: LongWord); safecall;
function ExchangeRamToFlash: WordBool; safecall;
function ExchangeFlashToRam: WordBool; safecall;
property InterfaceType: IntType read Get_InterfaceType write Set_InterfaceType;
property InterfaceNumber: Integer read Get_InterfaceNumber write Set_InterfaceNumber;
property PortAddress: Integer read Get_PortAddress write Set_PortAddress;
property IPAddress: WideString read Get_IPAddress write Set_IPAddress;
property SendPortNumber: Integer read Get_SendPortNumber write Set_SendPortNumber;
property ReceivePortNumber: Integer read Get_ReceivePortNumber write Set_ReceivePortNumber;
property ControllerType: CtrlType read Get_ControllerType write Set_ControllerType;
property Baudrate: Integer read Get_Baudrate write Set_Baudrate;
property TimeOut: Integer read Get_TimeOut write Set_TimeOut;
property ForceOldProtocol: WordBool read Get_ForceOldProtocol write Set_ForceOldProtocol;
property ControllerVersion: Integer read Get_ControllerVersion;
property ReconnectInterval: Integer read Get_ReconnectInterval write Set_ReconnectInterval;
property FireProgressEvents: WordBool read Get_FireProgressEvents write Set_FireProgressEvents;
property HighBaudrate: Integer read Get_HighBaudrate write Set_HighBaudrate;
property ShowProgressDialog: WordBool read Get_ShowProgressDialog write Set_ShowProgressDialog;
property DataDumpTransferFlags: LongWord read Get_DataDumpTransferFlags write Set_DataDumpTransferFlags;
property ProgramTransferFlags: LongWord read Get_ProgramTransferFlags write Set_ProgramTransferFlags;
property OSUpdateFlags: LongWord read Get_OSUpdateFlags write Set_OSUpdateFlags;
property DownloadDataDumpRangesOnly: WordBool read Get_DownloadDataDumpRangesOnly write Set_DownloadDataDumpRangesOnly;
property TransferAsynchronously: WordBool read Get_TransferAsynchronously write Set_TransferAsynchronously;
property RamFlashExchangeFlags: LongWord read Get_RamFlashExchangeFlags write Set_RamFlashExchangeFlags;
end;

// *********************************************************************//
// DispIntf: IJVJet32XDisp
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {0D9DCFA4-9A1D-11D6-9E19-0050BA6EEA16}
// *********************************************************************//
IJVJet32XDisp = dispinterface
['{0D9DCFA4-9A1D-11D6-9E19-0050BA6EEA16}']
function JVReadTag(const bstrItem: WideString; bNotifyOnChange: WordBool; bAsync: WordBool): WideString; dispid 1;
function JVWriteTag(const bstrItem: WideString; const bstrValue: WideString;
bNotifyOnChange: WordBool; bAsync: WordBool): WordBool; dispid 2;
function JVAddItem(const bstrGroup: WideString; const bstrItem: WideString;
nClientHandle: Integer; bActive: WordBool): WordBool; dispid 3;
function JVRemoveItem(const bstrGroup: WideString; const bstrItem: WideString): WordBool; dispid 4;
function ReadTag(const bstrItem: WideString; bNotifyOnChange: WordBool; bAsync: WordBool): WideString; dispid 5;
function WriteTag(const bstrItem: WideString; const bstrValue: WideString;
bNotifyOnChange: WordBool; bAsync: WordBool): WordBool; dispid 6;
function AddItem(const bstrGroup: WideString; const bstrItem: WideString;
nClientHandle: Integer; bActive: WordBool): WordBool; dispid 7;
function RemoveItem(const bstrGroup: WideString; const bstrItem: WideString): WordBool; dispid 8;
function AddGroup(const bstrGroup: WideString; nReqUpdateTime: Integer; bActive: WordBool): WordBool; dispid 9;
function RemoveGroup(const bstrGroup: WideString): WordBool; dispid 10;
function SetGroupUpdateTime(const bstrGroup: WideString; nReqUpdateTime: Integer): WordBool; dispid 11;
function GetGroupUpdateTime(const bstrGroup: WideString): Integer; dispid 12;
function SetGroupActiveState(const bstrGroup: WideString; bActive: WordBool): WordBool; dispid 13;
function GetGroupActiveState(const bstrGroup: WideString): WordBool; dispid 14;
function MapJVItemToItem(const bstrJVItem: WideString; const bstrItem: WideString): WordBool; dispid 15;
function LoadConfig(const bstrFileName: WideString): WordBool; dispid 16;
function GetErrorDescription(const bstrErrorCode: WideString): WideString; dispid 17;
function GetLastErrorCode: WideString; dispid 18;
property InterfaceType: IntType dispid 19;
property InterfaceNumber: Integer dispid 20;
property PortAddress: Integer dispid 21;
property IPAddress: WideString dispid 22;
property SendPortNumber: Integer dispid 23;
property ReceivePortNumber: Integer dispid 24;
property ControllerType: CtrlType dispid 25;
property Baudrate: Integer dispid 26;
property TimeOut: Integer dispid 27;
property ForceOldProtocol: WordBool dispid 28;
function Connect: WordBool; dispid 29;
function Disconnect: WordBool; dispid 30;
property ControllerVersion: Integer readonly dispid 31;
function IsConnected: WordBool; dispid 32;
property ReconnectInterval: Integer dispid 33;
function JVSetItemActiveState(const bstrItem: WideString; bActive: WordBool): WordBool; dispid 34;
function JVGetItemActiveState(const bstrItem: WideString): WordBool; dispid 35;
function SetCallback(nPortAddress: Integer): WordBool; dispid 36;
function KillCallback(nPortAddress: Integer): WordBool; dispid 37;
function CallbackReturnLongValue(lValue: Integer; lBlockIndex: Integer): WordBool; dispid 38;
function CallbackReturnFloatValue(fValue: Single; lBlockIndex: Integer): WordBool; dispid 39;
function GetIPAddressString(ulIPAddress: LongWord): WideString; dispid 40;
function GetValueFromBlockString(const bstrBlockString: WideString; nIndex: Integer): WideString; dispid 41;
procedure DoCleanup; dispid 42;
function AddDataDumpRange(nType: Integer; dwFirstNumber: LongWord; dwLastNumber: LongWord;
const bstrCommentLine: WideString): WordBool; dispid 43;
procedure ResetDataDumpRanges; dispid 44;
function GetNoOfDataDumpRanges: Integer; dispid 45;
function GetDataDumpRange(nIndex: Integer; out lpnType: Integer; out lpdwFirstNumber: LongWord;
out lpdwLastNumber: LongWord; out pbstrComment: WideString): WordBool; dispid 46;
function UploadDataDumpFile(const bstrFileName: WideString): WordBool; dispid 47;
function DownloadDataDumpFile(const bstrFileName: WideString): WordBool; dispid 48;
function AnalyseDataDumpFile(const bstrFileName: WideString): Integer; dispid 49;
property FireProgressEvents: WordBool dispid 50;
property HighBaudrate: Integer dispid 51;
property ShowProgressDialog: WordBool dispid 52;
property DataDumpTransferFlags: LongWord dispid 53;
property ProgramTransferFlags: LongWord dispid 54;
property OSUpdateFlags: LongWord dispid 55;
property DownloadDataDumpRangesOnly: WordBool dispid 56;
property TransferAsynchronously: WordBool dispid 57;
function GetDataDumpRangeType(nIndex: Integer): Integer; dispid 58;
function GetDataDumpRangeStartNumber(nIndex: Integer): LongWord; dispid 59;
function GetDataDumpRangeEndNumber(nIndex: Integer): LongWord; dispid 60;
function GetDataDumpRangeComment(nIndex: Integer): WideString; dispid 61;
function UploadProgramFile(const bstrFileName: WideString): WordBool; dispid 62;
function DownloadProgramFile(const bstrFileName: WideString): WordBool; dispid 63;
function SetExtensionInfo(nSlotNumber: Integer; nModuleNumber: Integer; nSlaveNumber: Integer): WordBool; dispid 64;
procedure ResetExtensionInfo; dispid 65;
function UpdateOperatingSystem(const bstrFileName: WideString): WordBool; dispid 66;
function GetExtensionSlotNumber: Integer; dispid 67;
function GetExtensionModuleNumber: Integer; dispid 68;
function GetExtensionSlaveNumber: Integer; dispid 69;
function IsTransferRunning: WordBool; dispid 70;
property RamFlashExchangeFlags: LongWord dispid 71;
function ExchangeRamToFlash: WordBool; dispid 72;
function ExchangeFlashToRam: WordBool; dispid 73;
end;


// *********************************************************************//
// OLE Control Proxy class declaration
// Control Name : TJVJet32X
// Help String : JVJet32X Class
// Default Interface: IJVJet32X
// Def. Intf. DISP? : No
// Event Interface: _IJVJet32XEvents
// TypeFlags : (2) CanCreate
// *********************************************************************//
TJVJet32XJVOnDataChange = procedure(ASender: TObject; const bstrItem: WideString;
nClientHandle: Integer;
const bstrValue: WideString) of object;
TJVJet32XJVOnReadAsyncComplete = procedure(ASender: TObject; const bstrItem: WideString;
const bstrValue: WideString;
bError: WordBool) of object;
TJVJet32XJVOnWriteAsyncComplete = procedure(ASender: TObject; const bstrItem: WideString;
bError: WordBool) of object;
TJVJet32XOnDataChange = procedure(ASender: TObject; const bstrItem: WideString;
nClientHandle: Integer;
const bstrValue: WideString) of object;
TJVJet32XOnReadAsyncComplete = procedure(ASender: TObject; const bstrItem: WideString;
const bstrValue: WideString;
bError: WordBool) of object;
TJVJet32XOnWriteAsyncComplete = procedure(ASender: TObject; const bstrItem: WideString;
bError: WordBool) of object;
TJVJet32XOnError = procedure(ASender: TObject; const bstrErrorCode: WideString;
const bstrErrorDescription: WideString) of object;
TJVJet32XOnCallbackRead = procedure(ASender: TObject; nPortAddress: Integer;
dwIPAddress: LongWord; lRegNo: Integer;
lSize: Integer; lBlockMode: Integer) of object;
TJVJet32XOnCallbackWrite = procedure(ASender: TObject; nPortAddress: Integer;
dwIPAddress: LongWord; lRegNo: Integer;
lSize: Integer; lBlockMode: Integer;
const bstrValues: WideString) of object;
TJVJet32XOnDataDumpTransferComplete = procedure(ASender: TObject; bDownload: WordBool;
bError: WordBool) of object;
TJVJet32XOnDataDumpTransferInit = procedure(ASender: TObject; nNumberOfItems: Integer;
const bstrControllerName: WideString;
const bstrInterface: WideString) of object;
TJVJet32XOnDataDumpTransferProgress = procedure(ASender: TObject; nNoOfItemsTransferred: Integer) of object;
TJVJet32XOnDataDumpTransferNewRange = procedure(ASender: TObject; nType: Integer;
nFirstNumber: LongWord;
nLastNumber: LongWord;
const bstrComment: WideString) of object;
TJVJet32XOnProgramTransferComplete = procedure(ASender: TObject; bDownload: WordBool;
bError: WordBool) of object;
TJVJet32XOnProgramTransferInit = procedure(ASender: TObject; nNumberOfBytes: Integer;
const bstrControllerName: WideString;
const bstrInterface: WideString;
const bstrProgramName: WideString;
const bstrProgramDate: WideString;
nProgramVersion: Integer) of object;
TJVJet32XOnProgramTransferProgress = procedure(ASender: TObject; nNoOfBytesTransferred: Integer) of object;
TJVJet32XOnProgramTransferEndDownload = procedure(ASender: TObject; dwElapsedTime: LongWord) of object;
TJVJet32XOnProgrammTransferRamFlashInit = procedure(ASender: TObject; nMaxSteps: Integer) of object;
TJVJet32XOnProgramTransferRamFlashProgress = procedure(ASender: TObject; nNoOfStepsPerformed: Integer) of object;
TJVJet32XOnOsUpdateComplete = procedure(ASender: TObject; bError: WordBool) of object;
TJVJet32XOnOsUpdateInitLoader = procedure(ASender: TObject; nLoaderSize: Integer;
nSystemSize: Integer;
nSlotNumber: Integer;
nModuleNumber: Integer;
nSlaveNumber: Integer;
const bstrControllerName: WideString;
const bstrInterface: WideString) of object;
TJVJet32XOnOsUpdateProgressLoader = procedure(ASender: TObject; nNumberOfKiloBytes: Integer) of object;
TJVJet32XOnOsUpdateEndLoader = procedure(ASender: TObject; nLoaderSize: Integer) of object;
TJVJet32XOnOsUpdateInitSystem = procedure(ASender: TObject; nSystemSize: Integer) of object;
TJVJet32XOnOsUpdateProgressSystem = procedure(ASender: TObject; nNumberOfKiloBytes: Integer) of object;
TJVJet32XOnOsUpdateProgressRamFlash = procedure(ASender: TObject; nNumberOfKiloBytes: Integer) of object;
TJVJet32XOnRamFlashExchangeComplete = procedure(ASender: TObject; nMode: Integer; bError: WordBool) of object;
TJVJet32XOnRamFlashExchangeInit = procedure(ASender: TObject; nNoOfSteps: Integer;
const bstrControllerName: WideString;
const bstrInterface: WideString) of object;
TJVJet32XOnRamFlashExchangeProgress = procedure(ASender: TObject; nNoOfStepsTransferred: Integer) of object;
TJVJet32XOnReconnected = procedure(ASender: TObject; lDownTime: Integer) of object;

TJVJet32X = class(TOleControl)
private
FOnJVOnDataChange: TJVJet32XJVOnDataChange;
FOnJVOnReadAsyncComplete: TJVJet32XJVOnReadAsyncComplete;
FOnJVOnWriteAsyncComplete: TJVJet32XJVOnWriteAsyncComplete;
FOnDataChange: TJVJet32XOnDataChange;
FOnReadAsyncComplete: TJVJet32XOnReadAsyncComplete;
FOnWriteAsyncComplete: TJVJet32XOnWriteAsyncComplete;
FOnError: TJVJet32XOnError;
FOnCallbackRead: TJVJet32XOnCallbackRead;
FOnCallbackWrite: TJVJet32XOnCallbackWrite;
FOnDataDumpTransferComplete: TJVJet32XOnDataDumpTransferComplete;
FOnDataDumpTransferInit: TJVJet32XOnDataDumpTransferInit;
FOnDataDumpTransferProgress: TJVJet32XOnDataDumpTransferProgress;
FOnDataDumpTransferNewRange: TJVJet32XOnDataDumpTransferNewRange;
FOnProgramTransferComplete: TJVJet32XOnProgramTransferComplete;
FOnProgramTransferInit: TJVJet32XOnProgramTransferInit;
FOnProgramTransferProgress: TJVJet32XOnProgramTransferProgress;
FOnProgramTransferEndDownload: TJVJet32XOnProgramTransferEndDownload;
FOnProgrammTransferRamFlashInit: TJVJet32XOnProgrammTransferRamFlashInit;
FOnProgramTransferRamFlashProgress: TJVJet32XOnProgramTransferRamFlashProgress;
FOnOsUpdateComplete: TJVJet32XOnOsUpdateComplete;
FOnOsUpdateInitLoader: TJVJet32XOnOsUpdateInitLoader;
FOnOsUpdateProgressLoader: TJVJet32XOnOsUpdateProgressLoader;
FOnOsUpdateEndLoader: TJVJet32XOnOsUpdateEndLoader;
FOnOsUpdateInitSystem: TJVJet32XOnOsUpdateInitSystem;
FOnOsUpdateProgressSystem: TJVJet32XOnOsUpdateProgressSystem;
FOnOsUpdateProgressRamFlash: TJVJet32XOnOsUpdateProgressRamFlash;
FOnRamFlashExchangeComplete: TJVJet32XOnRamFlashExchangeComplete;
FOnRamFlashExchangeInit: TJVJet32XOnRamFlashExchangeInit;
FOnRamFlashExchangeProgress: TJVJet32XOnRamFlashExchangeProgress;
FOnReconnected: TJVJet32XOnReconnected;
FIntf: IJVJet32X;
function GetControlInterface: IJVJet32X;
protected
procedure CreateControl;
procedure InitControlData; override;
public
function JVReadTag(const bstrItem: WideString; bNotifyOnChange: WordBool; bAsync: WordBool): WideString;
function JVWriteTag(const bstrItem: WideString; const bstrValue: WideString;
bNotifyOnChange: WordBool; bAsync: WordBool): WordBool;
function JVAddItem(const bstrGroup: WideString; const bstrItem: WideString;
nClientHandle: Integer; bActive: WordBool): WordBool;
function JVRemoveItem(const bstrGroup: WideString; const bstrItem: WideString): WordBool;
function ReadTag(const bstrItem: WideString; bNotifyOnChange: WordBool; bAsync: WordBool): WideString;
function WriteTag(const bstrItem: WideString; const bstrValue: WideString;
bNotifyOnChange: WordBool; bAsync: WordBool): WordBool;
function AddItem(const bstrGroup: WideString; const bstrItem: WideString;
nClientHandle: Integer; bActive: WordBool): WordBool;
function RemoveItem(const bstrGroup: WideString; const bstrItem: WideString): WordBool;
function AddGroup(const bstrGroup: WideString; nReqUpdateTime: Integer; bActive: WordBool): WordBool;
function RemoveGroup(const bstrGroup: WideString): WordBool;
function SetGroupUpdateTime(const bstrGroup: WideString; nReqUpdateTime: Integer): WordBool;
function GetGroupUpdateTime(const bstrGroup: WideString): Integer;
function SetGroupActiveState(const bstrGroup: WideString; bActive: WordBool): WordBool;
function GetGroupActiveState(const bstrGroup: WideString): WordBool;
function MapJVItemToItem(const bstrJVItem: WideString; const bstrItem: WideString): WordBool;
function LoadConfig(const bstrFileName: WideString): WordBool;
function GetErrorDescription(const bstrErrorCode: WideString): WideString;
function GetLastErrorCode: WideString;
function Connect: WordBool;
function Disconnect: WordBool;
function IsConnected: WordBool;
function JVSetItemActiveState(const bstrItem: WideString; bActive: WordBool): WordBool;
function JVGetItemActiveState(const bstrItem: WideString): WordBool;
function SetCallback(nPortAddress: Integer): WordBool;
function KillCallback(nPortAddress: Integer): WordBool;
function CallbackReturnLongValue(lValue: Integer; lBlockIndex: Integer): WordBool;
function CallbackReturnFloatValue(fValue: Single; lBlockIndex: Integer): WordBool;
function GetIPAddressString(ulIPAddress: LongWord): WideString;
function GetValueFromBlockString(const bstrBlockString: WideString; nIndex: Integer): WideString;
procedure DoCleanup;
function AddDataDumpRange(nType: Integer; dwFirstNumber: LongWord; dwLastNumber: LongWord;
const bstrCommentLine: WideString): WordBool;
procedure ResetDataDumpRanges;
function GetNoOfDataDumpRanges: Integer;
function GetDataDumpRange(nIndex: Integer; out lpnType: Integer; out lpdwFirstNumber: LongWord;
out lpdwLastNumber: LongWord; out pbstrComment: WideString): WordBool;
function UploadDataDumpFile(const bstrFileName: WideString): WordBool;
function DownloadDataDumpFile(const bstrFileName: WideString): WordBool;
function AnalyseDataDumpFile(const bstrFileName: WideString): Integer;
function GetDataDumpRangeType(nIndex: Integer): Integer;
function GetDataDumpRangeStartNumber(nIndex: Integer): LongWord;
function GetDataDumpRangeEndNumber(nIndex: Integer): LongWord;
function GetDataDumpRangeComment(nIndex: Integer): WideString;
function UploadProgramFile(const bstrFileName: WideString): WordBool;
function DownloadProgramFile(const bstrFileName: WideString): WordBool;
function SetExtensionInfo(nSlotNumber: Integer; nModuleNumber: Integer; nSlaveNumber: Integer): WordBool;
procedure ResetExtensionInfo;
function UpdateOperatingSystem(const bstrFileName: WideString): WordBool;
function GetExtensionSlotNumber: Integer;
function GetExtensionModuleNumber: Integer;
function GetExtensionSlaveNumber: Integer;
function IsTransferRunning: WordBool;
function ExchangeRamToFlash: WordBool;
function ExchangeFlashToRam: WordBool;
property ControlInterface: IJVJet32X read GetControlInterface;
property DefaultInterface: IJVJet32X read GetControlInterface;
property ControllerVersion: Integer index 31 read GetIntegerProp;
published
property Anchors;
property TabStop;
property Align;
property DragCursor;
property DragMode;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property TabOrder;
property Visible;
property OnDragDrop;
property OnDragOver;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnStartDrag;
property InterfaceType: TOleEnum index 19 read GetTOleEnumProp write SetTOleEnumProp stored False;
property InterfaceNumber: Integer index 20 read GetIntegerProp write SetIntegerProp stored False;
property PortAddress: Integer index 21 read GetIntegerProp write SetIntegerProp stored False;
property IPAddress: WideString index 22 read GetWideStringProp write SetWideStringProp stored False;
property SendPortNumber: Integer index 23 read GetIntegerProp write SetIntegerProp stored False;
property ReceivePortNumber: Integer index 24 read GetIntegerProp write SetIntegerProp stored False;
property ControllerType: TOleEnum index 25 read GetTOleEnumProp write SetTOleEnumProp stored False;
property Baudrate: Integer index 26 read GetIntegerProp write SetIntegerProp stored False;
property TimeOut: Integer index 27 read GetIntegerProp write SetIntegerProp stored False;
property ForceOldProtocol: WordBool index 28 read GetWordBoolProp write SetWordBoolProp stored False;
property ReconnectInterval: Integer index 33 read GetIntegerProp write SetIntegerProp stored False;
property FireProgressEvents: WordBool index 50 read GetWordBoolProp write SetWordBoolProp stored False;
property HighBaudrate: Integer index 51 read GetIntegerProp write SetIntegerProp stored False;
property ShowProgressDialog: WordBool index 52 read GetWordBoolProp write SetWordBoolProp stored False;
property DataDumpTransferFlags: Integer index 53 read GetIntegerProp write SetIntegerProp stored False;
property ProgramTransferFlags: Integer index 54 read GetIntegerProp write SetIntegerProp stored False;
property OSUpdateFlags: Integer index 55 read GetIntegerProp write SetIntegerProp stored False;
property DownloadDataDumpRangesOnly: WordBool index 56 read GetWordBoolProp write SetWordBoolProp stored False;
property TransferAsynchronously: WordBool index 57 read GetWordBoolProp write SetWordBoolProp stored False;
property RamFlashExchangeFlags: Integer index 71 read GetIntegerProp write SetIntegerProp stored False;
property OnJVOnDataChange: TJVJet32XJVOnDataChange read FOnJVOnDataChange write FOnJVOnDataChange;
property OnJVOnReadAsyncComplete: TJVJet32XJVOnReadAsyncComplete read FOnJVOnReadAsyncComplete write FOnJVOnReadAsyncComplete;
property OnJVOnWriteAsyncComplete: TJVJet32XJVOnWriteAsyncComplete read FOnJVOnWriteAsyncComplete write FOnJVOnWriteAsyncComplete;
property OnDataChange: TJVJet32XOnDataChange read FOnDataChange write FOnDataChange;
property OnReadAsyncComplete: TJVJet32XOnReadAsyncComplete read FOnReadAsyncComplete write FOnReadAsyncComplete;
property OnWriteAsyncComplete: TJVJet32XOnWriteAsyncComplete read FOnWriteAsyncComplete write FOnWriteAsyncComplete;
property OnError: TJVJet32XOnError read FOnError write FOnError;
property OnCallbackRead: TJVJet32XOnCallbackRead read FOnCallbackRead write FOnCallbackRead;
property OnCallbackWrite: TJVJet32XOnCallbackWrite read FOnCallbackWrite write FOnCallbackWrite;
property OnDataDumpTransferComplete: TJVJet32XOnDataDumpTransferComplete read FOnDataDumpTransferComplete write FOnDataDumpTransferComplete;
property OnDataDumpTransferInit: TJVJet32XOnDataDumpTransferInit read FOnDataDumpTransferInit write FOnDataDumpTransferInit;
property OnDataDumpTransferProgress: TJVJet32XOnDataDumpTransferProgress read FOnDataDumpTransferProgress write FOnDataDumpTransferProgress;
property OnDataDumpTransferNewRange: TJVJet32XOnDataDumpTransferNewRange read FOnDataDumpTransferNewRange write FOnDataDumpTransferNewRange;
property OnProgramTransferComplete: TJVJet32XOnProgramTransferComplete read FOnProgramTransferComplete write FOnProgramTransferComplete;
property OnProgramTransferInit: TJVJet32XOnProgramTransferInit read FOnProgramTransferInit write FOnProgramTransferInit;
property OnProgramTransferProgress: TJVJet32XOnProgramTransferProgress read FOnProgramTransferProgress write FOnProgramTransferProgress;
property OnProgramTransferEndDownload: TJVJet32XOnProgramTransferEndDownload read FOnProgramTransferEndDownload write FOnProgramTransferEndDownload;
property OnProgrammTransferRamFlashInit: TJVJet32XOnProgrammTransferRamFlashInit read FOnProgrammTransferRamFlashInit write FOnProgrammTransferRamFlashInit;
property OnProgramTransferRamFlashProgress: TJVJet32XOnProgramTransferRamFlashProgress read FOnProgramTransferRamFlashProgress write FOnProgramTransferRamFlashProgress;
property OnOsUpdateComplete: TJVJet32XOnOsUpdateComplete read FOnOsUpdateComplete write FOnOsUpdateComplete;
property OnOsUpdateInitLoader: TJVJet32XOnOsUpdateInitLoader read FOnOsUpdateInitLoader write FOnOsUpdateInitLoader;
property OnOsUpdateProgressLoader: TJVJet32XOnOsUpdateProgressLoader read FOnOsUpdateProgressLoader write FOnOsUpdateProgressLoader;
property OnOsUpdateEndLoader: TJVJet32XOnOsUpdateEndLoader read FOnOsUpdateEndLoader write FOnOsUpdateEndLoader;
property OnOsUpdateInitSystem: TJVJet32XOnOsUpdateInitSystem read FOnOsUpdateInitSystem write FOnOsUpdateInitSystem;
property OnOsUpdateProgressSystem: TJVJet32XOnOsUpdateProgressSystem read FOnOsUpdateProgressSystem write FOnOsUpdateProgressSystem;
property OnOsUpdateProgressRamFlash: TJVJet32XOnOsUpdateProgressRamFlash read FOnOsUpdateProgressRamFlash write FOnOsUpdateProgressRamFlash;
property OnRamFlashExchangeComplete: TJVJet32XOnRamFlashExchangeComplete read FOnRamFlashExchangeComplete write FOnRamFlashExchangeComplete;
property OnRamFlashExchangeInit: TJVJet32XOnRamFlashExchangeInit read FOnRamFlashExchangeInit write FOnRamFlashExchangeInit;
property OnRamFlashExchangeProgress: TJVJet32XOnRamFlashExchangeProgress read FOnRamFlashExchangeProgress write FOnRamFlashExchangeProgress;
property OnReconnected: TJVJet32XOnReconnected read FOnReconnected write FOnReconnected;
end;

procedure Register;

resourcestring
dtlServerPage = 'ActiveX';

dtlOcxPage = 'ActiveX';

implementation

uses ComObj;

procedure TJVJet32X.InitControlData;
const
CEventDispIDs: array [0..29] of DWORD = (
$00000001, $00000002, $00000003, $00000004, $00000005, $00000006,
$00000007, $00000008, $00000009, $0000000A, $0000000B, $0000000C,
$0000000D, $0000000E, $0000000F, $00000010, $00000011, $00000012,
$00000013, $00000014, $00000015, $00000016, $00000017, $00000018,
$00000019, $0000001A, $0000001B, $0000001C, $0000001D, $0000001E);
CControlData: TControlData2 = (
ClassID: '{0D9DCFA5-9A1D-11D6-9E19-0050BA6EEA16}';
EventIID: '{0D9DCFA6-9A1D-11D6-9E19-0050BA6EEA16}';
EventCount: 30;
EventDispIDs: @CEventDispIDs;
LicenseKey: nil (*HR:$80004002*);
Flags: $00000000;
Version: 401);
begin
ControlData := @CControlData;
TControlData2(CControlData).FirstEventOfs := Cardinal(@@FOnJVOnDataChange) - Cardinal(Self);
end;

procedure TJVJet32X.CreateControl;

procedure DoCreate;
begin
FIntf := IUnknown(OleObject) as IJVJet32X;
end;

begin
if FIntf = nil then DoCreate;
end;

function TJVJet32X.GetControlInterface: IJVJet32X;
begin
CreateControl;
Result := FIntf;
end;

function TJVJet32X.JVReadTag(const bstrItem: WideString; bNotifyOnChange: WordBool; bAsync: WordBool): WideString;
begin
Result := DefaultInterface.JVReadTag(bstrItem, bNotifyOnChange, bAsync);
end;

function TJVJet32X.JVWriteTag(const bstrItem: WideString; const bstrValue: WideString;
bNotifyOnChange: WordBool; bAsync: WordBool): WordBool;
begin
Result := DefaultInterface.JVWriteTag(bstrItem, bstrValue, bNotifyOnChange, bAsync);
end;

function TJVJet32X.JVAddItem(const bstrGroup: WideString; const bstrItem: WideString;
nClientHandle: Integer; bActive: WordBool): WordBool;
begin
Result := DefaultInterface.JVAddItem(bstrGroup, bstrItem, nClientHandle, bActive);
end;

function TJVJet32X.JVRemoveItem(const bstrGroup: WideString; const bstrItem: WideString): WordBool;
begin
Result := DefaultInterface.JVRemoveItem(bstrGroup, bstrItem);
end;

function TJVJet32X.ReadTag(const bstrItem: WideString; bNotifyOnChange: WordBool; bAsync: WordBool): WideString;
begin
Result := DefaultInterface.ReadTag(bstrItem, bNotifyOnChange, bAsync);
end;

function TJVJet32X.WriteTag(const bstrItem: WideString; const bstrValue: WideString;
bNotifyOnChange: WordBool; bAsync: WordBool): WordBool;
begin
Result := DefaultInterface.WriteTag(bstrItem, bstrValue, bNotifyOnChange, bAsync);
end;

function TJVJet32X.AddItem(const bstrGroup: WideString; const bstrItem: WideString;
nClientHandle: Integer; bActive: WordBool): WordBool;
begin
Result := DefaultInterface.AddItem(bstrGroup, bstrItem, nClientHandle, bActive);
end;

function TJVJet32X.RemoveItem(const bstrGroup: WideString; const bstrItem: WideString): WordBool;
begin
Result := DefaultInterface.RemoveItem(bstrGroup, bstrItem);
end;

function TJVJet32X.AddGroup(const bstrGroup: WideString; nReqUpdateTime: Integer; bActive: WordBool): WordBool;
begin
Result := DefaultInterface.AddGroup(bstrGroup, nReqUpdateTime, bActive);
end;

function TJVJet32X.RemoveGroup(const bstrGroup: WideString): WordBool;
begin
Result := DefaultInterface.RemoveGroup(bstrGroup);
end;

function TJVJet32X.SetGroupUpdateTime(const bstrGroup: WideString; nReqUpdateTime: Integer): WordBool;
begin
Result := DefaultInterface.SetGroupUpdateTime(bstrGroup, nReqUpdateTime);
end;

function TJVJet32X.GetGroupUpdateTime(const bstrGroup: WideString): Integer;
begin
Result := DefaultInterface.GetGroupUpdateTime(bstrGroup);
end;

function TJVJet32X.SetGroupActiveState(const bstrGroup: WideString; bActive: WordBool): WordBool;
begin
Result := DefaultInterface.SetGroupActiveState(bstrGroup, bActive);
end;

function TJVJet32X.GetGroupActiveState(const bstrGroup: WideString): WordBool;
begin
Result := DefaultInterface.GetGroupActiveState(bstrGroup);
end;

function TJVJet32X.MapJVItemToItem(const bstrJVItem: WideString; const bstrItem: WideString): WordBool;
begin
Result := DefaultInterface.MapJVItemToItem(bstrJVItem, bstrItem);
end;

function TJVJet32X.LoadConfig(const bstrFileName: WideString): WordBool;
begin
Result := DefaultInterface.LoadConfig(bstrFileName);
end;

function TJVJet32X.GetErrorDescription(const bstrErrorCode: WideString): WideString;
begin
Result := DefaultInterface.GetErrorDescription(bstrErrorCode);
end;

function TJVJet32X.GetLastErrorCode: WideString;
begin
Result := DefaultInterface.GetLastErrorCode;
end;

function TJVJet32X.Connect: WordBool;
begin
Result := DefaultInterface.Connect;
end;

function TJVJet32X.Disconnect: WordBool;
begin
Result := DefaultInterface.Disconnect;
end;

function TJVJet32X.IsConnected: WordBool;
begin
Result := DefaultInterface.IsConnected;
end;

function TJVJet32X.JVSetItemActiveState(const bstrItem: WideString; bActive: WordBool): WordBool;
begin
Result := DefaultInterface.JVSetItemActiveState(bstrItem, bActive);
end;

function TJVJet32X.JVGetItemActiveState(const bstrItem: WideString): WordBool;
begin
Result := DefaultInterface.JVGetItemActiveState(bstrItem);
end;

function TJVJet32X.SetCallback(nPortAddress: Integer): WordBool;
begin
Result := DefaultInterface.SetCallback(nPortAddress);
end;

function TJVJet32X.KillCallback(nPortAddress: Integer): WordBool;
begin
Result := DefaultInterface.KillCallback(nPortAddress);
end;

function TJVJet32X.CallbackReturnLongValue(lValue: Integer; lBlockIndex: Integer): WordBool;
begin
Result := DefaultInterface.CallbackReturnLongValue(lValue, lBlockIndex);
end;

function TJVJet32X.CallbackReturnFloatValue(fValue: Single; lBlockIndex: Integer): WordBool;
begin
Result := DefaultInterface.CallbackReturnFloatValue(fValue, lBlockIndex);
end;

function TJVJet32X.GetIPAddressString(ulIPAddress: LongWord): WideString;
begin
Result := DefaultInterface.GetIPAddressString(ulIPAddress);
end;

function TJVJet32X.GetValueFromBlockString(const bstrBlockString: WideString; nIndex: Integer): WideString;
begin
Result := DefaultInterface.GetValueFromBlockString(bstrBlockString, nIndex);
end;

procedure TJVJet32X.DoCleanup;
begin
DefaultInterface.DoCleanup;
end;

function TJVJet32X.AddDataDumpRange(nType: Integer; dwFirstNumber: LongWord;
dwLastNumber: LongWord; const bstrCommentLine: WideString): WordBool;
begin
Result := DefaultInterface.AddDataDumpRange(nType, dwFirstNumber, dwLastNumber, bstrCommentLine);
end;

procedure TJVJet32X.ResetDataDumpRanges;
begin
DefaultInterface.ResetDataDumpRanges;
end;

function TJVJet32X.GetNoOfDataDumpRanges: Integer;
begin
Result := DefaultInterface.GetNoOfDataDumpRanges;
end;

function TJVJet32X.GetDataDumpRange(nIndex: Integer; out lpnType: Integer;
out lpdwFirstNumber: LongWord; out lpdwLastNumber: LongWord;
out pbstrComment: WideString): WordBool;
begin
Result := DefaultInterface.GetDataDumpRange(nIndex, lpnType, lpdwFirstNumber, lpdwLastNumber,
pbstrComment);
end;

function TJVJet32X.UploadDataDumpFile(const bstrFileName: WideString): WordBool;
begin
Result := DefaultInterface.UploadDataDumpFile(bstrFileName);
end;

function TJVJet32X.DownloadDataDumpFile(const bstrFileName: WideString): WordBool;
begin
Result := DefaultInterface.DownloadDataDumpFile(bstrFileName);
end;

function TJVJet32X.AnalyseDataDumpFile(const bstrFileName: WideString): Integer;
begin
Result := DefaultInterface.AnalyseDataDumpFile(bstrFileName);
end;

function TJVJet32X.GetDataDumpRangeType(nIndex: Integer): Integer;
begin
Result := DefaultInterface.GetDataDumpRangeType(nIndex);
end;

function TJVJet32X.GetDataDumpRangeStartNumber(nIndex: Integer): LongWord;
begin
Result := DefaultInterface.GetDataDumpRangeStartNumber(nIndex);
end;

function TJVJet32X.GetDataDumpRangeEndNumber(nIndex: Integer): LongWord;
begin
Result := DefaultInterface.GetDataDumpRangeEndNumber(nIndex);
end;

function TJVJet32X.GetDataDumpRangeComment(nIndex: Integer): WideString;
begin
Result := DefaultInterface.GetDataDumpRangeComment(nIndex);
end;

function TJVJet32X.UploadProgramFile(const bstrFileName: WideString): WordBool;
begin
Result := DefaultInterface.UploadProgramFile(bstrFileName);
end;

function TJVJet32X.DownloadProgramFile(const bstrFileName: WideString): WordBool;
begin
Result := DefaultInterface.DownloadProgramFile(bstrFileName);
end;

function TJVJet32X.SetExtensionInfo(nSlotNumber: Integer; nModuleNumber: Integer;
nSlaveNumber: Integer): WordBool;
begin
Result := DefaultInterface.SetExtensionInfo(nSlotNumber, nModuleNumber, nSlaveNumber);
end;

procedure TJVJet32X.ResetExtensionInfo;
begin
DefaultInterface.ResetExtensionInfo;
end;

function TJVJet32X.UpdateOperatingSystem(const bstrFileName: WideString): WordBool;
begin
Result := DefaultInterface.UpdateOperatingSystem(bstrFileName);
end;

function TJVJet32X.GetExtensionSlotNumber: Integer;
begin
Result := DefaultInterface.GetExtensionSlotNumber;
end;

function TJVJet32X.GetExtensionModuleNumber: Integer;
begin
Result := DefaultInterface.GetExtensionModuleNumber;
end;

function TJVJet32X.GetExtensionSlaveNumber: Integer;
begin
Result := DefaultInterface.GetExtensionSlaveNumber;
end;

function TJVJet32X.IsTransferRunning: WordBool;
begin
Result := DefaultInterface.IsTransferRunning;
end;

function TJVJet32X.ExchangeRamToFlash: WordBool;
begin
Result := DefaultInterface.ExchangeRamToFlash;
end;

function TJVJet32X.ExchangeFlashToRam: WordBool;
begin
Result := DefaultInterface.ExchangeFlashToRam;
end;

procedure Register;
begin
RegisterComponents(dtlOcxPage, [TJVJet32X]);
end;

end.
 
楼上才是有心人,真是厉害!
这么多的东东,好多我看不懂呢!我连着PLC呢,试试看吧,谢谢!

最近忙着采购,想买10多台西门子的平板工控机(我们的工程够大的吧),如PC670,不知谁知道哪的经销商价格好一点?
 
对了,直接读PLC有什么好处?我们用的PLC中JETTER的有3台,AB的有两台,直接读岂不是很麻烦?!
 
楼主:
去工控网找一下你要的计算机: http://www.gongkong.com/
来,好东西大家一起分享:
http://www.softwaretoolbox.com/store/ShowTOPServerDemoContents.asp
http://www.toolboxopc.com/Features/Demo/demo.html

还有这个:
http://www.toolboxopc.com/SWTBOPC/swtbopc.html

竟然还有DELPHI的例子,看来DELPHI在国外也流行:
http://www.opcactivex.com/Support/AdditionalExamples/additionalexamples.html
 
点击Component-〉Import Active Control安装JVOpcClient..后就在ActiveX页中出现JVOpcClient控件,通过它来读OPC服务器应该就可以,我还在试验中...
 
没错,正是如此,恭喜楼主总算迈出第一步了!

同喜,我以前在公司的设备科工作,目前在销售公司工作,好久没有玩PLC了.经过这次这么
一折腾,又学到一些新玩意了,谢谢楼主!

其实,如果懂得计算机编程,又懂得PLC,找工作应该没问题的!
 
有人用程序直接控制PLC的吗?(VC/CB/DELPHI/VB/PB等)
 
to 大文:
如果有相应的SDK,那当然可以。
对于Omron这样的小PLC,可以查看它提供的手册(里面有通讯协议),然后进行编程。
 
读写都没问题了,感谢chnplzh的引导!

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
JVOpcClient1.Disconnect;
end;

procedure TForm1.JVOpcClient1DataChange(ASender: TObject;
const sItem: WideString; nClientHandle: Integer;
const sValue: WideString);
begin
edit1.Text := JVOpcClient1.ReadTag('dp.dg.Dt2',false,false);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
JVOpcClient1.Server := 'Jetter.OPCServer.2';
if JVOpcClient1.Connect then showmessage('Server connected');
if JVOpcClient1.AddGroup('dp.dg',500,true) then showmessage('add group ok');
if JVOpcClient1.AddItem('dp.dg','dp.dg.Dt2',JVOpcClient1.Handle) then showmessage('add item ok');
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
JVOpcClient1.WriteTag('dp.dg.Dt2',edit2.Text,false,false);
end;

新的问题是:如果我用这种方式去读别的厂家的PLC是不是可以?也就是说,PLC服务器提供的接口方式是不是都一样的? Server/PLC.Group.Item的方式
 
楼主:
你好好去读一下我前面给你提供的网页。其实,OPC正是这么一个中介机构,通过它来
连接不同厂家提供的PLC的驱动程序,你只要在OPC中设置好了引用,就可以只对OPC操作
来获得对PLC的操作。
难怪现在的PLC一般不直接提供SDK了。
 
to chnplzh:
OPC稳定吗,是免费的还是高额收费的?
 
to 大文:
来,好东西大家一起分享,你也来:
http://www.softwaretoolbox.com/store/ShowTOPServerDemoContents.asp
http://www.toolboxopc.com/Features/Demo/demo.html
http://www.toolboxopc.com/SWTBOPC/swtbopc.html
竟然还有DELPHI的例子,看来DELPHI在国外也流行:
http://www.opcactivex.com/Support/AdditionalExamples/additionalexamples.html
OPC肯定稳定,关键是厂家提供的ActiveX估计要收费。
 
谢谢chnplzh,我已经下了,正在看..
 
忙啊,没空理会了,给了分再说...
 
多人接受答案了。
 
后退
顶部