LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

add event in event structure

Glad I could help.  Thanks, Vsh, for the link - I knew I had seen it somewhere at some point.

smm: If you do want me to be able to look at it, remember to post as an image - I cannot open LabVIEW 8.5 VIs.

Cheers,

Rob

0 Kudos
Message 31 of 42
(1,421 Views)
thanx vsh
0 Kudos
Message 32 of 42
(1,421 Views)

Hey Rob,

I have attached a word doc witht the VI picture in it. Could you please take a look. I think it should work. The doubt I have is if the error wire is connected correctly.

Also can you see if the 2 small while loops that are present to the left make sense. What the thing is basically, I have a hard start-stop button on my thermostat tester and DAQ unit interface. What this button is supposed to do is, when the user switches it on, the program execution should start, when they switch it off, it should switch off.

Could you see if it makes sense.

Thank You.

 

 

0 Kudos
Message 33 of 42
(1,397 Views)
Can I answer?
 
If this is the only requirement, why would you not prefer to place the  "7862-Manual.vi" as a sub VI inside the "Manual" value change event ?
 
Doing so will not cause your other 2 loops on the left to pause. Only the loop having the event structure would wait until the 7862-Manual.vi is stopped...
 
 
 
Just curious to know the problem.
0 Kudos
Message 34 of 42
(1,379 Views)

If you do not need to run multiple subVIs in parallel through your event structure, then I agree with Vsh.  Running VIs dynamically should only be used if necessary.  If you need to be able to kick off multiple subVIs without waiting for the previous one to complete, then this is a good way to do so.

The small while loops on the left should work I suppose, though I don't think I would have implemented it that way.  If you are running the subVIs dynamically, there is no reason that you can't manage the start/stop from the timeout event of the event structure.  That would also avoid the need for the action engine since the status of the start/stop switch could be maintained in a shift register.  You'd just have to have case structure or similar to avoid kicking off subVIs if the start/stop switch is off.

Also, I could be wrong, but it looks like your code may immediately begin running instead of waiting for the start/stop trigger.  The init state of the action engine initializes the boolean to false and your first while loop looks like it stops in that case.

Anyway, hope that was helpful.



Message Edited by RobBoyer on 03-19-2008 03:38 PM
0 Kudos
Message 35 of 42
(1,371 Views)
For those people now involved in this thread, you may want to be aware of this other thread as well.  It is a rather long thread.
 
SMM seems to have added new requirements to his project involving these multiple sub-VI's and event structrues that weren't presented in the original questions in the other thread.  That other thread will show how the code had evolved.
 
Anyone who reads both of these threads should appreciate that a good project plan listing all the requirements for the software and thinking about the architecture before laying down any wires on the screen can mak the programming process easier.  Without doing that, it becomes much more difficult to "shoe horn" in these new requirements into existing code.Smiley Wink
 
 
Message 36 of 42
(1,365 Views)


Ravens Fan wrote:

 
SMM seems to have added new requirements to his project involving these multiple sub-VI's and event structrues that weren't presented in the original questions in the other thread.  That other thread will show how the code had evolved.
 
 


or to correct you... "her project" would have been correct Smiley Wink
0 Kudos
Message 37 of 42
(1,361 Views)

Hey Raven's fan,

I agree this project has evolved tremendously. But not having a plan is really the boss's problem. Everytime something is accomplished, they want something new in it. So there is a constatnt change to the process. It is as frustrating for me like it is for you guys when I trouble you'll. But thanks anyways.

Thanx VSH for clearing the misunderstanding 😉

0 Kudos
Message 38 of 42
(1,341 Views)


Vsh wrote:
If this is the only requirement, why would you not prefer to place the  "7862-Manual.vi" as a sub VI inside the "Manual" value change event ?
Doing so will not cause your other 2 loops on the left to pause. Only the loop having the event structure would wait until the 7862-Manual.vi is stopped...
Oh thats what I had done previously, but then when you sent that link for loader.zip, it showed this, so I thought this was the correct method.. I can revert to having just the subvi. But can you tell me what problem could arise on doing this as it is?
0 Kudos
Message 39 of 42
(1,338 Views)


RobBoyer wrote:
Also, I could be wrong, but it looks like your code may immediately begin running instead of waiting for the start/stop trigger.  The init state of the action engine initializes the boolean to false and your first while loop looks like it stops in that case.

My code does immediately begin running instead of waiting for the start/stop button.


RobBoyer wrote:
The small while loops on the left should work I suppose, though I don't think I would have implemented it that way.  If you are running the subVIs dynamically, there is no reason that you can't manage the start/stop from the timeout event of the event structure.  That would also avoid the need for the action engine since the status of the start/stop switch could be maintained in a

How can this be done? I'm sprry I have been troubling you so much, but I have been learnign all along. Thanks.

0 Kudos
Message 40 of 42
(1,335 Views)