LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Breakeven point" for using AMC messages vs. FGVs to send/receive data

We use a messaging since that we developed in house which is similar to the AMC design. I haven't used the AMC VIs because we developed our prior to that one and ours has been very reliable. We have not benched marked it but our system is quite chatty and we have not had any problems keeping up. In fact, our messaging system does more since it is built on a publish/subscribe model and it is capable of broadcasting messages to all tasks that subscribe to a particular message. It has been used in many applications, both large and small, and we have yet to run into a performance issue.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 11 of 22
(687 Views)

@abvenk wrote:

AMC was recommended by a CLA a while back. It doesn't seem to enjoy the popularity it deserves, IMHO. 


You might want to check out the Delacor Queued Message Handler (DQMH).  That team has put a lot of good work into it.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 12 of 22
(666 Views)

Just a note: FGV/AE has the exact same race condition problem Globals have, with the slight caveat that you can make a function that both read and writes somewhat protected in a FGV.

Both are however lossy in that the last function that writes to it is the deciding one.

If you only have one writer both are safe and globals faster. If you have several writers you're a drunk driver; it's not a question of if something bad will happen, it's only a question of _when_.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 13 of 22
(653 Views)

@Yamaeda wrote:

...

Both are however lossy in that the last function that writes to it is the deciding one.

If you only have one writer both are safe and globals faster. If you have several writers you're a drunk driver; it's not a question of if something bad will happen, it's only a question of _when_.

/Y


Unless the AE is wrapping up a round-robin buffer Smiley Tongue

 

I used to make a living writing round-robin buffers until the polymorphic queue was invented (thank you AQ!) which is capable off passing large blocks of data "in-place" making it wicked fast.

 

Spoiler

 

But then there was that one application that needed to recover from power failures and resume where it left off. In that case I did use an AE that logged it's internal state to file each time it was invoked to one of two files. It alternated files to cover the situation where the power died as the AE was logging resulting in a corrupted state in the file. In that case the other log file was used to recover. Try to do that with a queue I challenge you! Smiley Wink

 

 

 

But that was a very long time ago.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 22
(651 Views)

@Yamaeda wrote:

Just a note: FGV/AE has the exact same race condition problem Globals have, with the slight caveat that you can make a function that both read and writes somewhat protected in a FGV.

Both are however lossy in that the last function that writes to it is the deciding one.

If you only have one writer both are safe and globals faster. If you have several writers you're a drunk driver; it's not a question of if something bad will happen, it's only a question of _when_.

/Y


What's AE?

0 Kudos
Message 15 of 22
(643 Views)

@Mark_Yedinak wrote:

We use a messaging since that we developed in house which is similar to the AMC design. I haven't used the AMC VIs because we developed our prior to that one and ours has been very reliable. We have not benched marked it but our system is quite chatty and we have not had any problems keeping up. In fact, our messaging system does more since it is built on a publish/subscribe model and it is capable of broadcasting messages to all tasks that subscribe to a particular message. It has been used in many applications, both large and small, and we have yet to run into a performance issue.


How data-heavy are your messages? Do you send 1D arrays, 2D arrays, clusters, etc? Or just simple booleans or empty messages as notifiers?

0 Kudos
Message 16 of 22
(639 Views)

@abvenk wrote:

What's AE?


Action Engine


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 17 of 22
(637 Views)

The sizes vary. We have a basic cluster which is a message envelop and then a data portion that can be anything. Some of our messages are the results of a DB query and those are 2D string arrays. Some of the queries result in a large amount of data. Other messages are used for logging data sent/received from the device some of that data is megabytes of data over multiple messages with data blocks of 64K.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 18 of 22
(630 Views)

@crossrulz wrote:

@abvenk wrote:

What's AE?


Action Engine


So just another name for FGV.

0 Kudos
Message 19 of 22
(595 Views)

@abvenk wrote:

@crossrulz wrote:

@abvenk wrote:

What's AE?


Action Engine


So just another name for FGV.


Not quite.  I would rather say that the FGV contains a subset of the functions of an AE.  Or that the FGV is a specialized AE that only does two things: read from and write to.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 20 of 22
(591 Views)