DME1600
49
Sample Programs
App
Rem send reset command '*RST' -- reset DME1600
stat = viWrite(sesn, "*RST", 4, ret)
If (stat < VI_SUCCESS) Then
MsgBox "System command error. (*RST)", vbExclamation, "DME1600
multimeter device test"
stat = viClose(fList)
Exit Sub
End If
Rem send Clear command '*CLS'-- Clear DME1600 status register
stat = viWrite(sesn, "*CLS", 4, ret)
If (stat < VI_SUCCESS) Then
MsgBox "System command error. (*CLS)", vbExclamation, "DME1600
multimeter device test"
stat = viClose(fList)
Exit Sub
End If
Rem send command -- 50 ohm reference resistance
stat = viWrite(sesn, "CALC:DBM:REF 50", 15, ret)
If (stat < VI_SUCCESS) Then
MsgBox "System command error.", vbExclamation, "DME1600 multimeter
device test"
stat = viClose(fList)
Exit Sub
End If
Rem send command -- Set DME1600 to 1 amp ac range
stat = viWrite(sesn, "CONF:VOLT:AC 1,0.001", 20, ret)
If (stat < VI_SUCCESS) Then
MsgBox "System command error.", vbExclamation, "DME1600 multimeter
device test"
stat = viClose(fList)
Exit Sub
End If
Rem send command -- Select 200 Hz (fast) ac filter
stat = viWrite(sesn, "DET:BAND 200", 12, ret)
If (stat < VI_SUCCESS) Then
MsgBox "System command error.", vbExclamation, "DME1600 multimeter
device test"
stat = viClose(fList)
Exit Sub
End If
Rem send command -- DME1600 will accept 5 triggers
stat = viWrite(sesn, "SAMP:COUN 5", 11, ret)
If (stat < VI_SUCCESS) Then
MsgBox "System command error.", vbExclamation, "DME1600 multimeter
device test"
stat = viClose(fList)
Exit Sub
End If
Rem send command -- Trigger source is IMMediate
stat = viWrite(sesn, "TRIG:SOUR IMM", 13, ret)
If (stat < VI_SUCCESS) Then
MsgBox "System command error.", vbExclamation, "DME1600 multimeter
device test"
stat = viClose(fList)
Exit Sub
End If
Rem send command -- Select dBm function
stat = viWrite(sesn, "CALC:FUNC DBM", 13, ret)
If (stat < VI_SUCCESS) Then
MsgBox "System command error.", vbExclamation, "DME1600 multimeter
device test"
stat = viClose(fList)
Exit Sub
Summary of Contents for DME1600
Page 4: ...4 DME1600 This page left blank intentionally...
Page 5: ...Setup This chapter explains the settings that you need to configure to use the interfaces 1...
Page 9: ...Message Reference This chapter explains the SCPI com mands 2 Message Reference...
Page 43: ...Appendix A Error Messages B Sample Programs...
Page 55: ......