beautypg.com

VEGA VEGASCAN 850 VEGA-ASCII signal output User Manual

Page 17

background image

VEGA-ASCII signal output VEGASCAN 850

17

Example program for enquiry VEGASCAN 850

5 Example program for enquiry VEGASCAN 850

(VISUAL BASIC 4.0)

VEGAASCII.VBP

Form=vegaascii.frm

Object={648A5603-2C6E-101B-82B6-

000000000014}#1.1#0; MSCOMM32.OCX

ProjWinSize=168,207,248,215

ProjWinShow=2

IconForm="ASCDEMO"

HelpFile=""

Command=""

Name="ASCII"

HelpContextID="0"

StartMode=0

VersionCompatible32="0"

VersionCompatible="0"

MajorVer=1

MinorVer=0

RevisionVer=0

AutoIncrementVer=0

ServerSupportFiles=0

VersionCompanyName=" "

VERSION 4.00

Begin VB.Form ASCDEMO

Caption = "VEGA ASCII DEMO"

ClientHeight = 7095

ClientLeft = 60

ClientTop = 345

ClientWidth = 9480

Height = 7500

Left = 0

LinkTopic = "Form2"

ScaleHeight = 473

ScaleMode = 3 'Pixel

ScaleWidth = 632

Top = 0

Width = 9600

Begin VB.ListBox List1

Height = 6105

Left = 150

TabIndex = 2

Top = 270

Width = 8985

End

Begin VB.Timer Timer

Enabled = 0 'False

Interval = 100

Left = 720

Top = 6510

End

Begin VB.CommandButton Ende

Cancel = -1 'True

Caption = "Exit"

Height = 405

Left = 2520

TabIndex = 1

Top = 6570

Width = 1395

End

Begin VB.CommandButton Run

Caption = "&Start"

Default = -1 'True

Height = 405

Left = 4350

TabIndex = 0

Tag = "0"

Top = 6570

Width = 1425

End

Begin VB.Shape Led

FillColor = &H0000FF00&

FillStyle = 0 'Solid

Height = 165

Left = 390

Top = 6570

Width = 135

End

Begin MSCommLib.MSComm MSComm

Left = 1200

Top = 6510

_ExtentX = 1005

_ExtentY = 1005

_Version = 327680

DTREnable = 0 'False

InBufferSize = 512

InputLen = 200

OutBufferSize = 100

RThreshold = 1

SThreshold = 1

EOFEnable = -1 'True

End

End

Attribute VB_Name = "ASCDEMO"

Attribute VB_Creatable = False

Attribute VB_Exposed = False

'-------------------------------------------

' ASCDEMO.FRM

' Copyright (c) 1999 VEGA

' by Gros Thoms

'-------------------------------------------

Option Explicit

' Speicher fuer den Empfang

Dim ReceiveBuffer As String

' Fehlerzaehler

Dim InAction As Integer

' Speicher fuer die Werte und den Status

Dim Status(255) As Integer

Dim PLS(255) As Long

' Start und Ende

Dim StartIndex As Integer

Dim LenIndex As Integer

Private Sub Ende_Click()

' Programm beenden

Unload Me

End Sub