LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

About Programming

Hello LabVIEW Enthusiasts,

 

I have used Queued message handler programming and Object oriented programming Architecture but I am not a pro at it. I have the basic understanding of OOP. 

 

When I saw the QMH, sometimes I see that controlling the Queues seems to be difficult and I saw that when ever message handler recieve any message regarding the Data Acquisition loop when it has alot of data, does it loose the data?. While, when it has to go to another queue with the message. 

 

I see that OOP, it is very tructured programming and also it is huge topic. I would like to do the programming in the structured way. 

 

Can anyone tell me, Which programming architecture should I follow? 

In QMH will there be any data loss when it shift between queues with a huge amount of data?

Is it a good practice, if i use QMH with a OOP architecture?

 

Can anyone give me suggestions and opinions?

 

Thank you!

0 Kudos
Message 1 of 3
(985 Views)
Hi Viessmann,
In this case, a picture would say a thousand words, you should post the block diagram you are asking questions about.
In general, queues are lossless unless you make them lossy. The default is for queues to hold an unlimited number of elements, so no data is lost.
A good programming architecture will depend on the problem you are trying to solve. A good rule of thumb is to make it as complex as it needs to be, but not more complex than that 🙂

Even though I enjoy writing large applications with many QMHs talking to each other, sometimes a simple state machine will do the job just fine.
0 Kudos
Message 2 of 3
(949 Views)

@LabVIEW_Enthusiast wrote:

Can anyone tell me, Which programming architecture should I follow? 


As always, it depends...

 


@LabVIEW_Enthusiast wrote:

In QMH will there be any data loss when it shift between queues with a huge amount of data?


It shouldn't. Unless 'huge' means you don't have any memory left.

 

This is starting to sound more like a producer/consumer pattern...

 


@LabVIEW_Enthusiast wrote:

Is it a good practice, if i use QMH with a OOP architecture?


Yes.

 

OOP isn't an architecture though. It's a programming paradigm. Using OO in a QMH would be a good way to start out with OO.

0 Kudos
Message 3 of 3
(891 Views)