result will be the same, and array length will be the same(64).
If I understand correctly, then the data from the AD3 buffer with a depth of 64 bits was read into a memory area with a depth of 64 bits and therefore the result cannot be greater, which is logical.
But, if I changed the next line:
data = digitalIn.statusData(64)
to
data = digitalIn.statusData(2*64)
array length will be the 128.
But, if I understated correctly, this parameter in function should do the same as in original py example:
def statusData(self, count_bytes: int)-> np.ndarray:"""Retrieve the acquired data samples from the |DigitalIn| instrument.
Todo:
Figure out the data format.
Raises:
DwfLibraryError: An error occurred while executing the operation.
"""
samples = np.empty(count_bytes, dtype='B')
result = self.lib.FDwfDigitalInStatusData(
self.hdwf,
samples.ctypes.data_as(typespec_ctypes.c_unsigned_char_ptr),
count_bytes)if result != RESULT_SUCCESS:raise self.dwf.exception()return samples
Question
Kirsan
Hi @reddish and @attila.
I try to use digital inputs(logic analyzer[LA]) + pydwf + AD2/3.
I'm relatively new to using Python.
My main task is use patterns and LA at the same time to program and read some IC with unique protocol.
So at first I tried to use LA and python.
I send signals to two inputs (D0, D1):
The next step, I used standard py example with little changes to see how it should works:
And result is:
It looks normal and correct.
Next step, I tried to realized the same via pydwf with some little changes:
And result is:
It looks strange. Looks like signal missed some data).
In general, both scripts do the same, but results are different.
I also noted that if I change in the next line:
coefficient from 2 to 1 or 4(for example):
dwf.FDwfDigitalInStatusData(hdwf, rgwSamples, 4*cSamples)
result will be the same, and array length will be the same(64).
If I understand correctly, then the data from the AD3 buffer with a depth of 64 bits was read into a memory area with a depth of 64 bits and therefore the result cannot be greater, which is logical.
But, if I changed the next line:
to
array length will be the 128.
But, if I understated correctly, this parameter in function should do the same as in original py example:
Could you please help me?)
Edited by KirsanLink to comment
Share on other sites
21 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