I am currently working with the Digital Discovery Device, with the intent of receiving signals from a shift register.
I have used the WF_SDK library and change it a little to satisfy some needs I have.
I am able to generate patterns with the patter.py file and use them as an output, then record those signals with the logic.py file and use them as an input to create a bus.
My problem comes when I try to record signals from the shift register, it seems that the logic.py file is not able to read the data to an internal buffer. Specifically, it get stuck in line 150 of the logic.py script.
while True:
status = ctypes.c_byte() # variable to store buffer status
I am not sure why this happens, it may be something related to the trigger or the data type the script is waiting for.
If you could help me with this, it would be great.
Thank you beforehand, I will be waiting for your answer.
Pd: I have attached the test_logic-pattern.py which I am using to write the main script and call de .py files in the WF_SDK folder. And the logic.py in which the problem seems to happen. I have modified the logic.py a little in order to control some settings from the main script.
Question
JoRoBan
Hello,
I am currently working with the Digital Discovery Device, with the intent of receiving signals from a shift register.
I have used the WF_SDK library and change it a little to satisfy some needs I have.
I am able to generate patterns with the patter.py file and use them as an output, then record those signals with the logic.py file and use them as an input to create a bus.
My problem comes when I try to record signals from the shift register, it seems that the logic.py file is not able to read the data to an internal buffer. Specifically, it get stuck in line 150 of the logic.py script.
while True:
status = ctypes.c_byte() # variable to store buffer status
dwf.FDwfDigitalInStatus(device_data.handle, ctypes.c_bool(True), ctypes.byref(status))
#ctypes.byref
if status.value == constants.stsDone.value:
# exit loop when finished
break
I am not sure why this happens, it may be something related to the trigger or the data type the script is waiting for.
If you could help me with this, it would be great.
Thank you beforehand, I will be waiting for your answer.
Pd: I have attached the test_logic-pattern.py which I am using to write the main script and call de .py files in the WF_SDK folder. And the logic.py in which the problem seems to happen. I have modified the logic.py a little in order to control some settings from the main script.
test_logic-pattern.py logic.py
Link to comment
Share on other sites
1 answer 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