Skip to content

Commit 8393f5c

Browse files
Update scope_wrapper.py
1 parent 8ac9f81 commit 8393f5c

1 file changed

Lines changed: 28 additions & 8 deletions

File tree

src/scope_wrapper.py

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,34 +156,54 @@ def setchannelcal(self,channel,cal):
156156
of the corresponding channel. Unit is s and using engineering notation """
157157
self.scope.write("CHAN%d:TCAL %s " %(channel,cal))
158158

159-
def querychannelscale(self,channel):#TODO understand this
159+
def querychannelscale(self,channel):
160+
"""Query the vertical scale of the specified channel. The default unit is V and uses engineering notation.
161+
this is also dependend on the probe attenuation
162+
"""
160163
scale=self.scope.query("CHAN%d:SCAL? " %channel)
161164
return scale
162165

163166
def setchannelscale(self,channel,scale):
167+
"""Sets the vertical scale of the specified channel. The default unit is V and uses engineering notation.
168+
this is also dependend on the probe attenuation
169+
"""
164170
self.scope.write("CHAN%d:SCAL %s " %(channel,scale))
165171

166-
def querychannelvernier(self,channel):
167-
status= self.scope.query("CHAN%d:VERN? " % channel)
168-
return status
169-
def setchannelvernier(self,channel,vernier):
170-
171-
self.scope.write("CHAN%d:VERN %s " % (channel, vernier))
172172

173-
def queryproberatio(self,channel):#TODO understand this
173+
def queryproberatio(self,channel):
174+
"""Querry's the probe ratio.Default value is 10x . This is the attenuation of speccified channel.
175+
Using the following attenuations 0.01|0.02|0.05|0.1|0.2|0.5|1|2|5|10|20|50|
176+
100|200|500|1000"""
174177
proberatio=self.scope.query("CHAN%d:PROB? " %channel)
175178
return proberatio
176179

177180
def setproberatio(self,channel,ratio):
181+
"""Sets the probe ratio.Default value is 10x . This is the attenuation of speccified channel.
182+
Using the following attenuations 0.01|0.02|0.05|0.1|0.2|0.5|1|2|5|10|20|50|
183+
100|200|500|1000"""
178184
self.scope.write("CHAN%d:PROB %s " %(channel,ratio))
179185

180186
def querychanelunit(self,channel):
187+
"""Querry's the channel unit of the specified channel. The following parameters can be returned
188+
VOLTage|WATT|AMPere|UNKNown. Default value is VOLTage"""
181189
unit = self.scope.query("CHAN%d:UNIT? " % channel)
182190
return unit
183191

184192
def setchannelunit(self,channel,unit):
193+
"""Querry's the channel unit of the specified channel. The following parameters can be passed
194+
VOLTage|WATT|AMPere|UNKNown. Default value is VOLTage"""
185195
self.scope.write("CHAN%d:UNIT %s " % (channel, unit))
186196

197+
def querrychannelvernier(self,channel):
198+
"""Querry's the vernier status of the speccified channel. The default state is of"""
199+
vernier=self.scope.write("CHAN%d:VERN ?" % (channel))
200+
return vernier
201+
202+
def setchannelvernier(self,channel,vernier):
203+
""" sets the vernier status of the speccified channel. """
204+
self.scope.write("CHAN%d:VERN %s " % (channel, vernier))
205+
206+
187207
def querycursormode(self):
188208
mode = self.scope.query("CURS:MODE?")
189209
return mode

0 commit comments

Comments
 (0)