Linking To Standard Tools; Prodave Under Delphi (32-Bit) Example - Siemens SIMATIC S7 Operating Instructions Manual

Prodave s7 v5.5 toolbox for windows 95/98/nt/me/2000 applications for a data link of pgs/pcs to simatic s7 via mpi interface and pc/mpi cable
Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

SIEMENS AG

3.5 Linking to Standard Tools

3.5.1 PRODAVE under Delphi (32-Bit) Example

To enable you to use the PRODAVE functions under Delphi, they must be
declared as follows:
function Load_tool ( no:Byte;
stdcall;
external ´w95_s7.dll´ name ´load_tool´;
function DB_read ( dbno: longint;
stdcall;
external ´w95_s7.dll´ name ´db_read´;
function Unload_tool: longint;
stdcall;
external ´w95_s7.dll´ name ´unload_tool´;
Example:
var
plc_adr_table : array [0..15] of byte;
name:array[0..255] of char;
res ,amount: longint;
buffer : array[0..255] of word;
plc_adr_table[0] := 2;
plc_adr_table[1] := 0;
plc_adr_table[2] := 2;
plc_adr_table[3] := 0;
plc_adr_table[4] := 0;
strcopy(name,'S7ONLINE');
res := Load_tool(1,addr(name),addr(plc_adr_table[0]));
res := DB_read(10,0,amount,buffer);
res := Unload_tool;
Toolbox for Data Link PGs/PCs to SIMATIC S7
name: {pointer} PChar;
adr:{pointer} PChar): longint;
dwno: longint;
var amount: longint;
var buffer): longint
{address}
{segment id}
{racktno}
{slotno}
13
PRODAVE S7

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents