Queries points stored in the Channel buffer :param channel: Number of the channel (1, 2). :param start: Index of the buffer to start. :param length: Number of points to read. Defaults to the number of points in the buffer. :param format: Transf
(self, channel, start=0, length=None, format='A')
| 485 | |
| 486 | @Action() |
| 487 | def read_buffer(self, channel, start=0, length=None, format='A'): |
| 488 | """Queries points stored in the Channel buffer |
| 489 | |
| 490 | :param channel: Number of the channel (1, 2). |
| 491 | :param start: Index of the buffer to start. |
| 492 | :param length: Number of points to read. |
| 493 | Defaults to the number of points in the buffer. |
| 494 | :param format: Transfer format |
| 495 | 'a': ASCII (slow) |
| 496 | 'b': IEEE Binary (fast) - NOT IMPLEMENTED |
| 497 | 'c': Non-IEEE Binary (fastest) - NOT IMPLEMENTED |
| 498 | """ |
| 499 | |
| 500 | cmd = 'TRCA' |
| 501 | if not length: |
| 502 | length = self.buffer_length |
| 503 | self.send('{}? {},{},{}'.format(cmd, channel, start, length)) |
| 504 | if cmd == 'TRCA': |
| 505 | data = self.recv() |
| 506 | return np.fromstring(data, sep=',') * ureg.volt |
| 507 | else: |
| 508 | raise ValueError('{} transfer format is not implemented'.format(format)) |
| 509 | |
| 510 | # Fast |
| 511 | # STRD |