AdsSyncReadDeviceInfoReq
Delphi 5 Programm
unit frmAdsSyncReadDeviceInfoReqUnit;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, TcAdsDef, TcAdsApi, Buttons, ExtCtrls;
type
TfrmAdsSyncReadDeviceInfoReq = class(TForm)
Label1: TLabel;
BitBtn1: TBitBtn;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Bevel1: TBevel;
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
procedure InitData( destAddr : TAmsAddr );
end;
implementation
{$R *.DFM}
procedure TfrmAdsSyncReadDeviceInfoReq.InitData( destAddr : TAmsAddr);
var result : Longint;
sDevName : AnsiString;
adsDevVersion : TAdsVersion;
begin
SetLength(sDevName, ADS_FIXEDNAMESIZE + 1);
result := AdsSyncReadDeviceInfoReq(@destAddr, @sDevName[1], @adsDevVersion );
Label1.Caption := Format( 'AdsSyncReadDeviceInfoReq() result: %d [0x%x]', [result,result] );
Label2.Caption := Format( 'Device name: %s', [String(sDevName)] );
Label3.Caption := Format( 'Version: %d', [adsDevVersion.Version] );
Label4.Caption := Format( 'Revision: %d', [adsDevVersion.Revision] );
Label5.Caption := Format( 'Build: %d', [adsDevVersion.Build] );
end;
end.
Dokumente hierzu