Parameters, Comment, Sample vb-syntax – BECKHOFF CP9090-S100 User Manual

Page 38: Writephysdata, Twin cat

Advertising
background image

Eiserstraße 5 / D-33415 Verl / Telefon 05246/963-0 / Telefax 05246/963-149

38

TWIN

CAT

WritePhysData

Setss the value in DP-Ram of CP9030.
Use this methode to access additional devices e.g. Poti.

HRESULT WritePhysData(

[in] long PhysOffset,

[in, out] VARIANT* pData

);

Parameters

PhysOffset

[in]
Offset in DPRam (Input: 0x0000 .. 0x00FF)

pData

[in, out]
Databuffer, following variant-types are implemented:
(VT_BYREF und VT_UI1)
(VT_BYREF und VT_I2)
(VT_BYREF und VT_I4)
(VT_BYREF und VT_R4)
(VT_BYREF und VT_R8)

Comment

You should be familiar with DP-Ram of CP9030 !!

Sample VB-Syntax

Dim iData as Integer
Dim lData as Long
Dim bData as Byte
call CP9030W9x1.WritePhysData(&H0&, lData)' Write 4 bytes
call CP9030W9x1.WritePhysData(&H0&, iData)' Write 2 bytes
call CP9030W9x1.WritePhysData(&H0&, bData)' Write 1 bytes

Advertising