Prodave Under Visual Basic (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.3 PRODAVE under Visual Basic (32-Bit) Example

To enable you to use the PRODAVE functions under Visual-Basic, they must
be declared as follows:
Declare Function load_tool Lib "w95_s7.dll" (ByVal nr As Byte,
Declare Function db_read Lib "w95_s7" ( ByVal dbno As Long,
Declare Function unload_tool Lib "w95_s7" () s Long
Example:
Dim dbno As Long, dwno As Long, amount As Long
Dim buffer(50) As Integer
Type plcadrtype
adr As Byte
SEGMENTID As Byte
SLOTNO As Byte
RACKNO As Byte
End Type
Dim plcadr (5) As plcadrtype
plcadr(0).adr = 2
plcadr(0).SEGMENTID = 0
plcadr(0).SLOTNO = 2
plcadr(0).RACKNO = 0
plcadr(1).adr = 0
res = load_tool (1, "S7ONLINE", plcadr)
res = db_read (dbno, dwno, amount, buffer(0))
res = unload_tool()
Toolbox for Data Link PGs/PCs to SIMATIC S7
ByVal dev As String,
adr As plcadrtype) As Long
ByVal dwno As Long,
amount As Long,
buffer%) As Long
15
PRODAVE S7

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents