B&K Precision 1785B, 1786B, 1787B, 1788 Power supply Python LibraryTable of ContentsIntroduction 2Prerequisites 2Why a Library is Useful 3Using th
Set output voltageSet output current Input values: Current output current: 0.0 A Current output voltage: 0.02 V Power supply state:
TroubleshootingAll my commands are failingIf you get the message Command cannot be carried out (i.e., the 0xB0 status byte), it's possible that y
Python ReferencesIf you're an experienced programmer, you can learn python by reading the tutorial that comes with python (it's in the Doc d
AppendicesIntroduction:For convenience, included in the “python.zip” file that can be downloaded from www.bkprecision.com are Python 2.5.2, pyserial 2
If you see no error message after the import serial line, your pyserial installation was successful. Press ctrl-z and return to exit the python inter
IntroductionWe provide a python library, ps178x.py, that can provide programming access to B&K Precision's power supply 1785-1788 series. Th
Why a Library is UsefulThe native programming interface to the power supplies is fairly low-level. It involves sending 26 byte commands and receiving
checksum += ord(cmd[i]) checksum %= 256 return checksumdef main(): port = 3 # COM4 for my computer baudrate = 38400 sp = seria
The first byte of a command is always 0xaa and the second byte is the address of the power supply. The address should be set to 0. The third byte ide
Using the Library from PythonThe pyserial library abstracts the serial port. Thus, you may be able to use the ps178x.py module for python programming
Output Mode: Off Over heat protection: Normal Output State: OFF Output current set to: 5.0 Maximum output voltage: 5.0
ReadingGetReading()Gets the reading for the current displayed output current and output voltage, the state of the power supply ( output state, over he
Using the COM ServerUsing the COM server will only work on Windows computers. You'll need to install python, pyserial, and pywin32; please refer
Comments to this Manuals