04-24-2015 06:06 PM - edited 04-24-2015 07:07 PM
nkhoa wrote:To further illustrate my previous point, please see the newly attached image.
There is insufficient information, because we don't see what's in the other cases and we don't see what the other events are, e.g. what's in the timeout event? Running a "transparent" event (i.e. one with a fast, but empty, timeout") is completely pointless, it basically is just a glorified case structure.
Please answer the following questions:
Are the cases independent, i.e. can there be more than one boolean true at any give time (causing more than two cases containing crucial code to run in parallel? can action1 and action2 occur simultanously or can only one execute at any given time?
What's in the timeout case?
How long do the various actions take?
04-27-2015 11:48 AM
@altenbach
Time-out event = polling position from a serires of motor encoders
Case-structure are indenpedent . Some of them cannot run in parralel. For example, two of the case structures will spin off another sub-vi that runs for 10 minutes during which nothing else can run.
Thanks!
04-27-2015 12:08 PM
nkhoa wrote:Time-out event = polling position from a serires of motor encoders
So it should not occur of events constanty get triggered? Shouldn't that be on the main loop diagram instead so it is independent of events?
nkhoa wrote:Case-structure are indenpedent . Some of them cannot run in parralel. For example, two of the case structures will spin off another sub-vi that runs for 10 minutes during which nothing else can run.
Define "spin off". What is the meaning of "nothing else"? Not even the code shown? If this is true, you should NOT have an event structure, because it will not be able to react to events, will potentially lock up the front panel, or will potentially queue up millions of events without being able to service them.
It seems to me that your entire architecture is highly flawed.
04-27-2015 12:20 PM
"spin-off" as open up a subVI running approximately 10 minutes during this time, I can't do anything on the main front panel.
Yes, it seems flawed.
I can't copy/paste the entire VI up here but I can make more detailed illustration.
Thanks!
04-28-2015 02:31 PM
@nkhoa wrote:
"spin-off" as open up a subVI running approximately 10 minutes during this time, I can't do anything on the main front panel.
Yes, it seems flawed.
No program have I ever used, that will take control of the UI for 10 minutes, without causing me frustration. Heck if my UI isn't responsive in 200ms users usually get agrivated.
I highly suggest you redeign your application to respond to the user in a way that is more intuitive. It sounds like you need at least two loops running. These can be Actors, or two actual while loops that communicate with some messaging scheme to get a status update, and command actions.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord