109
Sample Programs
Measure the internal resistance using the BT3562 and measure the OCV using the DM7276.
Connect the SW1001 and BT3562, DM7276 to their respective COM ports and perform scan
measurement of internal resistance and OCV from CH1 to CH11 for
SLOT 1
.
'Scan measurement sample
Private Sub ScanSample2()
Dim unit_no As Integer
Dim ch_no As Integer
Dim ch_str As String
Dim recv_str As String
Dim ir_str(50) As String
Dim ocv_str(50) As String
Dim i As Integer
MSComm1.CommPort = 3
'Connect the SW1001 to COM3.
MSComm1.Settings = "9600,n,8,1"
MSComm2.CommPort = 4
'Connect the BT3562 to COM4.
MSComm2.Settings = "9600,n,8,1"
MSComm3.CommPort = 5
'Connect the DM7276 to COM5.
MSComm3.Settings = "9600,n,8,1"
MSComm1.PortOpen = True
MSComm2.PortOpen = True
MSComm3.PortOpen = True
Open App.Path & "\data.csv" For Output As #1
'Open a file for saving.
SendCommand MSComm1, ":SYST:MOD:WIRE:MODE 1,WIRE4"
'Configure SLOT1 as a 4-wire connection.
SendCommand MSComm1, "
*
OPC?"
'Wait for the operation to complete.
ReceiveCOM MSComm1
SendCommand MSComm2, ":INIT:CONT OFF"
'Turn off the continuous measurement of BT3562.
i = 0
For unit_no = 1 To 1
For ch_no = 1 To 11
ch_str = Format(unit_no, "00") & Format(ch_no, "00")
'Create a string to specify the channel.
SendCommand MSComm1, ":CLOS " & ch_str
'Close the specified channel.
SendCommand MSComm1, "
*
OPC?"
'Wait for the closing of the channel to complete.
ReceiveCOM MSComm1
SendCommand MSComm2, ":READ?"
'Send the one-time measurement command to
the BT3562.
ir_str(i) = ReceiveCOM(MSComm2)
'Receive the measured value.
i = i + 1
Next
Next
SendCommand MSComm1, ":SYST:MOD:WIRE:MODE 1,WIRE2"
'Configure SLOT1 as a 2-wire connection.
SendCommand MSComm1, "
*
OPC?"
'Wait for the operation to complete.
ReceiveCOM MSComm1
i = 0
For unit_no = 1 To 1
For ch_no = 12 To 22
'The 2-wire CH12 corresponds to the 4-wire CH1
sense.
ch_str = Format(unit_no, "00") & Format(ch_no, "00")
'Create a string to specify the channel.
SendCommand MSComm1, ":CLOS " & ch_str
'Close the specified channel.
SendCommand MSComm1, "
*
OPC?"
'Wait for the closing of the channel to complete.
ReceiveCOM MSComm1
SendCommand MSComm3, ":READ?"
'Send the one-time measurement command to
the DM7276.
ocv_str(i) = ReceiveCOM(MSComm3)
'Receive the measured value.
i = i + 1
Next
Next
SendCommand MSComm1, ":OPEN"
'Open all relays after the scan completes.
8
Communication Function
Содержание SW1001
Страница 2: ......
Страница 42: ...38 Precautions for Measurement...
Страница 48: ...44 Resetting Scan Operation...
Страница 50: ...46 Checking the Device Status...
Страница 52: ...48 Initialization Settings...
Страница 118: ...114 Sample Programs 3 Select File Save All 4 Check the save location and click Save as...
Страница 156: ...152 Outline Drawings 12 4 Outline Drawings SW1001 Unit mm Tolerance 0 2...
Страница 157: ...153 Outline Drawings SW1002 Unit mm Tolerance 0 2 12 Appendix...
Страница 158: ...154 Outline Drawings...
Страница 161: ...16 01 EN...
Страница 162: ......
Страница 163: ......
Страница 164: ......