EasyManuals Logo

ADCMT 6146 User Manual

ADCMT 6146
260 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #194 background imageLoading...
Page #194 background image
6146/6156 DC Voltage/Current Generators Operation Manual
5.9.1 Common Sub Procedures for Interface Control
5-46
5.9.1 Common Sub Procedures for Interface Control
5.9.1.1 Common Sub Procedure to Program Examples Using GPIB
' GPIB data transmission sub procedure
Sub gpibwrt(intDes As Integer, strCmd As String)
Call ibwrt(intDes, strCmd & vbLf) ' Sends adding the LF character.
End Sub
' GPIB data transmission sub procedure
Sub gpibrd(intDes As Integer, strData As String)
Dim strRawStr As String * 30 ' Data receive buffer
Dim intSize As Integer ' Number of characters to be extracted
Call ibrd(intDes, strRawStr) ' Reception (buffer number only)
If InStr(strRawStr, vbCr) <> 0 Then ' Searches for the CR or CL character.
intSize = InStr(strRawStr, vbCr) - 1
ElseIf InStr(strRawStr, vbLf) <> 0 Then
intSize = InStr(strRawStr, vbLf) - 1
End If
If intSize = 0 Then ' Checks the search result.
strData = ""
Else
strData = Left$(strRawStr, intSize) ' Extracts except the CR/LF character.
End If
End Sub
5.9.1.2 Common Sub Procedure to Program Examples Using USB
' USB driver initialization sub procedure
Sub aUSBSta(lngTimeOut As Long)
Dim lngRet As Long ' USB driver return value
lngRet = ausb_start(lngTimeOut)
If lngRet = OK Then
blnUSBComErr = False ' If OK
Else
blnUSBComErr = True ' If not OK
MsgBox"USB initialization error", vbCritical, "error:" & lngRet
End If
Call mSecSleep(100) ' Waits for USB initialization (100 ms)
End Sub

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ADCMT 6146 and is the answer not in the manual?

ADCMT 6146 Specifications

General IconGeneral
BrandADCMT
Model6146
CategoryPortable Generator
LanguageEnglish

Related product manuals