Jump to content

Local Variables or Property nodes?


Recommended Posts

Im sending strings via serial between two vi's on separate PCs.

The string is made and broken down from and into property nodes(.value). I was wondering if local variables are any quicker?

Or is there any difference at all?

Thanks

Jason :blink:

3428[/snapback]

I'm not sure which is faster. I am guessing local variables would be, since property nodes probably have more overhead.

Another option would be to use queues. Even though they appear in the 'Advanced' pallete, they are really not that difficult to use. (you can use them kind of like a buffer that can be accessed from anywhere in your program)

John

Link to comment
Im sending strings via serial between two vi's on separate PCs.

The string is made and broken down from and into property nodes(.value). I was wondering if local variables are any quicker?

Or is there any difference at all?

Thanks

Jason :blink:

3428[/snapback]

I suspect that you are asking this question because you are having speed problems. Relatively speaking, any internal data passing method you choose will be light years faster than your serial connection. Local variables would be faster and queues mentioned by @johnRH would be good as well but none of these changes will give you "noticable" speed improvements.

Link to comment
  • 1 year later...
For completeness sake, here's an article on the difference between Value Property Node and Local Variable:

http://digital.ni.com/public.nsf/3efedde43...47?OpenDocument

Regards,

Khalid Ansari

The NI expantion was definitely a little over my head. My understanding is that if we are working within a single VI that local variables are quicker for the PC to handle than a value property node. Thanks!

Link to comment
My understanding is that if we are working within a single VI that local variables are quicker for the PC to handle than a value property node. Thanks!

You are correct. Property nodes require a switch to the UI thread. Local variables do not. As a result, locals should be faster. I just skimmed the liniked article, but this fact didn't appear to be mentioned in there.

J

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.