01-17-2012 12:13 PM
@Ben wrote:
Think about performance at design time, ID where the loads will be and "worry about the performance in the large data set vis" while developing and watch the CPU uses like a hawk while doing unit testing.
Be careful about taking this too far; it's been said that "premature optimization is the root of all evil" (attributed, so far as I can tell, to Donald Knuth, a well-regarded computer scientist).
01-17-2012 12:16 PM
@nathand wrote:
@Ben wrote:
Think about performance at design time, ID where the loads will be and "worry about the performance in the large data set vis" while developing and watch the CPU uses like a hawk while doing unit testing.
Be careful about taking this too far; it's been said that "premature optimization is the root of all evil" (attributed, so far as I can tell, to Donald Knuth, a well-regarded computer scientist).
Agrred but ignoring it unitl after the code is developed is at best wishful thinking.
Paraphrasing a quote from one of my customer's Grandmother;
"All things in moderation, especially moderation."
Ben
01-17-2012 02:02 PM
Thank you for all of your comments thus far, I asked the original question as part of the process for controlling a single VI from two separate VI's. The single VI is the controller for an spi port expander that simply controls some switches.
I would like to know how to link 2 seperate and indepedant VIs' Controls to a single VI. I thought a reference made sense, but not quite right yet. Here is an example and some temp Vi's. Any help?
01-17-2012 02:02 PM
additional attachment
01-17-2012 02:22 PM
You need two queues.
one multiple procucer single consumer of type
Cluster of
<Source as string
cluster <your cluster>
>
enqueue at VI1 and VI2 on your cluster value change dequeue in VI3 and update Cluster indicator in VI3 with new value via terminal
the other queue of type
Cluster of
<Destination as string
Cluster <Your cluster>
>
Enqueue at VI3 to destination that is not source with updated value of your cluster
Preview in VI1 and VI2 Dequeue if Destination is this vi and update your cluster control through a local variable
01-17-2012 02:25 PM
If it's not too much trouble could you show me using the files I provided? I have used queues, but i'm not sure what it is you are suggesting. If you can make this work, you are brilliant!
01-17-2012 03:03 PM - edited 01-17-2012 03:08 PM
here you are
This VI and That VI are the two independant VIs each will update the indicator in Coordinator.vi Coordinator then flashes the data back to the vi that was not the source to update the control with the new state.
Stopping either This or that creates a cascade stopping everyone- Adapt it to your needs
Be careful I should have chosen better names since the logic is odd when this vi is that vi
01-17-2012 03:21 PM
Absolutly BRILLIANT!!! I tried it out and it works just as described. I have to examine the code to make sure it's compatible with my programs. THANK YOU SO MUCH!
there was some broken wires and such when I opened it, did you save it like that? or did something disappear when i opened it? all the dependencies had to be re-linked
01-17-2012 03:25 PM
I never had the type def of the cluster. So, yes the vi.s were saved broken whoohooo... Glad they worked I never got to test it (But that would have meant I had actually coded a bug not me- not ever)
01-17-2012 03:31 PM
even cooler, that you never got to run it. LOL.