and then in the debugger --after device.open() check this:
device_data.digital.input.max_buffer_size
i get 4k, yet i would expect 16k as that is what the device configuration promises for #4
i'm confused on that, but it get worse (for my confusion)
because then, if i run following script:
try:
DIO_IN = 0
# connect to the device
device_data = device.open(config=4)
logic.open(device_data, sampling_frequency=1024, buffer_size=16*1024)
logic.trigger(device_data, enable=True, channel=DIO_IN, rising_edge=True)
for i in range (1):
buffer = logic.record(device_data, channel=0)
buffer1 = logic.record(device_data, channel=1)
print (len(buffer))
and in the debugger i check the size of buffer, it is indeed 16k
i feed a signal to DIO_IN, however, it is only captured on the first 8k.
i must be missing something, would appreciate to learn what that is.
also: am i right that the process is: you trigger, and then record multiple channel like in my script, or are you supposed somehow to record multiple channels in one record statement to have synchronised data.
Question
erikderuijter
hi, i hope this is not a dumb question.
i have an analog discovery 2, it works well (super happy with it) and also the python scripting works.
however:
if i just do following:
from WF_SDK import device, logic, error # import instruments device_data = device.open(config=4)
and then in the debugger --after device.open() check this:
device_data.digital.input.max_buffer_size
i get 4k, yet i would expect 16k as that is what the device configuration promises for #4
i'm confused on that, but it get worse (for my confusion)
because then, if i run following script:
try: DIO_IN = 0 # connect to the device device_data = device.open(config=4) logic.open(device_data, sampling_frequency=1024, buffer_size=16*1024) logic.trigger(device_data, enable=True, channel=DIO_IN, rising_edge=True) for i in range (1): buffer = logic.record(device_data, channel=0) buffer1 = logic.record(device_data, channel=1) print (len(buffer))
and in the debugger i check the size of buffer, it is indeed 16k
i feed a signal to DIO_IN, however, it is only captured on the first 8k.
i must be missing something, would appreciate to learn what that is.
also: am i right that the process is: you trigger, and then record multiple channel like in my script, or are you supposed somehow to record multiple channels in one record statement to have synchronised data.
sorry if it is a simple mistake. thanks!
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now