Beckhoff TwinCAT ®
The Windows Control and Automation Technology
CP9090-S100: ActiveX
Component for CP9030
Last change: 23.01.2001
Eiserstraße 5 / D-33415 Verl / Telefon 05246/963-0 / Telefax 05246/963-149
Contents
CP9090-S100: ActiveX Component for CP9030
1. Overview 5
2. Installation 6
3. Integration in applications 7
Integration in Visual Basic 7
Integration in Visual C++ 8
4. Properties 9
AkkuCharged 9
AkkuCharging 10
AkkuNotPresent 11
3
AkkuVoltageOk 12
AkkuWaiting 13
CnfErr 14
ComErr 15
CycleEnabled 16
CycleInterval 17
DeviceAddr 18
DeviceInfo 20
DeviceOpen 21
DisplayOff 22
EnableUPS 23
ExtVoltageOk 24
IdentSwitch 25
KbdOff 26
KbusErr 27
Led 28
PdCycles 29
PDLenErr 30
PDInWLen 31
PDOutWLen 32
SKey 33
UpsDelay 34
5. Methods 36
AutoCfgPDLenWLen 36
TWIN
CA
4
Eiserstraße 5 / D-33415 Verl / Telefon 05246/963-0 / Telefax 05246/963-149
ReadPhysData 37
WritePhysData 38
Reset 39
TriggerCheckOnChange 40
6. Events 41
SKeyDown 41
SkeyPress 42
SkeyUp 43
OnChangeInImage 44
7. Samples 45
Overview 45
TWIN
CA
Eiserstraße 5 / D-33415 Verl / Telefon 05246/963-0 / Telefax 05246/963-149
1. Overview
The CP9090-S100 ActiveX component serves the purpose to access the Beckhoff CP-Link card CP9030.
Characteristics
• Configuration of Beckhoff CP-Link card CP9030
• Enables access to additional control-devices (e.g. SKeys, LEDs, poti for override...)
• Enables access for locking the CP (e.g. keys, mouse, touch...)
• Enables access of USV signals
Requirements
• Microsoft Windows 9x / Win NT / Win2K
• Please work with current Service Packs.
CP9090-S200 includes...
The install version includes:
• CP9090-S100 ActiveX-component
5
• Documentation (PDF and HTML)
• Demo application
TWIN
CA
6
Eiserstraße 5 / D-33415 Verl / Telefon 05246/963-0 / Telefax 05246/963-149
2. Installation
Start the "SETUP.EXE" program from disk 1/x to install the CP9090-S100 component under Windows 9x / NT.
Files and folders
Following files will be installed / updated
WINDOWS\SYSTEM(32) folder:
• CpLink9x.dll
• Atl.dll
• Ole32.dll
• Oleaut32.dll
• TcMM.sys
• TcMMHelper.dll
• TcW9xMMHelper.dll
WINDOWS\HELP:
• Cp9090-S100.chm
Help
If CP9090-S100 help files appears "empty", please install HTML-HELP-runtime-files by starting "hhupd.exe" file
from the CD first.
It is recommended, that you are familar with Beckhoff CP-card. The CD contains detailed technical information.
Support
in the event of problems/questions, please contact:
Beckhoff Industrie Elektronik
Eiserstr. 5
33415 Verl
Tel: 05246-963-157
Fax: 05246-963-199
Email: mailto:info@beckhoff.com Internet: http://www.beckhoff.com
Please provide a detailed decription of the error as well as information abaout the operation system (Win9x,
NTx Service Packs), and the language selected (german, english), etc.
You will find the version number of the CP9090-S100 component in the 'Properties menu' of the CpLink9x.dll
file.
TWIN
CA
Eiserstraße 5 / D-33415 Verl / Telefon 05246/963-0 / Telefax 05246/963-149
3. Integration in applications
Integration in Visual Basic
CP9090-S100 ActiveX component can be used in Visual Basic. To do this, select the "Components.." command
under the "Project' menu item in Visual Basic and mark the 'Beckhoff CpLinkW9x x.x Type Library'' entry.
7
CP9090-S100 ActiveX component the appears in the Visual Basic toolbox.
TWIN
CA
8
Eiserstraße 5 / D-33415 Verl / Telefon 05246/963-0 / Telefax 05246/963-149
Integration in Visual C++
Under construction
TWIN
CA
4. Properties
AkkuCharged
Returns the status of the USV.
HRESULT AkkuCharged(
[out, retval] VARIANT_BOOL* pVal
);
Parameters
pVal
[out, retval]
TRUE if Akku charged. FALSE if not.
Comments
Property is "Read only"
Eiserstraße 5 / D-33415 Verl / Telefon 05246/963-0 / Telefax 05246/963-149
9
Sample VB-Syntax
Dim bAkkuCharged as Boolean
bAkkuCharged = CP9030W9x1.AkkuCharged
TWIN
CA
10
Eiserstraße 5 / D-33415 Verl / Telefon 05246/963-0 / Telefax 05246/963-149
AkkuCharging
Returns the status of the USV.
HRESULT AkkuCharging(
[out, retval] VARIANT_BOOL* pVal
);
Parameter
pVal
[out, retval]
TRUE if Akku charging. FALSE if not.
Comments
Property is "Read only"
Sample VB-Syntax
Dim bAkkuCharging as Boolean
bAkkuCharging = CP9030W9x1.AkkuCharging
TWIN
CA
Eiserstraße 5 / D-33415 Verl / Telefon 05246/963-0 / Telefax 05246/963-149
AkkuNotPresent
Returns the status of the USV.
HRESULT AkkuNotPresent(
[out, retval] VARIANT_BOOL* pVal
);
Parameters
pVal
[out, retval]
TRUE if not present. FALSE if present
Comments
Property is "Read only"
Sample VB-Syntax
Dim bAkkuNotPresent as Boolean
bAkkuNotPresent = CP9030W9x1.AkkuNotPresent
11
TWIN
CA
12
Eiserstraße 5 / D-33415 Verl / Telefon 05246/963-0 / Telefax 05246/963-149
AkkuVoltageOk
Returns the status of the USV.
HRESULT AkkuVoltageOk(
[out, retval] VARIANT_BOOL* pVal
);
Parameter
pVal
[out, retval]
TRUE if voltage Ok. FALSE if not.
Comments
Property is "Read only"
Sample VB-Syntax
Dim bAkkuVoltageOk as Boolean
bAkkuVoltageOk = CP9030W9x1.AkkuVoltageOk
TWIN
CA
Eiserstraße 5 / D-33415 Verl / Telefon 05246/963-0 / Telefax 05246/963-149
AkkuWaiting
Returns the status of the USV charger.
HRESULT AkkuWaiting(
[out, retval] VARIANT_BOOL* pVal
);
Parameter
pVal
[out, retval]
TRUE or FALSE
Comments
Property is "Read only"
Sample VB-Syntax
Dim bAkkuWaiting as Boolean
bAkkuWaiting = CP9030W9x1.AkkuWaiting
13
TWIN
CA
14
Eiserstraße 5 / D-33415 Verl / Telefon 05246/963-0 / Telefax 05246/963-149
CnfErr
Returns the status of the CP configuration.
HRESULT CnfErr(
[out, retval] VARIANT_BOOL* pVal
);
Parameters
pVal
[out, retval]
TRUE or FALSE
Comments
Property is "Read only"
Sample VB-Syntax
Dim bCnfErr as Boolean
bCnfErr = CP9030W9x1.CnfErr
TWIN
CA