LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an equivalent to producer / consumer design patterns in LabWindows-CVI?

Solved!
Go to solution

I must convert a LabVIEW-Program to LabWindows-CVI.  Unfortunately, there does not appear to be code templates available in CVI that compare with those from LabVIEW, or are there?  🙂

0 Kudos
Message 1 of 3
(2,521 Views)

Hello Ray, 

Never heard of such templates in CVI, at least built-in ones. It is possible to have project templates but only if you put them in first.

If only, CVI had a much wider user base. Then maybe we would be enjoying such nice improvements. Smiley Sad

S. Eren BALCI
IMESTEK
Message 2 of 3
(2,500 Views)
Solution
Accepted by topic author Ray.R

I second ebalci wishes!

Just want to add that CVI already offers the ability to load template projects so it could be not so difficult to create and distribute new templates. I have this in the to-do list but as you surely know time waits for no man! Smiley Wink

 

Coming to your question, the best equivalent to producer-consumer paradigm I can think of in CVI environment is a multithreaded application with thread-safe queues used to pass data from the producer loop to the consumer one.

CVI offers some documentation and some examples that you may look at to have a starting point for your task: examples are located in <CVISamplesFolder>\Utility\Threading, whereas the documentation is integrated in Creating Applications >> Creating Multithreaded Applications chapter of CVI Help that I suggest you to read as it gives several useful concepts and hints on this matter. I'm pretty sure you know the multithreading paradigm very well so you may transverse the documentation looking only for CVI-specific information.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 3 of 3
(2,484 Views)