VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "comctl32.ocx"
Begin VB.Form Form1 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "SMC terminal ver.:2.0 (Zoli'Soft)"
   ClientHeight    =   7710
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   12885
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   7710
   ScaleWidth      =   12885
   StartUpPosition =   2  'CenterScreen
   Begin VB.Frame Frame2 
      Caption         =   "Motor teszt"
      Height          =   4815
      Left            =   10200
      TabIndex        =   45
      Top             =   120
      Width           =   2535
      Begin VB.OptionButton Option3 
         Caption         =   "Option3"
         Height          =   255
         Left            =   1200
         TabIndex        =   77
         Top             =   240
         Visible         =   0   'False
         Width           =   855
      End
      Begin VB.OptionButton Option2 
         Caption         =   "-"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   12
            Charset         =   238
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   1920
         TabIndex        =   67
         Top             =   2400
         Width           =   375
      End
      Begin VB.OptionButton Option1 
         Caption         =   "+"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   12
            Charset         =   238
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   1440
         TabIndex        =   66
         Top             =   2400
         Value           =   -1  'True
         Width           =   495
      End
      Begin VB.CommandButton Command34 
         Caption         =   "STOP"
         BeginProperty Font 
            Name            =   "Microsoft Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   240
         TabIndex        =   62
         Top             =   3360
         Width           =   2055
      End
      Begin VB.HScrollBar HScroll2 
         Height          =   375
         LargeChange     =   10
         Left            =   240
         Max             =   100
         TabIndex        =   61
         Top             =   4200
         Value           =   10
         Width           =   2055
      End
      Begin VB.CommandButton Command32 
         Caption         =   " PID szabályozott futás"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   240
         TabIndex        =   59
         Top             =   1080
         Width           =   2055
      End
      Begin VB.CommandButton Command31 
         Caption         =   "Feszültségvezérelt futás"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   240
         TabIndex        =   58
         Top             =   480
         Width           =   2055
      End
      Begin VB.CommandButton Command28 
         Caption         =   "Léptetés P0 sebességen"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   240
         TabIndex        =   57
         Top             =   1680
         Width           =   2055
      End
      Begin VB.TextBox Text9 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   1440
         MaxLength       =   4
         TabIndex        =   56
         Text            =   "1000"
         Top             =   2880
         Width           =   855
      End
      Begin VB.CommandButton Command33 
         Caption         =   "Léptetés mód"
         Height          =   255
         Left            =   600
         TabIndex        =   60
         Top             =   840
         Visible         =   0   'False
         Width           =   1455
      End
      Begin VB.Label Label14 
         BackStyle       =   0  'Transparent
         Caption         =   "ford\perc"
         Height          =   255
         Left            =   1320
         TabIndex        =   73
         Top             =   3960
         Visible         =   0   'False
         Width           =   975
      End
      Begin VB.Label Label13 
         BackStyle       =   0  'Transparent
         Caption         =   "10"
         Height          =   255
         Left            =   360
         TabIndex        =   68
         Top             =   3840
         Visible         =   0   'False
         Width           =   495
      End
      Begin VB.Label Label12 
         BackStyle       =   0  'Transparent
         Caption         =   "Lépés iránya :"
         Height          =   255
         Left            =   240
         TabIndex        =   65
         Top             =   2400
         Width           =   975
      End
      Begin VB.Label Label11 
         BackStyle       =   0  'Transparent
         Caption         =   "Lépés száma :"
         Height          =   375
         Left            =   240
         TabIndex        =   64
         Top             =   2880
         Width           =   1215
      End
      Begin VB.Label Label9 
         BackStyle       =   0  'Transparent
         Caption         =   "Fordulatszám "
         Height          =   255
         Left            =   240
         TabIndex        =   63
         Top             =   3960
         Width           =   1095
      End
   End
   Begin VB.Frame Frame3 
      Caption         =   "SMCparam filében tárolt paraméterek"
      Height          =   2175
      Left            =   120
      TabIndex        =   70
      Top             =   5040
      Width           =   12615
      Begin VB.CommandButton Command38 
         Caption         =   "Command38"
         Height          =   255
         Left            =   8760
         TabIndex        =   82
         Top             =   1080
         Visible         =   0   'False
         Width           =   1215
      End
      Begin VB.CommandButton Command37 
         Caption         =   "Paraméterlista mentése filébe"
         Height          =   495
         Left            =   8760
         TabIndex        =   75
         Top             =   1320
         Visible         =   0   'False
         Width           =   1215
      End
      Begin VB.CommandButton Command36 
         Caption         =   "Paraméterek betöltése"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   10320
         TabIndex        =   74
         Top             =   240
         Width           =   2055
      End
      Begin VB.CommandButton Command29 
         Caption         =   "Paraméterlista frissítése"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   10320
         TabIndex        =   71
         Top             =   1440
         Width           =   2055
      End
      Begin VB.ListBox List1 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1740
         Left            =   240
         TabIndex        =   72
         Top             =   240
         Width           =   9495
      End
      Begin VB.CommandButton Command30 
         Caption         =   "Paraméterek törlése"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   10320
         TabIndex        =   78
         Top             =   840
         Width           =   2055
      End
   End
   Begin ComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   44
      Top             =   7335
      Width           =   12885
      _ExtentX        =   22728
      _ExtentY        =   661
      SimpleText      =   ""
      _Version        =   327682
      BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7} 
         NumPanels       =   2
         BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
            Object.Width           =   5292
            MinWidth        =   5292
            Text            =   "Port beállítás : COM1,38400,N,8,1"
            TextSave        =   "Port beállítás : COM1,38400,N,8,1"
            Key             =   ""
            Object.Tag             =   ""
            Object.ToolTipText     =   "COM port beállítása"
         EndProperty
         BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
            AutoSize        =   1
            Object.Width           =   17357
            Picture         =   "Form1.frx":0442
            Text            =   "Segítség helye ..."
            TextSave        =   "Segítség helye ..."
            Key             =   ""
            Object.Tag             =   ""
            Object.ToolTipText     =   "Online segítség"
         EndProperty
      EndProperty
   End
   Begin VB.Frame Frame1 
      Caption         =   "Mikrokontroller paraméterek módosítása"
      Height          =   4815
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   9975
      Begin VB.HScrollBar HScroll10 
         Height          =   255
         LargeChange     =   10
         Left            =   3960
         Max             =   5000
         TabIndex        =   90
         Top             =   3000
         Value           =   1
         Width           =   2415
      End
      Begin VB.HScrollBar HScroll9 
         Height          =   255
         LargeChange     =   10
         Left            =   3960
         Max             =   4096
         TabIndex        =   89
         Top             =   2640
         Value           =   256
         Width           =   2415
      End
      Begin VB.HScrollBar HScroll8 
         Height          =   255
         LargeChange     =   10
         Left            =   3960
         Max             =   10000
         TabIndex        =   88
         Top             =   2280
         Value           =   1
         Width           =   2415
      End
      Begin VB.HScrollBar HScroll7 
         Height          =   255
         LargeChange     =   10
         Left            =   3960
         Max             =   1000
         TabIndex        =   87
         Top             =   1920
         Value           =   1
         Width           =   2415
      End
      Begin VB.HScrollBar HScroll6 
         Height          =   255
         LargeChange     =   10
         Left            =   3960
         Max             =   1000
         TabIndex        =   86
         Top             =   1560
         Value           =   1
         Width           =   2415
      End
      Begin VB.HScrollBar HScroll5 
         Height          =   255
         LargeChange     =   10
         Left            =   3960
         Max             =   10000
         TabIndex        =   85
         Top             =   1200
         Value           =   1
         Width           =   2415
      End
      Begin VB.HScrollBar HScroll4 
         Height          =   255
         LargeChange     =   10
         Left            =   3960
         Max             =   20000
         TabIndex        =   84
         Top             =   840
         Value           =   1
         Width           =   2415
      End
      Begin VB.HScrollBar HScroll3 
         Height          =   255
         LargeChange     =   10
         Left            =   3960
         Max             =   1000
         TabIndex        =   83
         Top             =   480
         Value           =   1
         Width           =   2415
      End
      Begin VB.CommandButton Command35 
         Caption         =   "Töröl"
         Height          =   375
         Left            =   720
         TabIndex        =   79
         Top             =   3480
         Visible         =   0   'False
         Width           =   1695
      End
      Begin VB.TextBox txtelkuld 
         Height          =   285
         Left            =   7560
         TabIndex        =   76
         Text            =   "Text19"
         Top             =   120
         Visible         =   0   'False
         Width           =   2175
      End
      Begin VB.CheckBox Check1 
         Caption         =   "Kiválasztás esetén a scroll bar értékét az aktív boxba és microcontrollerbe azonnal elküldöd teszt módban."
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   255
         Left            =   240
         TabIndex        =   69
         Top             =   4320
         Visible         =   0   'False
         Width           =   9495
      End
      Begin VB.CommandButton Command27 
         Caption         =   "P0-P7 TESZT"
         BeginProperty Font 
            Name            =   "Microsoft Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   7680
         TabIndex        =   55
         Top             =   3360
         Width           =   975
      End
      Begin VB.CommandButton Command26 
         Caption         =   "P7-MENT"
         Height          =   255
         Left            =   8760
         TabIndex        =   54
         Top             =   3000
         Width           =   975
      End
      Begin VB.CommandButton Command25 
         Caption         =   "P6-MENT"
         Height          =   255
         Left            =   8760
         TabIndex        =   53
         Top             =   2640
         Width           =   975
      End
      Begin VB.CommandButton Command24 
         Caption         =   "P5-MENT"
         Height          =   255
         Left            =   8760
         TabIndex        =   52
         Top             =   2280
         Width           =   975
      End
      Begin VB.CommandButton Command23 
         Caption         =   "P4-MENT"
         Height          =   255
         Left            =   8760
         TabIndex        =   51
         Top             =   1920
         Width           =   975
      End
      Begin VB.CommandButton Command22 
         Caption         =   "P3-MENT"
         Height          =   255
         Left            =   8760
         TabIndex        =   50
         Top             =   1560
         Width           =   975
      End
      Begin VB.CommandButton Command21 
         Caption         =   "P2-MENT"
         Height          =   255
         Left            =   8760
         TabIndex        =   49
         Top             =   1200
         Width           =   975
      End
      Begin VB.CommandButton Command2 
         Caption         =   "P1-MENT"
         Height          =   255
         Left            =   8760
         TabIndex        =   48
         Top             =   840
         Width           =   975
      End
      Begin VB.HScrollBar HScroll1 
         Height          =   375
         LargeChange     =   10
         Left            =   7560
         Max             =   9999
         Min             =   1
         TabIndex        =   46
         Tag             =   "asd"
         Top             =   3960
         Value           =   1
         Visible         =   0   'False
         Width           =   2175
      End
      Begin VB.CommandButton Command20 
         Caption         =   "P0-P7 MENT"
         BeginProperty Font 
            Name            =   "Microsoft Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   8760
         TabIndex        =   43
         Top             =   3360
         Width           =   975
      End
      Begin VB.CommandButton Command19 
         Caption         =   "P7-TESZT"
         Height          =   255
         Left            =   7680
         TabIndex        =   42
         Top             =   3000
         Width           =   975
      End
      Begin VB.CommandButton Command18 
         Caption         =   "P6-TESZT"
         Height          =   255
         Left            =   7680
         TabIndex        =   41
         Top             =   2640
         Width           =   975
      End
      Begin VB.CommandButton Command17 
         Caption         =   "P5-TESZT"
         Height          =   255
         Left            =   7680
         TabIndex        =   40
         Top             =   2280
         Width           =   975
      End
      Begin VB.CommandButton Command16 
         Caption         =   "P4-TESZT"
         Height          =   255
         Left            =   7680
         TabIndex        =   39
         Top             =   1920
         Width           =   975
      End
      Begin VB.CommandButton Command15 
         Caption         =   "P3-TESZT"
         Height          =   255
         Left            =   7680
         TabIndex        =   38
         Top             =   1560
         Width           =   975
      End
      Begin VB.CommandButton Command14 
         Caption         =   "P2-TESZT"
         Height          =   255
         Left            =   7680
         TabIndex        =   37
         Top             =   1200
         Width           =   975
      End
      Begin VB.CommandButton Command13 
         Caption         =   "P1-TESZT"
         Height          =   255
         Left            =   7680
         TabIndex        =   36
         Top             =   840
         Width           =   975
      End
      Begin VB.CommandButton Command1 
         Caption         =   "P0-TESZT"
         Height          =   255
         Left            =   7680
         TabIndex        =   35
         Top             =   480
         Width           =   975
      End
      Begin VB.TextBox Text17 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   6600
         Locked          =   -1  'True
         MaxLength       =   5
         TabIndex        =   34
         Top             =   3000
         Width           =   975
      End
      Begin VB.TextBox Text16 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   6600
         Locked          =   -1  'True
         MaxLength       =   5
         TabIndex        =   33
         Top             =   2640
         Width           =   975
      End
      Begin VB.TextBox Text15 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   6600
         Locked          =   -1  'True
         MaxLength       =   5
         TabIndex        =   32
         Top             =   2280
         Width           =   975
      End
      Begin VB.TextBox Text14 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   6600
         Locked          =   -1  'True
         MaxLength       =   5
         TabIndex        =   31
         Top             =   1920
         Width           =   975
      End
      Begin VB.TextBox Text13 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   6600
         Locked          =   -1  'True
         MaxLength       =   5
         TabIndex        =   30
         Top             =   1560
         Width           =   975
      End
      Begin VB.TextBox Text12 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   6600
         Locked          =   -1  'True
         MaxLength       =   5
         TabIndex        =   29
         Top             =   1200
         Width           =   975
      End
      Begin VB.TextBox Text11 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   6600
         Locked          =   -1  'True
         MaxLength       =   5
         TabIndex        =   28
         Top             =   840
         Width           =   975
      End
      Begin VB.TextBox Text10 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFFF&
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   6600
         Locked          =   -1  'True
         MaxLength       =   5
         TabIndex        =   27
         Top             =   480
         Width           =   975
      End
      Begin VB.TextBox Text1 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   2760
         Locked          =   -1  'True
         MouseIcon       =   "Form1.frx":075C
         MousePointer    =   99  'Custom
         TabIndex        =   18
         Top             =   480
         Width           =   975
      End
      Begin VB.TextBox Text2 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   2760
         Locked          =   -1  'True
         MouseIcon       =   "Form1.frx":0B9E
         MousePointer    =   99  'Custom
         TabIndex        =   17
         Top             =   840
         Width           =   975
      End
      Begin VB.TextBox Text3 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   2760
         Locked          =   -1  'True
         MouseIcon       =   "Form1.frx":0FE0
         MousePointer    =   99  'Custom
         TabIndex        =   16
         Top             =   1200
         Width           =   975
      End
      Begin VB.TextBox Text4 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   2760
         Locked          =   -1  'True
         MouseIcon       =   "Form1.frx":1422
         MousePointer    =   99  'Custom
         TabIndex        =   15
         Top             =   1560
         Width           =   975
      End
      Begin VB.TextBox Text5 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   2760
         Locked          =   -1  'True
         MouseIcon       =   "Form1.frx":1864
         MousePointer    =   99  'Custom
         TabIndex        =   14
         Top             =   1920
         Width           =   975
      End
      Begin VB.TextBox Text6 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   2760
         Locked          =   -1  'True
         MouseIcon       =   "Form1.frx":1CA6
         MousePointer    =   99  'Custom
         TabIndex        =   13
         Top             =   2280
         Width           =   975
      End
      Begin VB.TextBox Text7 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   2760
         Locked          =   -1  'True
         MouseIcon       =   "Form1.frx":20E8
         MousePointer    =   99  'Custom
         TabIndex        =   12
         Top             =   2640
         Width           =   975
      End
      Begin VB.TextBox Text8 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   2760
         Locked          =   -1  'True
         MouseIcon       =   "Form1.frx":252A
         MousePointer    =   99  'Custom
         TabIndex        =   11
         Top             =   3000
         Width           =   975
      End
      Begin VB.CommandButton Command3 
         Caption         =   "P0-P7 KIOLVAS"
         BeginProperty Font 
            Name            =   "Microsoft Sans Serif"
            Size            =   8.25
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   2760
         TabIndex        =   10
         Top             =   3360
         Width           =   975
      End
      Begin VB.CommandButton Command4 
         Caption         =   "P0 Kiolvas"
         Height          =   255
         Left            =   1560
         TabIndex        =   9
         Top             =   480
         Visible         =   0   'False
         Width           =   975
      End
      Begin VB.CommandButton Command5 
         Caption         =   "P1 Kiolvas"
         Height          =   255
         Left            =   1560
         TabIndex        =   8
         Top             =   840
         Visible         =   0   'False
         Width           =   975
      End
      Begin VB.CommandButton Command6 
         Caption         =   "P2 Kiolvas"
         Height          =   255
         Left            =   1560
         TabIndex        =   7
         Top             =   1200
         Visible         =   0   'False
         Width           =   975
      End
      Begin VB.CommandButton Command7 
         Caption         =   "P3 Kiolvas"
         Height          =   255
         Left            =   1560
         TabIndex        =   6
         Top             =   1560
         Visible         =   0   'False
         Width           =   975
      End
      Begin VB.CommandButton Command8 
         Caption         =   "P4 Kiolvas"
         Height          =   255
         Left            =   1560
         TabIndex        =   5
         Top             =   1920
         Visible         =   0   'False
         Width           =   975
      End
      Begin VB.CommandButton Command9 
         Caption         =   "P5 Kiolvas"
         Height          =   255
         Left            =   1560
         TabIndex        =   4
         Top             =   2280
         Visible         =   0   'False
         Width           =   975
      End
      Begin VB.CommandButton Command10 
         Caption         =   "P6 Kiolvas"
         Height          =   255
         Left            =   1560
         TabIndex        =   3
         Top             =   2640
         Visible         =   0   'False
         Width           =   975
      End
      Begin VB.CommandButton Command11 
         Caption         =   "P7 Kiolvas"
         Height          =   255
         Left            =   1560
         TabIndex        =   2
         Top             =   3000
         Visible         =   0   'False
         Width           =   975
      End
      Begin VB.CommandButton Command12 
         Caption         =   "P0-MENT"
         Height          =   255
         Left            =   8760
         TabIndex        =   1
         Top             =   480
         Width           =   975
      End
      Begin VB.Label Label16 
         BackStyle       =   0  'Transparent
         Caption         =   "Új értékek"
         Height          =   255
         Left            =   6600
         TabIndex        =   81
         Top             =   240
         Width           =   2175
      End
      Begin VB.Label Label15 
         BackStyle       =   0  'Transparent
         Caption         =   "Aktuális értékek"
         Height          =   255
         Left            =   2760
         TabIndex        =   80
         Top             =   240
         Width           =   1215
      End
      Begin VB.Label Label10 
         BackStyle       =   0  'Transparent
         Caption         =   "?"
         Height          =   255
         Left            =   6720
         TabIndex        =   47
         Top             =   3960
         Visible         =   0   'False
         Width           =   1095
      End
      Begin VB.Label Label8 
         BackStyle       =   0  'Transparent
         Caption         =   "P7 - ( D gain )"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   26
         Top             =   3000
         Width           =   2535
      End
      Begin VB.Label Label7 
         BackStyle       =   0  'Transparent
         Caption         =   "P6 - ( Gear ratio )"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   25
         Top             =   2640
         Width           =   2895
      End
      Begin VB.Label Label6 
         BackStyle       =   0  'Transparent
         Caption         =   "P5 - ( EMF )"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   24
         Top             =   2280
         Width           =   3255
      End
      Begin VB.Label Label5 
         BackStyle       =   0  'Transparent
         Caption         =   "P4 - ( Torque limit )"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   23
         Top             =   1920
         Width           =   2775
      End
      Begin VB.Label Label4 
         BackStyle       =   0  'Transparent
         Caption         =   "P3 - ( I gain )"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   22
         Top             =   1560
         Width           =   2775
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Caption         =   "P2 - ( P gain )"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   21
         Top             =   1200
         Width           =   2535
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "P1 - ( Velocity feedback )"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   20
         Top             =   840
         Width           =   2535
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "P0 - ( Velocity limit )"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   238
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   19
         Top             =   480
         Width           =   2415
      End
   End
   Begin MSCommLib.MSComm MSComm1 
      Left            =   3600
      Top             =   -120
      _ExtentX        =   1005
      _ExtentY        =   1005
      _Version        =   393216
      DTREnable       =   -1  'True
      BaudRate        =   38400
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Check1_Click()
If Check1.Value = 0 Then
Check1.ForeColor = &H0&
Else
Check1.ForeColor = &HFF&

End If

End Sub

Private Sub Check1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Kiválasztás esetén a scroll bar értéket azonnal mentés nélkül(teszt módban) elküldi a microcontrollerbe."
End Sub


Private Sub Check4_Click()
Check2.Value = 0
Check3.Value = 0
Check4.Value = 1

End Sub


Private Sub Command1_Click()
Command4_Click
MSComm1.Output = Chr(13)
Command4_Click
If Text10.Text = "" Then
MsgBox "Nincs érték megadva.", , "Hiba"
GoTo 1
Else
End If
Text10.Text = Int(Text10.Text)
MousePointer = vbHourglass
MSComm1.Output = Text10.Text + Chr(13)
 Dim dummy
 Do
 dummy = DoEvents
 Loop Until MSComm1.InBufferCount >= 1
 MSComm1.Output = Chr(13)
 Command4_Click
 Command4_Click
 Command4_Click
 Command4_Click
 
1
MousePointer = vbNormal
MSComm1.Output = Chr(13)
Command4_Click


End Sub

Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új velocity limit értéket elküldöd a microconrollerbe mentés nélkül (teszt érték)."

End Sub

Private Sub Command10_Click()
Dim szamlalo As Integer
szamlalo = 1
Text7.Text = ""
10
MSComm1.Output = "P6" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
Text7.Text = MSComm1.Input
Dim KEZDET As Integer
Dim VEGE As Integer
Dim EREDMENY As Integer
KEZDET = InStr(Text7.Text, " ")
VEGE = InStr(Text7.Text, ":")
EREDMENY = VEGE - KEZDET
If EREDMENY = 0 Then
szamlalo = szamlalo + 1
GoTo 10
Else
 End If
On Error Resume Next
If Err.Number = 5 Then
MsgBox "Hiba : 5"
GoTo 2
Else
End If
Text7.Text = Mid(Text7.Text, KEZDET, EREDMENY)
Text7.Text = Int(Text7.Text)
2
End Sub

Private Sub Command10_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Aktuális gear ratio érték kiolvasása"
End Sub

Private Sub Command11_Click()
Dim szamlalo As Integer
szamlalo = 1
Text8.Text = ""
10
MSComm1.Output = "P7" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
Text8.Text = MSComm1.Input
Dim KEZDET As Integer
Dim VEGE As Integer
Dim EREDMENY As Integer
KEZDET = InStr(Text8.Text, " ")
VEGE = InStr(Text8.Text, ":")
EREDMENY = VEGE - KEZDET
If EREDMENY = 0 Then
szamlalo = szamlalo + 1
GoTo 10
Else
 End If
On Error Resume Next
If Err.Number = 5 Then
MsgBox "Hiba : 5"
GoTo 2
Else
End If
Text8.Text = Mid(Text8.Text, KEZDET, EREDMENY)
Text8.Text = Int(Text8.Text)
2
End Sub

Private Sub Command11_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Aktuális D gain érték kiolvasása"
End Sub

Private Sub Command12_Click()
Command4_Click
MSComm1.Output = Chr(13)
Command4_Click
If Text10.Text = "" Then
MsgBox "Nincs érték megadva.", , "Hiba"
GoTo 1
Else
End If
MSComm1.Output = Text10.Text + Chr(13) + "W 0" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
Command4_Click
Command4_Click
Command4_Click
Command4_Click
Command4_Click
MSComm1.Output = Chr(13)
Command4_Click
1
End Sub

Private Sub Command12_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új velocity limit értéket elküldöd a microconrollerbe , új érték mentéssel."

End Sub


Private Sub Command13_Click()
Command5_Click
MSComm1.Output = Chr(13)
Command5_Click
If Text11.Text = "" Then
MsgBox "Nincs érték megadva.", , "Hiba"
GoTo 1
Else
End If
Text11.Text = Int(Text11.Text)
MousePointer = vbHourglass
MSComm1.Output = Text11.Text + Chr(13)
 Dim dummy
 Do
 dummy = DoEvents
 Loop Until MSComm1.InBufferCount >= 1
 MSComm1.Output = Chr(13)
 Command5_Click
 Command5_Click
 Command5_Click
 Command5_Click
 
1
MousePointer = vbNormal
MSComm1.Output = Chr(13)
Command5_Click
End Sub

Private Sub Command13_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új velocity feedback értéket elküldöd a microconrollerbe mentés nélkül (teszt érték)."

End Sub


Private Sub Command14_Click()
Command6_Click
MSComm1.Output = Chr(13)
Command6_Click
If Text12.Text = "" Then
MsgBox "Nincs érték megadva.", , "Hiba"
GoTo 1
Else
End If
Text12.Text = Int(Text12.Text)
MousePointer = vbHourglass
MSComm1.Output = Text12.Text + Chr(13)
 Dim dummy
 Do
 dummy = DoEvents
 Loop Until MSComm1.InBufferCount >= 1
 MSComm1.Output = Chr(13)
 Command6_Click
 Command6_Click
 Command6_Click
 Command6_Click
 
1
MousePointer = vbNormal
MSComm1.Output = Chr(13)
Command6_Click
End Sub


Private Sub Command14_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új P gain értéket elküldöd a microconrollerbe mentés nélkül (teszt érték)."

End Sub


Private Sub Command15_Click()
Command7_Click
MSComm1.Output = Chr(13)
Command7_Click
If Text13.Text = "" Then
MsgBox "Nincs érték megadva.", , "Hiba"
GoTo 1
Else
End If
Text13.Text = Int(Text13.Text)
MousePointer = vbHourglass
MSComm1.Output = Text13.Text + Chr(13)
 Dim dummy
 Do
 dummy = DoEvents
 Loop Until MSComm1.InBufferCount >= 1
 MSComm1.Output = Chr(13)
 Command7_Click
 Command7_Click
 Command7_Click
 Command7_Click
 
1
MousePointer = vbNormal
MSComm1.Output = Chr(13)
Command7_Click
End Sub


Private Sub Command15_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új I gain értéket elküldöd a microconrollerbe mentés nélkül (teszt érték)."

End Sub


Private Sub Command16_Click()
Command8_Click
MSComm1.Output = Chr(13)
Command8_Click
If Text14.Text = "" Then
MsgBox "Nincs érték megadva.", , "Hiba"
GoTo 1
Else
End If
Text14.Text = Int(Text14.Text)
MousePointer = vbHourglass
MSComm1.Output = Text14.Text + Chr(13)
 Dim dummy
 Do
 dummy = DoEvents
 Loop Until MSComm1.InBufferCount >= 1
 MSComm1.Output = Chr(13)
 Command8_Click
 Command8_Click
 Command8_Click
 Command8_Click
 
1
MousePointer = vbNormal
MSComm1.Output = Chr(13)
Command8_Click
End Sub


Private Sub Command16_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új torque limit értéket elküldöd a microconrollerbe mentés nélkül (teszt érték)."

End Sub


Private Sub Command17_Click()
Command9_Click
MSComm1.Output = Chr(13)
Command9_Click
If Text15.Text = "" Then
MsgBox "Nincs érték megadva.", , "Hiba"
GoTo 1
Else
End If
Text15.Text = Int(Text15.Text)
MousePointer = vbHourglass
MSComm1.Output = Text15.Text + Chr(13)
 Dim dummy
 Do
 dummy = DoEvents
 Loop Until MSComm1.InBufferCount >= 1
 MSComm1.Output = Chr(13)
 Command9_Click
 Command9_Click
 Command9_Click
 Command9_Click
 
1
MousePointer = vbNormal
MSComm1.Output = Chr(13)
Command9_Click
End Sub


Private Sub Command17_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új EMF feedback értéket elküldöd a microconrollerbe mentés nélkül (teszt érték)."

End Sub


Private Sub Command18_Click()
Command10_Click
MSComm1.Output = Chr(13)
Command10_Click
If Text16.Text = "" Then
MsgBox "Nincs érték megadva.", , "Hiba"
GoTo 1
Else
End If
Text16.Text = Int(Text16.Text)
MousePointer = vbHourglass
MSComm1.Output = Text16.Text + Chr(13)
 Dim dummy
 Do
 dummy = DoEvents
 Loop Until MSComm1.InBufferCount >= 1
 MSComm1.Output = Chr(13)
 Command10_Click
 Command10_Click
 Command10_Click
 Command10_Click
 
1
MousePointer = vbNormal
MSComm1.Output = Chr(13)
Command10_Click
End Sub


Private Sub Command18_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új gear ratio értéket elküldöd a microconrollerbe mentés nélkül (teszt érték)."

End Sub


Private Sub Command19_Click()
Command11_Click
MSComm1.Output = Chr(13)
Command11_Click
If Text17.Text = "" Then
MsgBox "Nincs érték megadva.", , "Hiba"
GoTo 1
Else
End If
Text17.Text = Int(Text17.Text)
MousePointer = vbHourglass
MSComm1.Output = Text17.Text + Chr(13)
 Dim dummy
 Do
 dummy = DoEvents
 Loop Until MSComm1.InBufferCount >= 1
 MSComm1.Output = Chr(13)
 Command11_Click
 Command11_Click
 Command11_Click
 Command11_Click
 
1
MousePointer = vbNormal
MSComm1.Output = Chr(13)
Command11_Click
End Sub


Private Sub Command19_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új D gain értéket elküldöd a microconrollerbe mentés nélkül (teszt érték)."

End Sub


Private Sub Command2_Click()
Command5_Click
MSComm1.Output = Chr(13)
Command5_Click
If Text11.Text = "" Then
MsgBox "Nincs érték megadva.", , "Hiba"
GoTo 1
Else
End If
MSComm1.Output = Text11.Text + Chr(13) + "W 0" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
Command5_Click
Command5_Click
Command5_Click
Command5_Click
Command5_Click
MSComm1.Output = Chr(13)
Command5_Click
1
End Sub

Private Sub Command2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új velocity feedback értéket elküldöd a microconrollerbe , új érték mentéssel."
End Sub


Private Sub Command20_Click()
Dim szamol As Integer
szamol = 0

If Text10.Text = "" Then
szamol = szamol + 1
        Else
        Command12_Click
End If
If Text11.Text = "" Then
szamol = szamol + 1
        Else
        Command2_Click
End If
If Text12.Text = "" Then
szamol = szamol + 1
        Else
        Command21_Click
End If
If Text13.Text = "" Then
szamol = szamol + 1
        Else
        Command22_Click
End If
If Text14.Text = "" Then
szamol = szamol + 1
        Else
        Command23_Click
End If
If Text15.Text = "" Then
szamol = szamol + 1
        Else
        Command24_Click
End If
If Text16.Text = "" Then
szamol = szamol + 1
        Else
        Command25_Click
End If
If Text17.Text = "" Then
szamol = szamol + 1
        Else
        Command26_Click
End If

'MsgBox "ures adatsor" & szamol
If szamol = 8 Then
MsgBox "Nincs legalább egy új paraméter. Nincs mentés."
GoTo 20
Else
 End If
Msg = "Microcontrollerbe a paraméterek elmentve , szeretnéd SMCparam.txt filébe is menteni a beállításokat ?"
Style = vbYesNo + vbQuestion + vbDefaultButton2
Title = "Paraméterek mentése"
Ctxt = 1000
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then
    MyString = "Igen"
    MousePointer = vbHourglass

Command37_Click

MousePointer = vbNormal
Else
    MyString = "Nem"
    Cancel = True
    MousePointer = vbNormal
End If


20


End Sub

Private Sub Command20_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Minden új értéket elküldöd a microconrollerbe , új értékek mentéssel."
End Sub


Private Sub Command21_Click()
Command6_Click
MSComm1.Output = Chr(13)
Command6_Click
If Text12.Text = "" Then
MsgBox "Nincs érték megadva.", , "Hiba"
GoTo 1
Else
End If
MSComm1.Output = Text12.Text + Chr(13) + "W 0" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
Command6_Click
Command6_Click
Command6_Click
Command6_Click
Command6_Click
MSComm1.Output = Chr(13)
Command6_Click
1
End Sub

Private Sub Command21_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új P gain értéket elküldöd a microconrollerbe , új érték mentéssel."
End Sub


Private Sub Command22_Click()
Command7_Click
MSComm1.Output = Chr(13)
Command7_Click
If Text13.Text = "" Then
MsgBox "Nincs érték megadva.", , "Hiba"
GoTo 1
Else
End If
MSComm1.Output = Text13.Text + Chr(13) + "W 0" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
Command7_Click
Command7_Click
Command7_Click
Command7_Click
Command7_Click
MSComm1.Output = Chr(13)
Command7_Click
1
End Sub


Private Sub Command22_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új I gain értéket elküldöd a microconrollerbe , új érték mentéssel."
End Sub


Private Sub Command23_Click()
Command8_Click
MSComm1.Output = Chr(13)
Command8_Click
If Text14.Text = "" Then
MsgBox "Nincs érték megadva.", , "Hiba"
GoTo 1
Else
End If
MSComm1.Output = Text14.Text + Chr(13) + "W 0" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
Command8_Click
Command8_Click
Command8_Click
Command8_Click
Command8_Click
MSComm1.Output = Chr(13)
Command8_Click
1
End Sub


Private Sub Command23_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új torque limit értéket elküldöd a microconrollerbe , új érték mentéssel."
End Sub


Private Sub Command24_Click()
Command9_Click
MSComm1.Output = Chr(13)
Command9_Click
If Text15.Text = "" Then
MsgBox "Nincs érték megadva.", , "Hiba"
GoTo 1
Else
End If
MSComm1.Output = Text15.Text + Chr(13) + "W 0" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
Command9_Click
Command9_Click
Command9_Click
Command9_Click
Command9_Click
MSComm1.Output = Chr(13)
Command9_Click
1
End Sub


Private Sub Command24_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új EMF feedback értéket elküldöd a microconrollerbe , új érték mentéssel."
End Sub


Private Sub Command25_Click()
Command10_Click
MSComm1.Output = Chr(13)
Command10_Click
If Text16.Text = "" Then
MsgBox "Nincs érték megadva.", , "Hiba"
GoTo 1
Else
End If
MSComm1.Output = Text16.Text + Chr(13) + "W 0" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
Command10_Click
Command10_Click
Command10_Click
Command10_Click
Command10_Click
MSComm1.Output = Chr(13)
Command10_Click
1
End Sub


Private Sub Command25_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új gear ratio értéket elküldöd a microconrollerbe , új érték mentéssel."
End Sub


Private Sub Command26_Click()
Command11_Click
MSComm1.Output = Chr(13)
Command11_Click
If Text17.Text = "" Then
MsgBox "Nincs érték megadva.", , "Hiba"
GoTo 1
Else
End If
MSComm1.Output = Text17.Text + Chr(13) + "W 0" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
Command11_Click
Command11_Click
Command11_Click
Command11_Click
Command11_Click
MSComm1.Output = Chr(13)
Command11_Click
1
End Sub


Private Sub Command26_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új D gain értéket elküldöd a microconrollerbe , új érték mentéssel."
End Sub


Private Sub Command27_Click()
Dim szamol As Integer
szamol = 0


If Text10.Text = "" Then
szamol = szamol + 1
        Else
        Command1_Click
End If
If Text11.Text = "" Then
szamol = szamol + 1
        Else
        Command13_Click
End If
If Text12.Text = "" Then
szamol = szamol + 1
        Else
        Command14_Click
End If
If Text13.Text = "" Then
szamol = szamol + 1
        Else
        Command15_Click
End If
If Text14.Text = "" Then
szamol = szamol + 1
        Else
        Command16_Click
End If
If Text15.Text = "" Then
szamol = szamol + 1
        Else
        Command17_Click
End If
If Text16.Text = "" Then
szamol = szamol + 1
        Else
        Command18_Click
End If
If Text17.Text = "" Then
szamol = szamol + 1
        Else
        Command19_Click
End If
If szamol = 8 Then
MsgBox "Nincs elküldhető paraméter."

Else
 End If
End Sub

Private Sub Command27_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Minden új értéket elküldöd a microconrollerbe , új érték mentés nélkül."
End Sub


Private Sub Command28_Click()
 If Option1.Value = False Then
    If Option2.Value = False Then
        Option1.Value = True
        Else
        End If
Else
End If

Option3.Value = False
Command33_Click
If Option1.Value = True Then
MSComm1.Output = "+" & Text9 + Chr(13)
 Dim dummy
 Do
 dummy = DoEvents
 Loop Until MSComm1.InBufferCount >= 1
 MSComm1.Output = Chr(13)
 Else
 MSComm1.Output = "-" & Text9 + Chr(13)

 Do
 dummy = DoEvents
 Loop Until MSComm1.InBufferCount >= 1
 MSComm1.Output = Chr(13)
 End If

End Sub

Private Sub Command28_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Lépteti a motort a kiválasztott irányba a megadott lépésjel számmal P0 sebességen."

End Sub

Private Sub Command29_Click()
Dim be_text As String
List1.Clear

On Error Resume Next
Open App.Path & "\" & "SMCparam.txt" For Input As #1
If Err.Number = 55 Then
MsgBox "SMCparam.txt file már meg van nyitva"
GoTo 1
Else
If Err.Number = 53 Then
MsgBox App.Path & "\" & "SMCparam.txt file nem elérhető ."



GoTo 1

Else
End If

End If




Line Input #1, be_text
Do While Not EOF(1)
List1.AddItem (be_text)
Line Input #1, be_text
Loop
List1.AddItem (be_text)
Line Input #1, be_text
1 Close #1
List1.Refresh

End Sub

Private Sub Command29_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Filében tárolt paraméterlista frissítése."

End Sub


Private Sub Command3_Click()

Command35_Click


Command4_Click
Command5_Click
Command6_Click
Command7_Click
Command8_Click
Command9_Click
Command10_Click
Command11_Click



Command4_Click
Command5_Click
Command6_Click
Command7_Click
Command8_Click
Command9_Click
Command10_Click
Command11_Click


On Error Resume Next
HScroll3.Value = Text1.Text
If Err.Number = 380 Then
MsgBox "Hibás P0 - (velocity limit) érték."
GoTo 10
Else
End If
On Error Resume Next
HScroll4.Value = Text2.Text
If Err.Number = 380 Then
MsgBox "Hibás P1 - (velocity feedback) érték."
GoTo 10
Else
End If
On Error Resume Next
HScroll5.Value = Text3.Text
If Err.Number = 380 Then
MsgBox "Hibás P2 - (P gain) érték."
GoTo 10
Else
End If
On Error Resume Next
HScroll6.Value = Text4.Text
If Err.Number = 380 Then
MsgBox "Hibás P3 - (I gain) érték."
GoTo 10
Else
End If
On Error Resume Next
HScroll7.Value = Text5.Text
If Err.Number = 380 Then
MsgBox "Hibás P4 - (torque limit) érték."
GoTo 10
Else
End If
On Error Resume Next
HScroll8.Value = Text6.Text
If Err.Number = 380 Then
MsgBox "Hibás P5 - (EMF) érték."
GoTo 10
Else
End If
On Error Resume Next
HScroll9.Value = Text7.Text
If Err.Number = 380 Then
MsgBox "Hibás P6 - (gear ratio) érték."
GoTo 10
Else
End If
On Error Resume Next
HScroll10.Value = Text8.Text
If Err.Number = 380 Then
MsgBox "Hibás P7 - (D gain) érték."
GoTo 10
Else
End If
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
Text17.Text = ""
10 MousePointer = vbNormal
End Sub

Private Sub Command3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Microcontrollerben jelenleg használt összes érték kiolvasása"
End Sub

Private Sub Command30_Click()
Dim del As Integer
Dim frissit As Integer




Msg = "Biztos, hogy töröljem a paramétersort ?"
Style = vbYesNo + vbQuestion + vbDefaultButton2
Title = "Törlés"
Ctxt = 1000
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then
    MyString = "Igen"
    MousePointer = vbHourglass
del = List1.ListIndex
On Error Resume Next
List1.RemoveItem (del)
If Err.Number = 5 Then
MsgBox "Válassz törlendő paramétersort."
GoTo 10
Else
End If
If List1.ListCount = 0 Then
MsgBox "Nincs törölhető paraméterlista."
GoTo 10
Else
End If
Command38_Click

10

MousePointer = vbNormal
Else
    MyString = "Nem"
    Cancel = True
    MousePointer = vbNormal
End If






End Sub

Private Sub Command31_Click()
Command34_Click
Option3.Value = True

MSComm1.Output = "m1" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1

MSComm1.Output = "S" + Label13.Caption + Chr(13)

Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1

End Sub

Private Sub Command31_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Motor futás szabályozatlan , feszültségvezérelt módban a scroll baron beállított sebességen."
End Sub


Private Sub Command32_Click()
Command34_Click
Option3.Value = False

MSComm1.Output = "m2" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1

MSComm1.Output = "S" + Label13.Caption + Chr(13)

Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1

End Sub


Private Sub Command32_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Motor futás PID szabályozott módban a scroll baron beállított sebességen."
End Sub


Private Sub Command33_Click()
MSComm1.Output = "m3" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1

End Sub


Private Sub Command33_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Léptető mód kiválasztása."

End Sub


Private Sub Command34_Click()
Rem Label14.Caption = "?"
Option3.Value = True
MSComm1.Output = "S0" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
MSComm1.Output = "m3" + Chr(13)

Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
MSComm1.Output = "m3" + Chr(13)


End Sub


Private Sub Command35_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""

Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
Text17.Text = ""


End Sub

Private Sub Command34_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Motor futás leállítása."
End Sub

Private Sub Command38_Click()
Dim ment As Integer

ment = 0
mousepoiter = vbHourglass
Rem list1.text = kiválasztott sor szovege
Open App.Path & "\" & "SMCparam.txt" For Output As #1
Close #1

 Open App.Path & "\" & "SMCparam.txt" For Append As #1
10 List1.ListIndex = ment 'hanyadik a list1ben a kiválasztott sor
List1.Selected(ment) = True
Print #1, List1.Text
If List1.ListIndex + 1 = List1.ListCount Then
Rem MsgBox "kész"
MousePointer = vbNormal

GoTo 20
Else
ment = ment + 1
GoTo 10
End If


20 Close #1

End Sub

Private Sub Command36_Click()
Dim cim As String
Dim hely As Integer
Dim hely2 As Integer
Dim poz As Integer

UCase (List1.Text)
cim = List1.Text
hely = InStr(cim, "P0:")
hely2 = InStr(cim, "P1:")
If hely > 0 Then
poz = hely2 - (hely + 3)
On Error Resume Next
Text10.Text = Mid(cim, hely + 3, poz)
If Err.Number = 5 Then
GoTo 10
Else
End If

Else
GoTo 10
End If

UCase (List1.Text)
cim = List1.Text
hely = InStr(cim, "P1:")
hely2 = InStr(cim, "P2:")
If hely > 0 Then
poz = hely2 - (hely + 3)
On Error Resume Next
Text11.Text = Mid(cim, hely + 3, poz)
If Err.Number = 5 Then
GoTo 10
Else
End If

Else
GoTo 10
End If

UCase (List1.Text)
cim = List1.Text
hely = InStr(cim, "P2:")
hely2 = InStr(cim, "P3:")
If hely > 0 Then
poz = hely2 - (hely + 3)
On Error Resume Next
Text12.Text = Mid(cim, hely + 3, poz)
If Err.Number = 5 Then
GoTo 10
Else
End If

Else
GoTo 10
End If

UCase (List1.Text)
cim = List1.Text
hely = InStr(cim, "P3:")
hely2 = InStr(cim, "P4:")
If hely > 0 Then
poz = hely2 - (hely + 3)
On Error Resume Next
Text13.Text = Mid(cim, hely + 3, poz)
If Err.Number = 5 Then
GoTo 10
Else
End If

Else
GoTo 10
End If

UCase (List1.Text)
cim = List1.Text
hely = InStr(cim, "P4:")
hely2 = InStr(cim, "P5:")
If hely > 0 Then
poz = hely2 - (hely + 3)
On Error Resume Next
Text14.Text = Mid(cim, hely + 3, poz)
If Err.Number = 5 Then
GoTo 10
Else
End If

Else
GoTo 10
End If

UCase (List1.Text)
cim = List1.Text
hely = InStr(cim, "P5:")
hely2 = InStr(cim, "P6:")
If hely > 0 Then
poz = hely2 - (hely + 3)
On Error Resume Next
Text15.Text = Mid(cim, hely + 3, poz)
If Err.Number = 5 Then
GoTo 10
Else
End If

Else
GoTo 10
End If

UCase (List1.Text)
cim = List1.Text
hely = InStr(cim, "P6:")
hely2 = InStr(cim, "P7:")
If hely > 0 Then
poz = hely2 - (hely + 3)
On Error Resume Next
Text16.Text = Mid(cim, hely + 3, poz)
If Err.Number = 5 Then
GoTo 10
Else
End If

Else
GoTo 10
End If

UCase (List1.Text)
cim = List1.Text
hely = InStr(cim, "P7:")
hely2 = InStr(cim, "<end>")
If hely > 0 Then
poz = hely2 - (hely + 3)
On Error Resume Next
Text17.Text = Mid(cim, hely + 3, poz)
If Err.Number = 5 Then
GoTo 10
Else
End If

Else
GoTo 10
End If

Text10.BackColor = &H80000005 'feher
Text11.BackColor = &H80000005 'feher
Text12.BackColor = &H80000005 'feher
Text13.BackColor = &H80000005 'feher
Text14.BackColor = &H80000005 'feher
Text15.BackColor = &H80000005 'feher
Text16.BackColor = &H80000005 'feher
Text17.BackColor = &H80000005 'feher






Exit Sub

10
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
Text17.Text = ""
MsgBox "Hibás vagy nem teljes paraméterlista ." & Chr(10) & Chr(13) & Chr(10) & Chr(13) & "Betölthető paraméterlista példa :" & Chr(10) & Chr(13) & "< Komment > P0:1000,P1:5130,P2:1300,P3:120,P4:240,P5:600,P6:256,P7:1<end>", , "Hibás paramétersor betöltés"

End Sub

Private Sub Command36_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "A filében tárolt paraméterlista betöltése , megnyitása."

End Sub


Private Sub Command37_Click()
Dim intMsg As String
Dim StudentName As String
txtelkuld.Text = ""

StudentName = InputBox("Adj kommentet a paraméterlista azonosításához.")
If StudentName = "" Then
MsgBox "Nincs komment vagy paramétersor mentés elvetés."
GoTo 20
Else
End If

txtelkuld.Text = "< " & StudentName & " > "
If Text10.Text = "" Then
If Text1.Text = "" Then
MsgBox "Nincs se új se kiolvasott velocity limit paraméter , mentés így nem lehetséges. Adj meg értéket."
GoTo 20
Else
txtelkuld.Text = txtelkuld.Text & "P0:" & Text1.Text & ","
End If
Else
txtelkuld.Text = txtelkuld.Text & "P0:" & Text10.Text & ","
End If

'txtelkuld.Text = "< " & StudentName & " > "
If Text11.Text = "" Then
If Text2.Text = "" Then
MsgBox "Nincs se új se kiolvasott velocity feedback paraméter , mentés így nem lehetséges. Adj meg értéket."
GoTo 20
Else
txtelkuld.Text = txtelkuld.Text & "P1:" & Text2.Text & ","
End If
Else
txtelkuld.Text = txtelkuld.Text & "P1:" & Text11.Text & ","
End If

'txtelkuld.Text = "< " & StudentName & " > "
If Text12.Text = "" Then
If Text3.Text = "" Then
MsgBox "Nincs se új se kiolvasott P gain paraméter , mentés így nem lehetséges. Adj meg értéket."
GoTo 20
Else
txtelkuld.Text = txtelkuld.Text & "P2:" & Text3.Text & ","
End If
Else
txtelkuld.Text = txtelkuld.Text & "P2:" & Text12.Text & ","
End If

'txtelkuld.Text = "< " & StudentName & " > "
If Text13.Text = "" Then
If Text4.Text = "" Then
MsgBox "Nincs se új se kiolvasott I gain paraméter , mentés így nem lehetséges. Adj meg értéket."
GoTo 20
Else
txtelkuld.Text = txtelkuld.Text & "P3:" & Text4.Text & ","
End If
Else
txtelkuld.Text = txtelkuld.Text & "P3:" & Text13.Text & ","
End If

'txtelkuld.Text = "< " & StudentName & " > "
If Text14.Text = "" Then
If Text5.Text = "" Then
MsgBox "Nincs se új se kiolvasott torque limit paraméter , mentés így nem lehetséges. Adj meg értéket."
GoTo 20
Else
txtelkuld.Text = txtelkuld.Text & "P4:" & Text5.Text & ","
End If
Else
txtelkuld.Text = txtelkuld.Text & "P4:" & Text14.Text & ","
End If

'txtelkuld.Text = "< " & StudentName & " > "
If Text15.Text = "" Then
If Text6.Text = "" Then
MsgBox "Nincs se új se kiolvasott EMF paraméter , mentés így nem lehetséges. Adj meg értéket."
GoTo 20
Else
txtelkuld.Text = txtelkuld.Text & "P5:" & Text6.Text & ","
End If
Else
txtelkuld.Text = txtelkuld.Text & "P5:" & Text15.Text & ","
End If

'txtelkuld.Text = "< " & StudentName & " > "
If Text16.Text = "" Then
If Text7.Text = "" Then
MsgBox "Nincs se új se kiolvasott gear ratio paraméter , mentés így nem lehetséges. Adj meg értéket."
GoTo 20
Else
txtelkuld.Text = txtelkuld.Text & "P6:" & Text7.Text & ","
End If
Else
txtelkuld.Text = txtelkuld.Text & "P6:" & Text16.Text & ","
End If

'txtelkuld.Text = "< " & StudentName & " > "
If Text17.Text = "" Then
If Text8.Text = "" Then
MsgBox "Nincs se új se kiolvasott gear ratio paraméter , mentés így nem lehetséges. Adj meg értéket."
GoTo 20
Else
txtelkuld.Text = txtelkuld.Text & "P7:" & Text8.Text & "<end>"
End If
Else
txtelkuld.Text = txtelkuld.Text & "P7:" & Text17.Text & "<end>"
End If


Open App.Path & "\" & "SMCparam.txt" For Append As #1
'StudentName = InputBox("Adj kommentet a paraméterlista azonosítása miatt.")
Print #1, txtelkuld.Text
Close #1
Command29_Click
20
End Sub

Private Sub Command39_Click()

   




End Sub

Private Sub Command4_Click()
Dim szamlalo As Integer
szamlalo = 1
Text1.Text = ""
10
MSComm1.Output = "P0" + Chr(13)
Dim dummy
Do
dummy = DoEvents



Loop Until MSComm1.InBufferCount >= 1
Text1.Text = MSComm1.Input

Dim KEZDET As Integer
Dim VEGE As Integer
Dim EREDMENY As Integer
KEZDET = InStr(Text1.Text, " ")
VEGE = InStr(Text1.Text, ":")
EREDMENY = VEGE - KEZDET
If EREDMENY = 0 Then
szamlalo = szamlalo + 1
GoTo 10
Else

 End If
On Error Resume Next
If Err.Number = 5 Then
MsgBox "Hiba : 5"
GoTo 2
Else

End If
Text1.Text = Mid(Text1.Text, KEZDET, EREDMENY)
Text1.Text = Int(Text1.Text)

2
End Sub

Private Sub Command4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Aktuális velocity limit érték kiolvasása"
End Sub

Private Sub Command5_Click()
Dim szamlalo As Integer
szamlalo = 1
Text2.Text = ""
10
MSComm1.Output = "P1" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
Text2.Text = MSComm1.Input
Dim KEZDET As Integer
Dim VEGE As Integer
Dim EREDMENY As Integer
KEZDET = InStr(Text2.Text, " ")
VEGE = InStr(Text2.Text, ":")
EREDMENY = VEGE - KEZDET
If EREDMENY = 0 Then
szamlalo = szamlalo + 1
GoTo 10
Else
 End If
On Error Resume Next
If Err.Number = 5 Then
MsgBox "Hiba : 5"
GoTo 2
Else
End If
Text2.Text = Mid(Text2.Text, KEZDET, EREDMENY)
Text2.Text = Int(Text2.Text)
2
End Sub

Private Sub Command5_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Aktuális velocity feedback érték kiolvasása"
End Sub

Private Sub Command6_Click()
Dim szamlalo As Integer
szamlalo = 1
Text3.Text = ""
10
MSComm1.Output = "P2" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
Text3.Text = MSComm1.Input
Dim KEZDET As Integer
Dim VEGE As Integer
Dim EREDMENY As Integer
KEZDET = InStr(Text3.Text, " ")
VEGE = InStr(Text3.Text, ":")
EREDMENY = VEGE - KEZDET
If EREDMENY = 0 Then
szamlalo = szamlalo + 1
GoTo 10
Else
 End If
On Error Resume Next
If Err.Number = 5 Then
MsgBox "Hiba : 5"
GoTo 2
Else
End If
Text3.Text = Mid(Text3.Text, KEZDET, EREDMENY)
Text3.Text = Int(Text3.Text)
2
End Sub

Private Sub Command6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Aktuális P gain érték kiolvasása"
End Sub

Private Sub Command7_Click()
Dim szamlalo As Integer
szamlalo = 1
Text4.Text = ""
10
MSComm1.Output = "P3" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
Text4.Text = MSComm1.Input
Dim KEZDET As Integer
Dim VEGE As Integer
Dim EREDMENY As Integer
KEZDET = InStr(Text4.Text, " ")
VEGE = InStr(Text4.Text, ":")
EREDMENY = VEGE - KEZDET
If EREDMENY = 0 Then
szamlalo = szamlalo + 1
GoTo 10
Else
 End If
On Error Resume Next
If Err.Number = 5 Then
MsgBox "Hiba : 5"
GoTo 2
Else
End If
Text4.Text = Mid(Text4.Text, KEZDET, EREDMENY)
Text4.Text = Int(Text4.Text)
2
End Sub

Private Sub Command7_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Aktuális I gain érték kiolvasása"
End Sub

Private Sub Command8_Click()
Dim szamlalo As Integer
szamlalo = 1
Text5.Text = ""
10
MSComm1.Output = "P4" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
Text5.Text = MSComm1.Input
Dim KEZDET As Integer
Dim VEGE As Integer
Dim EREDMENY As Integer
KEZDET = InStr(Text5.Text, " ")
VEGE = InStr(Text5.Text, ":")
EREDMENY = VEGE - KEZDET
If EREDMENY = 0 Then
szamlalo = szamlalo + 1
GoTo 10
Else
 End If
On Error Resume Next
If Err.Number = 5 Then
MsgBox "Hiba : 5"
GoTo 2
Else
End If
Text5.Text = Mid(Text5.Text, KEZDET, EREDMENY)
Text5.Text = Int(Text5.Text)
2
End Sub

Private Sub Command8_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Aktuális torque limit érték kiolvasása"
End Sub

Private Sub Command9_Click()
Dim szamlalo As Integer
szamlalo = 1
Text6.Text = ""
10
MSComm1.Output = "P5" + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
Text6.Text = MSComm1.Input
Dim KEZDET As Integer
Dim VEGE As Integer
Dim EREDMENY As Integer
KEZDET = InStr(Text6.Text, " ")
VEGE = InStr(Text6.Text, ":")
EREDMENY = VEGE - KEZDET
If EREDMENY = 0 Then
szamlalo = szamlalo + 1
GoTo 10
Else
 End If
On Error Resume Next
If Err.Number = 5 Then
MsgBox "Hiba : 5"
GoTo 2
Else
End If
Text6.Text = Mid(Text6.Text, KEZDET, EREDMENY)
Text6.Text = Int(Text6.Text)
2
End Sub

Private Sub Command9_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Aktuális EMS feedback érték kiolvasása"
End Sub

Private Sub Form_Load()
MSComm1.CommPort = Val(1)
    MSComm1.Settings = "38400,N,8,1"
    MSComm1.InputLen = 0
    On Error Resume Next
    MSComm1.PortOpen = True
    If Err.Number = 8005 Then
     MsgBox "COM1 Port használatban van."
     End
     Else
     MSComm1.PortOpen = True
    End If
 
  

 Command29_Click
    
Rem Command3_Click
  Rem  MsgBox "13 van kapcsolat " & Err.Number


End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Segítség helye..."
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Msg = "Biztos, hogy kilép?"
Style = vbYesNo + vbQuestion + vbDefaultButton2
Title = "Kilépés"
Ctxt = 1000
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then
    MyString = "Igen"
   
Rem Command34_Click
MousePointer = vbNormal
End
Else
    MyString = "Nem"
    Cancel = True
    MousePointer = vbNormal
End If



End Sub

Private Sub Form_Unload(Cancel As Integer)
MSComm1.PortOpen = False
End
End Sub

Private Sub Frame1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Segítség helye..."
End Sub

Private Sub Frame2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Segítség helye..."
End Sub

Private Sub Frame3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Segítség helye..."

End Sub


Private Sub HScroll10_Change()
Text17.Text = HScroll10.Value
If Check1.Value = 1 Then
Command19_Click
Else
End If
End Sub

Private Sub HScroll2_Change()

Label13.Caption = HScroll2.Value
End Sub

Private Sub HScroll1_Change()

If Text10.BackColor = &HC0FFC0 Then
Text10.Text = HScroll1.Value
If Check1.Value = 1 Then
Command1_Click
Else
End If
Else
End If

If Text11.BackColor = &HC0FFC0 Then
Text11.Text = HScroll1.Value
If Check1.Value = 1 Then
Command13_Click
Else
End If
Else
End If

If Text12.BackColor = &HC0FFC0 Then
Text12.Text = HScroll1.Value
If Check1.Value = 1 Then
Command14_Click
Else
End If
Else
End If

If Text13.BackColor = &HC0FFC0 Then
Text13.Text = HScroll1.Value
If Check1.Value = 1 Then
Command15_Click
Else
End If
Else
End If

If Text14.BackColor = &HC0FFC0 Then
Text14.Text = HScroll1.Value
If Check1.Value = 1 Then
Command16_Click
Else
End If
Else
End If

If Text15.BackColor = &HC0FFC0 Then
Text15.Text = HScroll1.Value
If Check1.Value = 1 Then
Command17_Click
Else
End If
Else
End If

If Text16.BackColor = &HC0FFC0 Then
Text16.Text = HScroll1.Value
If Check1.Value = 1 Then
Command18_Click
Else
End If
Else
End If

If Text17.BackColor = &HC0FFC0 Then
Text17.Text = HScroll1.Value
If Check1.Value = 1 Then
Command19_Click
Else
End If
Else
End If

End Sub

Private Sub HScroll3_Change()
Text10.Text = HScroll3.Value
If Check1.Value = 1 Then
Command1_Click

Else
End If
End Sub

Private Sub HScroll4_Change()
Text11.Text = HScroll4.Value
If Check1.Value = 1 Then
Command13_Click
Else
End If

End Sub

Private Sub HScroll5_Change()
Text12.Text = HScroll5.Value
If Check1.Value = 1 Then
Command14_Click
Else
End If

End Sub


Private Sub HScroll6_Change()
Text13.Text = HScroll6.Value
If Check1.Value = 1 Then
Command15_Click
Else
End If
End Sub

Private Sub HScroll7_Change()
Text14.Text = HScroll7.Value
If Check1.Value = 1 Then
Command16_Click
Else
End If
End Sub

Private Sub HScroll8_Change()
Text15.Text = HScroll8.Value
If Check1.Value = 1 Then
Command17_Click
Else
End If
End Sub


Private Sub HScroll9_Change()
Text16.Text = HScroll9.Value
If Check1.Value = 1 Then
Command18_Click
Else
End If
End Sub

Private Sub Label10_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Scroll bar értéke ebbe az érték boxba kerül (aktivált zöld box)."
End Sub


Private Sub Label13_Change()
If Option3.Value = False Then
Label14.Caption = Label13 * 50
Else
Label14.Caption = "?"
End If
MSComm1.Output = "S" + Label13.Caption + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1
End Sub

Private Sub List1_Click()

If List1.Text = "" Then
MsgBox "Üres paramétersor nem betölthető."
GoTo 2
Else

End If


2
End Sub

Private Sub List1_DblClick()
Command36_Click
End Sub


Private Sub List1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Filében tárolt paraméterlista. "

End Sub

Private Sub Option1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Motor forgásirány léptető módban (+)."
End Sub


Private Sub Option2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Motor forgásirány léptető módban (-)."
End Sub


Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Microcontrollerben jelenleg használt velocity limit (sebesség határ) érték"
End Sub

Private Sub Text10_Change()
If Text10.Text = "0" Then
Text10.Text = ""
Else
End If

On Error Resume Next
Text10.Text = Int(Text10.Text)
If Text10.Text <= 0 Then
    If Err.Number = 13 Then
    Rem MsgBox "Csak pozitív egész érték a megengedett! (1-5000 értékhatár között)", , "Hibás adatbevitel"
    Text10.BackColor = &H80000005 'feher
    Text10.Text = ""
    GoTo 1
    Else
End If
Else
End If
1

End Sub

Private Sub Text10_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új velocity limit értéket itt adhatsz meg .  Scroll bar értéke ide kerül."
End Sub

Private Sub Text11_Change()
If Text11.Text = "0" Then
Text11.Text = ""
Else
End If

On Error Resume Next
Text11.Text = Int(Text11.Text)
If Text11.Text <= 0 Then
    If Err.Number = 13 Then
    Rem MsgBox "Csak pozitív egész érték a megengedett! (1-5000 értékhatár között)", , "Hibás adatbevitel"
    Text11.BackColor = &H80000005 'feher
    Text11.Text = ""
    GoTo 1
    Else
End If
Else
End If
1

End Sub

Private Sub Text11_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új velocity feedback értéket itt adhatsz meg .  Scroll bar értéke ide kerül."
End Sub

Private Sub Text12_Change()
If Text12.Text = "0" Then
Text12.Text = ""
Else
End If

On Error Resume Next
Text12.Text = Int(Text12.Text)
If Text12.Text <= 0 Then
    If Err.Number = 13 Then
    Rem MsgBox "Csak pozitív egész érték a megengedett!(1-9999 értékhatár között)", , "Hibás adatbevitel"
    Text12.BackColor = &H80000005 'feher
    Text12.Text = ""
    GoTo 1
    Else
End If
Else
End If
1

End Sub

Private Sub Text12_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új P gain értéket itt adhatsz meg . Scroll bar értéke ide kerül."
End Sub

Private Sub Text13_Change()
If Text13.Text = "0" Then
Text13.Text = ""
Else
End If

On Error Resume Next
Text13.Text = Int(Text13.Text)
If Text13.Text <= 0 Then
    If Err.Number = 13 Then
    Rem MsgBox "Csak pozitív egész érték a megengedett!(1-9999 értékhatár között)", , "Hibás adatbevitel"
    Text13.BackColor = &H80000005 'feher
    Text13.Text = ""
    GoTo 1
    Else
End If
Else
End If
1

End Sub


Private Sub Text13_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új I gain értéket itt adhatsz meg .  Scroll bar értéke ide kerül."
End Sub

Private Sub Text14_Change()
If Text14.Text = "0" Then
Text14.Text = ""
Else
End If

On Error Resume Next
Text14.Text = Int(Text14.Text)
If Text14.Text <= 0 Then
    If Err.Number = 13 Then
    Rem MsgBox "Csak pozitív egész érték a megengedett!(1-256 értékhatár között)", , "Hibás adatbevitel"
    Text14.BackColor = &H80000005 'feher
    Text14.Text = ""
    GoTo 1
    Else
End If
Else
End If
1
End Sub


Private Sub Text14_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
StatusBar1.Panels(2).Text = "Új torque limit (nyomaték határ) érték. Motor max áram : " & Text14 / 100 & " Amper"

If Err.Number = 13 Then
StatusBar1.Panels(2).Text = "Új torque limit (nyomaték határ) érték."

Else
End If
End Sub

Private Sub Text15_Change()
If Text15.Text = "0" Then
Text15.Text = ""
Else
End If

On Error Resume Next
Text15.Text = Int(Text15.Text)
If Text15.Text <= 0 Then
    If Err.Number = 13 Then
    Rem MsgBox "Csak pozitív egész érték a megengedett! (1-9999 értékhatár között)", , "Hibás adatbevitel"
    Text15.BackColor = &H80000005 'feher
    Text15.Text = ""
    GoTo 1
    Else
End If
Else
End If
1
End Sub


Private Sub Text15_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új EMS feedback értéket itt adhatsz meg . Scroll bar értéke ide kerül."
End Sub

Private Sub Text16_Change()
If Text16.Text = "0" Then
Text16.Text = ""
Else
End If

On Error Resume Next
Text16.Text = Int(Text16.Text)
If Text16.Text <= 0 Then
    If Err.Number = 13 Then
    Rem MsgBox "Csak pozitív egész érték a megengedett!(1-1024 értékhatár között)", , "Hibás adatbevitel"
    Text16.BackColor = &H80000005 'feher
    Text16.Text = ""
    GoTo 1
    Else
End If
Else
End If
1
End Sub


Private Sub Text16_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
StatusBar1.Panels(2).Text = "Új beállított gear ratio érték (áttétel : 256=1:4 , 1024=1:1). Áttétel : 1:" & 1024 / Text16
If Err.Number = 13 Then
StatusBar1.Panels(2).Text = "Új beállított gear ratio érték (áttétel : 256=1:4 , 1024=1:1)."
Else
End If
End Sub

Private Sub Text17_Change()
If Text17.Text = "0" Then
Text17.Text = ""
Else
End If

On Error Resume Next
Text17.Text = Int(Text17.Text)
If Text17.Text <= 0 Then
    If Err.Number = 13 Then
    Rem MsgBox "Csak pozitív egész érték a megengedett!(1-9999 értékhatár között)", , "Hibás adatbevitel"
    Text17.BackColor = &H80000005 'feher
    Text17.Text = ""
    GoTo 1
    Else
End If
Else
End If
1
End Sub


Private Sub Text18_Change()
MSComm1.Output = "S" + Label13.Caption + Chr(13)
Dim dummy
Do
dummy = DoEvents
Loop Until MSComm1.InBufferCount >= 1

End Sub

Private Sub Text17_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Új D gain értéket itt adhatsz meg .  Scroll bar értéke ide kerül."
End Sub

Private Sub Text2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Microcontrollerben jelenleg használt velocity feedback (sebesség visszajelzés) érték"
End Sub

Private Sub Text3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Microcontrollerben jelenleg használt P gain (P tag) érték"
End Sub

Private Sub Text4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Microcontrollerben jelenleg használt I gain (I tag) érték"
End Sub

Private Sub Text5_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
StatusBar1.Panels(2).Text = "Microcontrollerben jelenleg használt torque limit (nyomaték határ) érték. Motor max áram : " & Text5 / 100 & " Amper"

If Err.Number = 13 Then
StatusBar1.Panels(2).Text = "Microcontrollerben jelenleg használt torque limit (nyomaték határ) érték"

Else
End If
End Sub

Private Sub Text6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Microcontrollerben jelenleg használt EMF érték"
End Sub

Private Sub Text7_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
StatusBar1.Panels(2).Text = "Microcontrollerben jelenleg használt gear ratio érték (áttétel : 256=1:4 , 1024=1:1). Áttétel : 1:" & 1024 / Text7

If Err.Number = 13 Then
StatusBar1.Panels(2).Text = "Microcontrollerben jelenleg használt gear ratio érték (áttétel : 256=1:4 , 1024=1:1)."
Else
End If

End Sub

Private Sub Text8_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(2).Text = "Microcontrollerben jelenleg használt D gain (D tag) érték"
End Sub

Private Sub Text9_Change()
If Text9.Text = "0" Then
Text9.Text = ""
Else


End If


On Error Resume Next
Text9.Text = Int(Text9.Text)

    If Err.Number = 13 Then
    MsgBox "Csak egész számérték a megengedett!", , "Hibás adatbevitel"
    Text9.Text = ""
    GoTo 1
    Else
End If

1
End Sub


Private Sub Text9_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
StatusBar1.Panels(2).Text = "Léptetés P0 sebességen parancs esetén (" & Text9 / 4 & ") lépést lép a motor majd megáll."
If Err.Number = 13 Then
StatusBar1.Panels(2).Text = "Léptetés P0 sebességen parancs esetén az itt beállított érték / 4 - el lépést lép a motor majd megáll."

Else
End If
End Sub


