LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use virtual channel to connect different tasks?

Solved!
Go to solution

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

------------------------
My blog Let's LabVIEW.
0 Kudos
Message 1 of 5
(2,864 Views)

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 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 5
(2,835 Views)

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

------------------------
My blog Let's LabVIEW.
0 Kudos
Message 3 of 5
(2,820 Views)
Solution
Accepted by topic author foolooo

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 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 5
(2,813 Views)

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

------------------------
My blog Let's LabVIEW.
0 Kudos
Message 5 of 5
(2,800 Views)