02-01-2007 12:26 PM
That would make sense. Maybe I should have checked the palette first to see what the available primitives are, but I wasn't really thinking.
@Jim Kring wrote:
I'm pretty sure that that MgErr Occur(Occurrence occ) function is equvalent to the Set Occurrence primitive.
02-01-2007 07:31 PM
Holy BEEP batman that just BEEP BEEP BEEP!
I think I felt my brain explode when this boulder rolled over me. I think I might quit programming.
You's talk of such high level subject matter like most normal people talk about the type of coffee they like.
Now if you'll excuse me I'm going to drink till I puke.
Ben, I have earmarked this "boulder" so when I grow up I can understand it! But I think it's going to be great. Great work!
02-02-2007 07:41 AM
02-02-2007 12:25 PM
this boulder is growing bigger by the minute..
this is a hard act to follow!!!
02-02-2007 02:47 PM
this boulder is growing bigger by the minute..
this is a hard act to follow!!!
02-03-2007 11:40 AM
@Ben wrote:
Do the User Events run in the UI thread?Occurrence can have multiple recievers. On the other hand multiple events structures looking for the same event are supposed to be bad mojo....Can anyone "pull the curtain back" a little more?
An event structure will respond to all the events it registered to, regardless of whether they happened before it started running or what other event structures are doing with them. The attached should demonstrate this (just change the boolean and see how the i terminal is incemented even if the boolean was changed before the loop started running) and I believe this should be the same with user events.
The main problems in using multiple event structure are debugging difficulties and potential lockouts due to the Lock Front Panel option or due to nested event structures.
As for running in the UI, I'm fairly sure that only the event detection runs in the UI thread and that the actual event code runs in the normal thread and if I remember correctly there was a fairly lengthy thread about this (maybe the one where there was a problem with the latching action?). I don't know how user events do this, but it might be the same mechanism.
As for other synchronizing functions using the occurence functions, my guess would be no more than yours.
P.S. Yes, I believe that my nugget will not generate 4 pages of replies (although it has in it the potential for another nugget which will).
02-03-2007 11:46 AM
02-04-2007 11:08 AM - edited 02-04-2007 11:08 AM
Message Edited by Ben on 02-04-2007 11:09 AM
02-04-2007 12:47 PM
02-05-2007 06:55 AM
@Tomi M wrote:
This is very good point, I didn't think of either. I took a look. lvrt.dll has also these functions. I created an executable application with LabVIEW 8.20 and it still worked ok when I renamed the LabVIEW.exe to LabVIEW.bak. So the application didn't rely on the LabVIEW.exe, at least not the LV 8.20 version of it. It seems that lvrt.dll provides the same C API that LabVIEW.exe, at least under Windows XP and LV 8.20.
Tomi