11-15-2008 11:27 AM
Hi, all
I've done Programme A, which is a DAQ VI, implements synchronized AI/AO/DO tasks; and Programme B, in which we use keyboard and buttons on the front panel to control itself. Now I want to add some code in B, so that it can be controlled by the DO of A (so that B can be synchronized with A). I can connect the DI of B and DO of B by the hardware connection, but is it possible I do it just by software? I want to generate the execute files for both A and B, so I dont want to add them to another programme. Any suggestion? Thank you.
Best wishes,
Bo
Solved! Go to Solution.
11-17-2008 03:29 AM
Bo,
this depends on your architectures of A and B.
DAQmx is capable of creating user events for DI or DO. For DI for instance it is possible to create events on a change detection.
Maybe this is a solution for you.
Another question you have to answer is:
What timedelay is acceptable for you for the synchronization? Is pure software synchronization (e.g. Queue/Notifier) sufficient?
If YES for the second question, this would be a nice solution as well.
hope this helps,
Norbert
11-17-2008 05:07 AM
Hi Norbert,
Thank you for your reply. But I think what you suggested is for a single VI with 2 structures. Yet my situation is 2 seperate VIs, so I don't konw if event structure or queue will work in this case. So, my problem is, can the DI of B be synchronized with DO of A, so that we can use A to control B? Thank you.
Best wishes,
Bo
11-17-2008 05:57 AM
Bo,
you can use queues to transfer data between several VIs.... with one restriction:
The VIs may not be part of two different applications (exe).
So if you are going to distribute your work, you have to make sure that both VIs are compiled into the same application; if so, use queues.
Please note that this is also true if you use user events for transfer.
Another possibility is to use change detection in your DI (depending on the hardware)...
hope this helps,
Norbert
11-17-2008 11:00 AM
Hi Norbert,
Thank you for your reply. And yes I'll distribute the work, and I prefer to have seperate exe files. But I can compile them together in case. I'll try your manners. Thanks a lot!
Best wishes,
Bo