LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event with high priority

Hello,
 
I have 2 while loops with event structure inside both of them, i want one of the loop to have a higher priority over the other one.
To understand my problem i will explain about my diagram, One while loop with an event structure inside which is the main issue in the program it has 12 events and usely the user will use those events, but i have another while loop with event structure and this event will be used rerly (it will print an excel report) but it must have the higher priority even if there is an event running in the big  wihle loop.
 
I tried to run them both simultaneously but even though everything worked fine before the complie when i run the program with the exe the "small" event didnt worked.
 
0 Kudos
Message 1 of 10
(4,456 Views)

If it works in the development environment, but no longer works as an executable, the problem has nothing to do with priorities. There must be another issue that should be investigated.

  • Did you change any of the code before building the executable?
  • What do the events do? Are the UI events?
  • Are the other events possibly set to lock the front panel while they execute?
  • Do the other events have inner loops and could thus take a long time to complete?

What is your LabVIEW version?

0 Kudos
Message 2 of 10
(4,435 Views)

hey, thanks for your answer -

  • No change to the code b4.
  • The events are ui events
  • No lock front pannel - i can even see the botton pressed, but the event doesnt work.....i tried to complie it several times and every time b4 the complie the event will work and after nothing will happend.
  • Yes they have inner loops but if its working b4 the complie then i dont see any problem, with the loops.
  • Labview 8.2.

 

0 Kudos
Message 3 of 10
(4,432 Views)

OK.

How do you know that the event does not fire? Could it be that the event fires but produces no visible output? Place e.g. a message dialog inside the event to see if the event executes at all.

How does your event actually print an excel report?

Could it be you are calling a VI dynamically and it does not get included in the build? Are you using relative paths for e.g. some temporary files used to make the report? (see if you use the "current VI path" anywhere, this will need to be adjusted for use in an executable).

Does the target computer have excel installed?

0 Kudos
Message 4 of 10
(4,423 Views)
just my 2c:
 
i never like using several event structures in an app. too many unexpected things happens. one workaround of your problem if not to involved is to transform the loop into a state machine loop, with the same functionalities of the second user event structure. all the user interface is brought back to the first event loop, that send the information to this state machine second loop.
 
on a side note: you can force priorities of loops by changing them to timed loop, even if the executions of the loops doesnt correlate to a clock. i am not sure it would help in your code tough. would you care to post it?
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 5 of 10
(4,422 Views)
To my knowledge (which is limited to doing a simple little test), Timed Loop priorities only apply when the loops or their internal frames initially get scheduled. Once any node in the Timed Loop blocks waiting on an event, it won't necessarily respond to that event with the priority you give the Timed Loop. Give it a try by enqueuing values repeatedly into a Queue that two timed loops of different priorities try to dequeue. The priorities don't dictate who wins.

Message Edited by Jarrod S. on 10-14-2007 02:42 PM

Jarrod S.
National Instruments
Message 6 of 10
(4,414 Views)


@jarrod S. wrote:
To my knowledge (which is limited to doing a simple little test), Timed Loop priorities only apply when the loops or their internal frames initially get scheduled. Once any node in the Timed Loop blocks waiting on an event, it won't necessarily respond to that event with the priority you give the Timed Loop. Give it a try by enqueuing values repeatedly into a Queue that two timed loops of different priorities try to dequeue. The priorities don't dictate who wins.

yes i was implying as a general possibility to use timed loop for priorities. i never tried timed loop with an event structure, as i dont see the logic of it. and for the poster problem, this would only apply to the state machine solution.

Message Edited by Gabi1 on 10-14-2007 10:44 PM

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 7 of 10
(4,407 Views)

OK,

did put a pop up msg and the msg did poped up when i pushed the botton, so i understood that the problem is something else so i tried to build this simple vi (attached) that only open an excel report.

the report will open b4 the comple but not after (  i have excel installed).

the error indicate this msg :

"Open VI Reference in New Report.vi->Untitled 324.vi<APPEND>
VI Path: <b>C:\Documents and Settings\admin\My Documents\builds\Untitled23\Application.exe\Excel_Open.vi</b>

Built Application or Shared Library (DLL): Make sure all dynamically loaded VIs were properly included in the build specification for the applica"

 

any Idea?

BTW i have no idea what is "Excel_Open.vi" never saw it.

 

 

 

0 Kudos
Message 8 of 10
(4,374 Views)
Looks like you've missed out a dynamic vi in your build specification (see altenbach's second reply). You need to include the '_Excel Dynamic VIs.vi' as a dynamic vi to you build. Click on the Add Dynamic VI and navigate to the location. See attached image :
Hope this helps
Ian
0 Kudos
Message 9 of 10
(4,358 Views)
Hello to all,
 
thanks for your answer, it did helped me, seems like some one here in our lab changed the _excel_dynamic.vi for some reason.
i fixed it and now everything works fine.
thanks!
0 Kudos
Message 10 of 10
(4,351 Views)