7.DrDAQ SDK Modified Example
-
Upload
carlos-tibussi -
Category
Documents
-
view
215 -
download
0
Transcript of 7.DrDAQ SDK Modified Example
-
7/25/2019 7.DrDAQ SDK Modified Example
1/2
Sub GetData() Dim handle As Integer Dim status As Long Dim channels( 4) As Long 'CHANGE
Dim ready As Integer Dim o er!lo" As Integer Dim triggerInde# As Long Dim n$alues As Long Dim alues( 40 ) As Integer 'CHANGE Dim i As Integer Dim %o" As Integer Dim re&uiredSi e As Integer Dim S As String **
%ange(+A,-./**0/+)1Clear
status 2 3sbDrDa&45en3nit(handle)
I! status 67 8 9hen :sg;o# +3nit not o5ened+< b4=4nly< +Error :essage+ Cells(,,< +L+)1 alue 2 +DrDA> not o5ened+ E#it Sub End I!
' Get the unit in!ormation Cells( 3< +L+)1 alue 2 +3nit o5ened+ 'CHANGE SLegnth 2 3sbDrDa&Get3nitIn!o(handle< S< **< re&uiredSi e< 0) Cells( 4, +L+)1 alue 2 S 'CHANGE SLegnth 2 3sbDrDa&Get3nitIn!o(handle< S< **< re&uiredSi e< ?) Cells( 5< +L+)1 alue 2 +Serial number-+ 'CHANGE Cells( 5< +:+)1 alue 2 S 'CHANGE SLegnth 2 3sbDrDa&Get3nitIn!o(handle< S< **< re&uiredSi e< 8) Cells( 6< +L+)1 alue 2 +Dri er ersion-+ 'CHANGE Cells( 6< +:+)1 alue 2 S 'CHANGE
'Set Digital out5ut status 2 3sbDrDa&SetD4(handle< ,< ,)
status 2 3sbDrDa&SetD4(handle< ,< 8)
'Collect a 100 seconds bloc@ containing 10 sam5les on all channels 'CHANGE
channels(8) 2 , 'CHANGE
channels(,) 2 'CHANGE channels( ) 2 0 'CHANGE
channels(0) 2
-
7/25/2019 7.DrDAQ SDK Modified Example
2/2