![](http://s1.manualzz.com/store/data/004193035_1-0bd3c37c086a1c37e45a6e40d2012912-128x128.png)
advertisement
![User Manual HTS Hengstler Terminal Server for Windows | Manualzz User Manual HTS Hengstler Terminal Server for Windows | Manualzz](http://s1.manualzz.com/store/data/004193035_1-0bd3c37c086a1c37e45a6e40d2012912-360x466.png)
OLE
HTS displays each OLE request currently under service in the main window’s column “active DDE connections”. Each new request gets a new sequential number. The examples below show you can implement the OLE interface into your application.
Excel and Visual Basic
The most easy implementation is offered by Visual Basic which belongs to Microsoft Excel. In the example the count value is read from the counter with the logical terminal number 25 and its preset_1 register is set to a value taken from a table cell.
' Logical Counter address
Konst CounterAddress = 25
' Registers of counter
Konst CountValue = 0
Konst Preset1 = 1
Konst Preset2 = 2
Konst Chain = 3
' Buffer variable
Dim Buffer As Single
' Counter value is read an written into table
Sub Read_Counter()
Set Hts = GetObject(Class:="Hengstler.TerminalServer.10")
Result = Hts.ReadRegister(CounterAddress; CountValue)
Sheets("Table1").Cells(6; 2).Value = Result
End Sub
Sub Write_Preset()
Buffer = Sheets("Table1").Cells(2; 2).Value
Set Hts = GetObject(Class:="Hengstler.TerminalServer.10")
Result = Hts.WriteRegister((CounterAddress; Preset1; Buffer)
End Sub
Sub Read_Clear_Counter()
Set Hts = GetObject(Class:="Hengstler.TerminalServer.10")
Result = Hts.ClearRegister(CounterAddress; CountValue)
Sheets("Table1").Cells(6; 2).Value = Result
End Sub
Example: OLE with Visual Basic page 22 HTS for Windows
advertisement
Related manuals
advertisement
Table of contents
- 4 Introduction
- 4 Tasks of HTS
- 5 Compatibility Issues
- 5 Topology
- 6 Installation
- 6 System requirements
- 6 Setup
- 7 Autostart
- 8 Startup
- 9 Primary Startup
- 10 Setup - Driver Settings
- 12 System Topology
- 13 Point-to-point (S), (S1)
- 13 Several Counters via RTC to the PC (N), (N1)
- 14 Terminal Class Definitions
- 16 Terminal Configurations
- 17 Starting HTS
- 19 Integration into Customer Application
- 19 Communication Mechanism
- 19 Schematical Overview: Server Communication
- 19 Command Structure
- 20 Data Exchange with Counters
- 22 Excel and Visual Basic
- 23 C++ Applications
- 25 Tuning
- 26 Diagnostics and Error Handling
- 26 Settings Overview
- 26 hentmsrv.ini
- 26 vt3tm.ini
- 27 vt3c0000.ini
- 27 vt3c0005.ini
- 29 Statistics
- 30 Line Monitor
- 31 Modem Operation
- 31 Connection Setup
- 31 Connection Termination