I have a LabVIEW project that I am working on that uses the analog inputs of the AD2 device to make measurements. The subVI for the oscilloscope measurements (attached) calls a list of AD2 functions and then starts a while loop that polls the AD2 for status. The Analog In Status function is expected to return the value 2 which represents done, which ends the loop and then the LabVIEW software reads the data from the AD2. This subVI is run at approximately 2Hz, although other function calls to the AD2 are made in that period as well.
Occasionally, that Analog In Status function will never return a done status, so I created a timeout in that while loop so that the software does not get stuck forever. However, if that timeout occurs, any subsequent calls of the subVI returns bad data that does not match the behavior of the device under test. I can detect these timeouts when they occur, but I cannot determine how to recover the AD2 and begin making reliable measurements again. The timeouts seems to be related to other processes or tasks taking resources on the computer and potentially adding lag to the communication between LabVIEW and the AD2.
Attached is the Faster Scope AD2.vi which is the subVI I am referring to. I cannot share the larger project very easily because it contains sensitive IP.
Question
Chris Pouzou
I have a LabVIEW project that I am working on that uses the analog inputs of the AD2 device to make measurements. The subVI for the oscilloscope measurements (attached) calls a list of AD2 functions and then starts a while loop that polls the AD2 for status. The Analog In Status function is expected to return the value 2 which represents done, which ends the loop and then the LabVIEW software reads the data from the AD2. This subVI is run at approximately 2Hz, although other function calls to the AD2 are made in that period as well.
Occasionally, that Analog In Status function will never return a done status, so I created a timeout in that while loop so that the software does not get stuck forever. However, if that timeout occurs, any subsequent calls of the subVI returns bad data that does not match the behavior of the device under test. I can detect these timeouts when they occur, but I cannot determine how to recover the AD2 and begin making reliable measurements again. The timeouts seems to be related to other processes or tasks taking resources on the computer and potentially adding lag to the communication between LabVIEW and the AD2.
Attached is the Faster Scope AD2.vi which is the subVI I am referring to. I cannot share the larger project very easily because it contains sensitive IP.
Faster Scope AD2.vi
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.