Programming Guide for DS1000E, DS1000D Series
3-13
lpszBuffer As Long) As Boolean
Private Declare Function GetDeviceNum Lib "RigolTMCUsb_UI.dll" () As Long
5.
Add a subfunction as follows to send commands and get returned values.
'send a setting command
Sub SendToUSB(cmd As String)
Dim retcode As Boolean
Dim send_buf(256) As Byte
Dim temp As Long
Dim cmdstr As String
cmdstr = cmd
temp = Len(cmdstr)
For i = 0 To temp - 1
tempStr = Mid(cmdstr, i + 1, 1)
send_buf(i) = Asc(tempStr)
Next i
'send a command to the oscilloscope
' the definition of interface has been mentioned in Rigolusb.h
retcode = WriteUSB(0, 1, 1, Len(cmdstr), VarPtr(send_buf(0)))
End Sub
'acquire the Returned Value
Public Function Read_USB() As Long
Dim retcode As Boolean
Dim i, size As Long
Dim rSize As Long
rSize = 100
'send the command to the oscilloscope
retcode = WriteUSB(0, 2, 2, 10240, 0)
'get value from the oscilloscope
retcode = ReadUSB(0, VarPtr(rSize), VarPtr(rcv_buffer(0)))
Содержание DS1000E Series, DS1000D Series
Страница 1: ...RIGOL Programming Guide DS1000E DS1000D Series Digital Oscilloscope July 2009 RIGOL Technologies Inc ...
Страница 2: ......
Страница 6: ......
Страница 86: ...RIGOL Command Systems Programming Guide for DS1000E DS1000D Series 2 74 LA GROU1 SIZ The query returns SMALL ...
Страница 102: ......
Страница 129: ...Programming Guide for DS1000E DS1000D Series 3 27 After you set the Start event see the result below ...
Страница 132: ......