| None = add_channel(integer ch) | |
| Adds
the
specified
channel to the active channel list, to be used by multi_read_block(). |
#
Add first and second channels p.add_channel(0) p.add_channel(1) |
| None = del_channel(integer ch) | |
| Deletes
the
specified channel from the active channel list, to be used by
multi_read_block(). |
#
Remove all channels for i in range(4) # i from 0 to 3 p.del_channel(i) |
| None = enable_set_high(integer input_socket) | |
| Makes
the
Sspecified
Digital Output BIT HIGH just before digitization starts. enable_set_low() is a similar function. |
#
Set D3 HIGH before digitizing p.enable_set_high(3) |
| None
= enable_wait_high(integer bit) , None = enable_wait_low(integer bit) |
|
| Start
digitization
only after detecting a HIGH / LOW on the specified BIT |
#
Start after seeing a HIGH on
D3 input p.enable_raising_wait(3) |
| [(float ts, float adval),....] = read_block (integer np, integer delay, integer bipolar) | |
|
Digitizes the
selected
ADC input
np: number of samples ( upto 800 bytes of data) delay : gap between two samples(10 to 1000 usecs) bipolar: Set to 1 if feeding through the (x+5)/5 amplifier ts : time stamps adval : voltage in mv. |
#200
points, 20 usec apart,
using (x+5)/2 amplifier result = p.read_block (200, 20, 1) for k in range(256): print result[k][0], ' ', result[k][1] |
| [(float
ts, float ad0, float ad1, ..), ..] = multi_read_block
(integer np, integer delay, integer bipolar) |
|
| Digitizes
the ADC
inputs (multiple channels) np : number of digitizations.(maximum data 800 bytes) delay : interval between two digitizations(10 to 1000) ts : time stamp This routine digitizes the active channels one by one. Due to the delay between samples, you will see a phase shift even if same wave is given to all inputs. |
#digitize
and print selected
bipolar
channels
with timestamp p.add_channel(0) p.add_channel(1) result = p.multi_read_block (200,10,1) for val in result: print val[0], val[1], val[2] |
| boolean
= smrb_start
(integer np, integer delay, integer bipolar) |
|
| Digitizes
the ADC
inputs (multiple channels) np : number of digitizations.(maximum data 800 bytes) delay : interval between two digitizations(10 to 1000) milli seconds ts : time stamp This routine digitizes the active channels one by one. Due to the delay between samples, you will see a phase shift even if same wave is given to all inputs. |
#digitize
selected
inputs fed through (x+5)/2 amp p.add_channel(0) p.add_channel(1) p.smrb_start(200,10,1) |
| boolean
smrb_running() |
|
| Returns
True if an SMRB read is in progress |
while
p.smrb_running()
== True: # wait loop pass |
| [(float
ts, float ad0, float ad1, ..), ..] =
smrb_getdata() |
|
| Returns
the SMRB data in a list of tuplets. Same format as MRB. Call this only
after SMRB is over. |
res =
p.smrb_getdata() for val in result: print val[0], val[1], val[2] |
| boolean
= pmrb_start
(integer np, integer delay) |
|
| Digitizes
the ADC
inputs (multiple channels) np : number of digitizations.(maximum data 800 bytes) delay : interval between two digitizations(10 to 1000) milli seconds ts : time stamp This routine digitizes the active channels one by one. Due to the delay between samples, you will see a phase shift even if same wave is given to all inputs. |
#digitize
selected
inputs fed through (x+5)/2 amp p.add_channel(0) p.add_channel(1) p.set_time() p.pmrb_start(200,10,1) |
| boolean
smrb_running() |
|
| Returns
True if an PMRB read is in progress |
while
p.pmrb_running()
== True: # wait loop pass |
| [
[(float
ts, float ad0, float ad1, ..), ..] [info]
]= smrb_getdata() |
|
| Returns
a
list containing two lists. PMRB and the info list containing [npoints, delay, size, numchans, chmask, start_timestamp, end_timestamp] |
data =
p.pmrb_getdata()[0] for item in data: for x in item: print x |