11-17-2016 07:11 PM
For analog output on the X series, it is possible to record the output actually produced using the _aoN_vs_aognd internal source available to the analog input hardware. This is pretty useful for synchronizing different pieces of software on the same machine without running wires or rewriting existing programs.
Is there anything similar for DO? I would like a way to check the state of a DO channel that is already in use without having to actually wire a connector to it, but I don't see any obvious way to route it to an AI, PFI, etc.
11-18-2016 07:53 AM
At least for software-timed DIO tasks, the answer is both simple and kinda surprising. Just use your DO task refnum and wire it to DAQmx Read.
Can't test now, but I suspect this might not work for hw-timed DO tasks.
-Kevin P
11-18-2016 10:28 AM
I wouldn't have access to that from another process though right? Usually if I try to access a DO from another program (for logging), its an error since the hardware is in use.
11-18-2016 12:56 PM
Assuming your other "process" is still part of the same overall application, then you just need to provide that process with the DO task refnum. Note: it *is* important that they share the *same* refnum though, you can't have the other process try to make its own task that wants access to the same hardware.
If you've got 2 separate applications, then you'll probably need to approach things another way. Either combine the applications or parallel wire from the DO pins to some pins you can access with a DI task.
-Kevin P