How do you put a computed cluster value into a queue? I modified the "Producer/Consumer Event" design pattern so that the type of the queue is a cluster rather than a string, but I cannot figure out how to get different values into the queue on each iteration of the loop:
The cluster constant labeled "This should be dynamic" will eventually be a computed value containing the current time and the value extracted from .NET event argument.
Instead of using a cluster constant (called 'This should be dynamic' in your picture) use the 'Bundle by Name' element with the 'SlopeEvent' cluster as input. Then you can dynamically update the values of 'Time' and 'Value'. Like So

If you use the 'SlopeEvent' cluster at severla locations in your code it might be a good idea turning it into a TypeDef (right click the cluster>'Make Type Def.' > Open Type Def. > Save in your project folder).
Note: The picture I attached is a VI snippet. Just drag-and-drop it onto your block diagram. That way you don't have to copy code from pictures all the time. This is especially useful for much larger code snippets...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With