Télécharger Imprimer la page

Hioki BT3563A Manuel D'instructions page 172

Testeur de batterie

Publicité

166
8.8 Programmes d'échantillonnage
(2) Mesurer la résistance par une touche de l'ordinateur
Mesure et importe par l'entrée d'une touche sur l'ordinateur et sauvegarde les mesures dans un fichier texte.
Private Sub MeasureReadSubRS()
Dim recvstr As String
Dim i As Integer
MSComm1.Settings = "9600,n,8,1"
MSComm1.PortOpen = True
Open App.Path & "\data.csv" For Output As #1
MSComm1.Output = ":TRIG:SOUR IMM" & vbCrLf
MSComm1.Output = ":INIT:CONT OFF" & vbCrLf
For i = 1 To 10
'Wait for PC key input
'Create a key input check routine to set InputKey() = True when a key is pressed
Do While 1
If InputKey() = True Then Exit Do
DoEvents
Loop
'After confirming key input, measure once, and read the measured value
MSComm1.Output = ":READ?" & vbCrLf
recvstr = ""
While Right(recvstr, 1) <> Chr(10)
recvstr = recvstr + MSComm1.Input
DoEvents
Wend
recvstr = Left(recvstr, Len(recvstr) - 2)
Print #1, Str(i) & "," & recvstr
Next
Close #1
MSComm1.PortOpen = False
End Sub
'Receiving char string
'Comm port setting
'Open a port
'Open a text file for saving
'Select internal triggering
'Continuous measurement OFF
'Send ":READ?" to measure and import the
measurement
'From here on, continue receiving until an LF code
occurs
'Delete the terminator (CR+LF)
'Write to the file
HIOKI BT3562A960-05

Publicité

loading

Ce manuel est également adapté pour:

Bt3562aBt3561aBt3563Bt3563-01Bt3562Bt3562-01