Version 1.1 (released 14 April 2021)
http://razorbillinstruments.com
Page 37 of 40
M
P
2
4
0
:
H
IG
H
I
S
O
L
A
T
IO
N
M
U
LT
IP
L
E
X
E
R
Example Code Snippet
The following commands will enable channel 1, then disable it
while enabling channel 2, then return to the initial state (all
channels disabled)
SELECT 1
SELECT 2
SELECT 0
And here is an example of how you might achieve that in Python
(requires PySerial to be installed):
import serial
import time
with serial.Serial('COM1') as mp240:
mp240.write(b'SELECT 1\n')
time.sleep(1)
# take a measurement here
mp240.write(b'SELECT 2\n')
time.sleep(1)
# take a measurement here
mp240.write(b'SELECT 0\n')
The comments (#) should be replaced with code that takes a
measurement from the capacitance bridge or other multiplexed
device. The time.sleep() commands allow time for the
multiplexer to operate and the capacitance bridge to adjust to the