LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structures and the Windows Registry

Hi All

    I am trying to confirm whether or not when an Event structure is used, it stores ANYTHING in the Windows registry.  I don't mean if I TELL the Event structure to use the registry, I mean does the underlying code for the Event structure use the registry for anything.  For instance, does it store call back info in there.

 

If someone knows the answer to this, I'd be grateful -- or if they can point me to where I find the info, that 'd be great.  Since this concerns the underlying functionality of Labview, vrs. how to actually use an event structure, I didn't see anything in the forums that cover this.  

 

Thanks for any help.

0 Kudos
Message 1 of 11
(3,560 Views)

Event structures also run on MAC and Linux, which don't have a registry. What do you expect it to store there?

 

Why would the answer to this change how you actually use event structures? Can you tell us what you have in mind?

0 Kudos
Message 2 of 11
(3,547 Views)

You can store info in the Windows Registry, however I am not aware of an option in the event dialog to store any info in the registry. Do you have some code that sows such a setting?

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 11
(3,542 Views)

Well... just because the program works on Mac and Linux doesn't mean that the Event structures don't use the windows registry on a windows box.  However, I should state that I'm asking simply because the lead on my project (who's been using Labview a lot longer than me) tells me that the Event structure stores call back information in the windows registry, and that's why our programming guide says we can't use them.  I'm a newbe at Labview (although not programming), so when I said I didn't think that was the case, it became my job to find out 🙂

 

So... is there some way to definitivly find out?

 

Thanks!

0 Kudos
Message 4 of 11
(3,521 Views)

TCPlomp wrote:

You can store info in the Windows Registry, however I am not aware of an option in the event dialog to store any info in the registry. Do you have some code that sows such a setting?

 

Ton


This is exactly what I specified I was NOT talking about in my original question.  The original question went to finding out if the underlying Labview code itself stores info (perhaps callbacks) in the registry for it's own use.  

0 Kudos
Message 5 of 11
(3,518 Views)

ckrobinson wrote:

Well... just because the program works on Mac and Linux doesn't mean that the Event structures don't use the windows registry on a windows box.  However, I should state that I'm asking simply because the lead on my project (who's been using Labview a lot longer than me) tells me that the Event structure stores call back information in the windows registry, and that's why our programming guide says we can't use them.  I'm a newbe at Labview (although not programming), so when I said I didn't think that was the case, it became my job to find out 🙂

 

So... is there some way to definitivly find out?

 

Thanks!


That sounds utterly absurd to me, but if you really want to prove it, try this:

 

Open LabVIEW and create a VI that contains an event structure.  Save the VI and keep it open.

Run regedit and export a copy of your entire registry to a file.

Run the VI.

Re-run regedit and export your registry to another file.

Compare the two .REG files. Since exported registry files are text you can compare easily using any available differencing tool.

0 Kudos
Message 6 of 11
(3,513 Views)

As far as I know, LabVIEW (unless some other NI products) is not using the registry at all, but only config files (the LabVIEW.ini). This might have changed for Win VISTA compatibility. But for cross-platform (Linux, Mac), it is the better approach (the config files).

If you use regedit, there are two keys to look for. One is the CURRENT_USER and the other the LOCAL_MACHINE (this is for all users). Under both keys, the LabVIEW registry entries (if present) should be under (by recommendation of microsoft) Software/National Instruments/LabVIEW/2009.

 

There is also some issues when writing to the registry, that the transfer is buffered. So a typical delay of 200 ms is possible. My coding style relys heavily on User Events, so I really should have noticed such a delay (and much simpler programs would show it also)...

 

Maybe there are some issues other than this that you are discouraged from using events (such as only using a base package, personal predjudice, bad experience, ...).

 

Felix

0 Kudos
Message 7 of 11
(3,503 Views)

ckrobinson wrote:

...the lead on my project (who's been using Labview a lot longer than me) tells me that the Event structure stores call back information in the windows registry, and that's why our programming guide says we can't use them....


Whoever wrote your programming guide is full of it.  The event sturcture is a powerful and very useful tool.  To ban its use is utterly ridiculous.  It doesn't write anything to the registry, and even if it did, so what!  Windows writes to the registry, so why is your lead not dictating a ban on Windows?  Every time you install a new program, including Labview, it writes to the registry.  So why not ban installing anything.  This makes no sense to me at all.  I feel that your lead has other motives for banning the Event structure.  As stated before, it could be due to a bad experience.  I'm inclined to believe that it is just because he is not familiar with the event structure and doesn't want to take the time to learn it.  Poor excuse.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 8 of 11
(3,494 Views)

tbob wrote:

ckrobinson wrote:

...the lead on my project (who's been using Labview a lot longer than me) tells me that the Event structure stores call back information in the windows registry, and that's why our programming guide says we can't use them....


Whoever wrote your programming guide is full of it.  The event sturcture is a powerful and very useful tool.  To ban its use is utterly ridiculous.  It doesn't write anything to the registry, and even if it did, so what!  Windows writes to the registry, so why is your lead not dictating a ban on Windows?  Every time you install a new program, including Labview, it writes to the registry.  So why not ban installing anything.  This makes no sense to me at all.  I feel that your lead has other motives for banning the Event structure.  As stated before, it could be due to a bad experience.  I'm inclined to believe that it is just because he is not familiar with the event structure and doesn't want to take the time to learn it.  Poor excuse.

 


Um.... well, I can't say that's a very correct evaluation.  There is a vast difference between something that writes once to the registry on install, and something that uses the registry to hold a callback stack which would necessitate a constant polling.  Since he's quite conversant with Labview, I'd hesitate to say that he hasn't taken the time to learn it.

0 Kudos
Message 9 of 11
(3,476 Views)

ckrobinson wrote:

Um.... well, I can't say that's a very correct evaluation.  There is a vast difference between something that writes once to the registry on install, and something that uses the registry to hold a callback stack which would necessitate a constant polling.  Since he's quite conversant with Labview, I'd hesitate to say that he hasn't taken the time to learn it.


I don't think the event structure does constant polling of the registry, but it must do somthing in the background that requires polling for interrupts.  I don't see this as a stopping point for using event structures.  Everyone else uses it without problems.  Let the OS do the polling or whatever by using the event structure.  Is it better to set up your own polling in Labview with a while loop, waiting for some button to be pressed?  I don't think so.  I fail to see his point.  But its you choice whether you want to go along or not.  I didn't mean to mis-judge anyone.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 10 of 11
(3,470 Views)