MCPcopy Create free account
hub / github.com/LabPy/lantz / IEEE4882Driver

Class IEEE4882Driver

lantz/drivers/legacy/ieee4882.py:15–172  ·  view source on GitHub ↗

Implements mandatory functions for a IEE488.2 device. You can use it as a mixin class.

Source from the content-addressed store, hash-verified

13
14
15class IEEE4882Driver(Driver):
16 """Implements mandatory functions for a IEE488.2 device.
17
18 You can use it as a mixin class.
19 """
20
21 @Feat(read_once=True)
22 def idn(self):
23 """Instrument identification.
24 """
25 return self.parse_query('*IDN?',
26 format='{manufacturer:s},{model:s},{serialno:s},{softno:s}')
27
28 @Feat(read_once=True)
29 def fitted_options(self):
30 """Fitted options.
31 """
32 return self.query('*OPT?').split(',')
33
34 @Action()
35 def reset(self):
36 """Set the instrument functions to the factory default power up state.
37 """
38 self.send('*RST')
39
40 @Action()
41 def self_test(self):
42 """Performs a complete instrument self-test.
43
44 If test fails, one or more error messages will provide additional information.
45 When available, Use SYSTem:ERRor? to read error queue.
46 """
47 return self.query('*TST?') == '0'
48
49 @Action()
50 def wait(self):
51 """Inhibit execution of an overlapped command until the execution of
52 the preceding operation has been completed.
53 """
54 self.send('*WAI')
55
56 @Action()
57 def trigger(self):
58 """Equivalent to Group Execute Trigger.
59 """
60 self.send('*TRG')
61
62 @Feat()
63 def status_byte(self):
64 """Status byte, a number between 0-255.
65
66 Decimal sum of the bits in the register.
67 Bit #6: Master Summary Status Bit (MSS)
68 This bit is set, if one of the bits in STB becomes true
69 and the corresponding bit in the SRE is enabled.
70 Bit #5: Event Summary Bit (ESB)
71 This bit is set, if one of the bits in ESR becomes true
72 and the corresponding bit in the ESE is enabled.

Callers

nothing calls this directly

Calls 1

FeatClass · 0.90

Tested by

no test coverage detected