Bryan Posted June 8, 2004 Report Share Posted June 8, 2004 In my PXI system, I dynamically create a channel/task with all of my lines/ports that are configured as inputs. Using the DAQmx Timing Polymorphic VI (with Change Detection selected) I wire my task and the same physical channels used to create it to the VI. My intent is to monitor all input digital lines and return all of the input values if any line changes state at any time. Now, the VI has a timeout terminal (in seconds) that you can set to -1, which makes the VI wait indefinitely for a change on the input lines. This matches what I want to do, however, when I want to stop monitoring the channels, I have to wait until another state change before the VI will return. I've tried doing like I've done with queues and destroying/clearing the tasks, hoping that it will force the VI to return with an error, but nothing happens. Is there a way that I can abort the VI while it's waiting through the software? I'm currently searching through the DAQmx VI palette for functions that might hold clues. My unfamiliarity with DAQmx isn't helping either. :headbang: One way I can think of to do this is to wire one of my output lines to one of the input lines I'm monitoring, and when I want to abort it, set the output line high, which will generate the change and have the function return. I'd like to avoid tying up any of my digital lines like this if possible. Thanks guys! Quote Link to comment
Bryan Posted June 8, 2004 Author Report Share Posted June 8, 2004 Nevermind guys, I set up a scenario and monitored the PXI controller processor performance using the change state timing VI and found that CPU usage went up to 100% or so. I created my own version of a digital input monitoring VI using the task start and read channels VI with my own 'new value notification" and it used FAR LESS resources. (CPU usage with just my VI alone allowed it to drop to < 8%). I think the DAQmx timer change state function was monitoring the channels at full processor speed (~2GHz) with is MUCH faster than I need for my application. Sorry to end up solving my own problem, but hopefully it will help those who might run into the same situation. Thanks anyways! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.