⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmmbrtu.frm

📁 MODBUS串口调试工具源代码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Top             =   600
         Width           =   855
      End
   End
   Begin VB.Frame Frame4 
      BackColor       =   &H00C0E0FF&
      Caption         =   "Polling mode (no wait)"
      Height          =   915
      Left            =   120
      TabIndex        =   19
      Top             =   2280
      Width           =   2235
      Begin VB.TextBox txtPollingTimeout 
         Alignment       =   2  'Center
         Height          =   285
         Left            =   1500
         TabIndex        =   29
         Text            =   "200"
         Top             =   480
         Width           =   615
      End
      Begin VB.CommandButton cmdStopPolling 
         BackColor       =   &H00FFC0C0&
         Caption         =   "Stop"
         Height          =   330
         Left            =   780
         Style           =   1  'Graphical
         TabIndex        =   21
         Top             =   420
         Width           =   555
      End
      Begin VB.CommandButton cmdStartPolling 
         BackColor       =   &H00FFC0C0&
         Caption         =   "Start"
         Height          =   330
         Left            =   120
         Style           =   1  'Graphical
         TabIndex        =   20
         Top             =   420
         Width           =   555
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "Timeout"
         Height          =   255
         Left            =   1500
         TabIndex        =   30
         Top             =   240
         Width           =   615
      End
   End
   Begin VB.Frame Frame2 
      BackColor       =   &H00C0E0FF&
      Caption         =   "Timer mode (fixed period)"
      ForeColor       =   &H00000000&
      Height          =   1155
      Left            =   120
      TabIndex        =   13
      Top             =   3480
      Width           =   2235
      Begin VB.TextBox txtInterval 
         Alignment       =   2  'Center
         Height          =   285
         Left            =   840
         TabIndex        =   16
         Text            =   "50"
         Top             =   300
         Width           =   855
      End
      Begin VB.CommandButton cmdStopTimer 
         BackColor       =   &H00FFC0C0&
         Caption         =   "Stop"
         Height          =   315
         Left            =   1200
         Style           =   1  'Graphical
         TabIndex        =   15
         Top             =   660
         Width           =   795
      End
      Begin VB.CommandButton cmdStartTimer 
         BackColor       =   &H00FFC0C0&
         Caption         =   "Start"
         Height          =   315
         Left            =   240
         Style           =   1  'Graphical
         TabIndex        =   14
         Top             =   660
         Width           =   795
      End
      Begin VB.Label Label12 
         BackStyle       =   0  'Transparent
         Caption         =   "ms"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   1740
         TabIndex        =   18
         Top             =   300
         Width           =   375
      End
      Begin VB.Label Label11 
         BackStyle       =   0  'Transparent
         Caption         =   "Interval"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   17
         Top             =   300
         Width           =   735
      End
   End
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   50
      Left            =   1620
      Top             =   4440
   End
   Begin MSCommLib.MSComm MSComm1 
      Left            =   480
      Top             =   4020
      _ExtentX        =   1005
      _ExtentY        =   1005
      _Version        =   393216
      DTREnable       =   -1  'True
   End
   Begin VB.Frame Frame3 
      BackColor       =   &H00C0E0FF&
      Caption         =   "COM status"
      ClipControls    =   0   'False
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2055
      Left            =   120
      TabIndex        =   6
      Top             =   120
      Width           =   2235
      Begin VB.TextBox txtLineControl 
         Alignment       =   2  'Center
         Height          =   285
         Left            =   1080
         TabIndex        =   11
         TabStop         =   0   'False
         Text            =   "N,8,1"
         Top             =   1080
         Width           =   1005
      End
      Begin VB.CommandButton cmdClose 
         BackColor       =   &H00FFC0C0&
         Caption         =   "Close"
         Height          =   375
         Left            =   1200
         Style           =   1  'Graphical
         TabIndex        =   10
         Top             =   1560
         Width           =   855
      End
      Begin VB.CommandButton cmdOpen 
         BackColor       =   &H00FFC0C0&
         Caption         =   "Open"
         Height          =   375
         Left            =   120
         Style           =   1  'Graphical
         TabIndex        =   9
         Top             =   1560
         Width           =   855
      End
      Begin VB.ComboBox cboBaudrate 
         Height          =   315
         ItemData        =   "frmMBRTU.frx":0E42
         Left            =   120
         List            =   "frmMBRTU.frx":0E5B
         TabIndex        =   8
         Text            =   "Combo1"
         Top             =   720
         Width           =   1965
      End
      Begin VB.ComboBox cboCOM 
         Height          =   315
         ItemData        =   "frmMBRTU.frx":0E8E
         Left            =   120
         List            =   "frmMBRTU.frx":0E90
         TabIndex        =   7
         Text            =   "Combo1"
         Top             =   360
         Width           =   1965
      End
      Begin VB.Label Label4 
         BackStyle       =   0  'Transparent
         Caption         =   "Line control : "
         Height          =   195
         Left            =   120
         TabIndex        =   12
         Top             =   1080
         Width           =   1005
      End
   End
   Begin VB.CommandButton cmdExit 
      BackColor       =   &H00FFC0C0&
      Caption         =   "Exit Program"
      Height          =   375
      Left            =   6660
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   7260
      Width           =   2595
   End
   Begin VB.TextBox txtSend 
      Height          =   1515
      Left            =   120
      MaxLength       =   3000
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   4
      TabStop         =   0   'False
      Top             =   5700
      Width           =   3465
   End
   Begin VB.CommandButton cmdSend 
      BackColor       =   &H00FFC0C0&
      Caption         =   "Send Command"
      Height          =   375
      Left            =   7440
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   4980
      Width           =   1815
   End
   Begin VB.TextBox txtString 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   120
      TabIndex        =   2
      Text            =   "1 4 0 0 0 1  "
      Top             =   4980
      Width           =   7275
   End
   Begin VB.CommandButton cmdClearSendReceive 
      BackColor       =   &H00FFC0C0&
      Caption         =   "Clear Lists"
      Height          =   375
      Left            =   120
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   7260
      Width           =   6405
   End
   Begin VB.TextBox txtReceive 
      Height          =   1515
      Left            =   3660
      MaxLength       =   3000
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   0
      TabStop         =   0   'False
      Top             =   5700
      Width           =   5595
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "Command"
      Height          =   255
      Left            =   120
      TabIndex        =   49
      Top             =   4740
      Width           =   915
   End
   Begin VB.Label Label18 
      BackStyle       =   0  'Transparent
      Caption         =   "Responses"
      Height          =   255
      Left            =   5760
      TabIndex        =   32
      Top             =   5460
      Width           =   1515
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "Commands"
      Height          =   255
      Left            =   1260
      TabIndex        =   31
      Top             =   5460
      Width           =   1515
   End
End
Attribute VB_Name = "frmMBRTU"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'ModbusMaster
'
'[21,Jan,2002] by Kevin

'CRC16 Table

'1.0.1 [25,Mar,2003] by Kevin
'      Disable display when auto-send to improve performance
'
'1.0.2 [27,May,2003] by Kevin
'      Enable display again
'
'1.0.3 [10,Jun,2003] by Kevin
'      Add polling mode
'
'1.0.4 [26,Jun,2003] by Kevin
'      Fix bug
'      The total received bytes are less than the data shown
'      on received-text box.
'
'1.0.5 [24,Nov,2003] by Kevin
'      Modifies the polling mode to get exacter communication time.
'      Because the actions that not necessary in polling mode are removed.
'
'      Before this version ===> Step 1: Generates the Modbus data frame
'                               Step 2: Sends the data frame
'                               Setp 3: Gets response
'                               Step 4: Shows Modbus request and response
'                               Repeats step 1 ~ step 4
'
'      At this version     ===> Step 1: Generates the Modbus data frame
'                               Step 2: Sends the data frame
'                               Setp 3: Gets response
'                               Repeats step 2 ~ step 3
'
'1.0.6 [12,Apr,2005] by Kevin
'      Re-arrange all items in the statistic frame.
'
'
'1.0.7 [5,Mar,2007] by Kevin
'      Add a check box to allow users deside to append CRC or not apeend CRC bytes.
'      

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -