Jump to content

Benchmarking Local Variables.


Recommended Posts

Is it possible to benchmark the transmit times of local variables?

I've run some simple benchmark stuff before, but never something that would figure out how long it took to get a piece of data through a local variable.

I've attached a simple program that sends some info through a local variable, and there's obviously some lag that's visable, well, at least visable on the system I'm running. I know that lag depends on the system the program is running on so I'd really like to find a way to test it on the various PC's that we use here.

Any ideas?

-Ian

Time Control Test.vi

test.txt

Link to comment

Is it possible to benchmark the transmit times of local variables?

I've run some simple benchmark stuff before, but never something that would figure out how long it took to get a piece of data through a local variable.

I've attached a simple program that sends some info through a local variable, and there's obviously some lag that's visable, well, at least visable on the system I'm running. I know that lag depends on the system the program is running on so I'd really like to find a way to test it on the various PC's that we use here.

Any ideas?

-Ian

I don't think your program is doing what you think it is doing. Your top loop is updating the indicators every 1 second. And your bottom loop will show you the new value about 0.25s after that.

The "lag" is because you are only updating the command2 indicators every 250 ms. Set the 250 ms wait to zero and they will change instantly. You would be hard-pushed to measure the read/write time of a local variable (which would be a few cycles of the computers clock).

Edited by ShaunR
Link to comment

I don't think your program is doing what you think it is doing. Your top loop is updating the indicators every 1 second. And your bottom loop will show you the new value about 0.25s after that.

The "lag" is because you are only updating the command2 indicators every 250 ms. Set the 250 ms wait to zero and they will change instantly. You would be hard-pushed to measure the read/write time of a local variable (which would be a few cycles of the computers clock).

Ahhh,

My bad. It's been beaten into me over the past week to give my while loop wait times to allow the processor to rest and actually speed your programs up. At this hour I hadn't even considered that fact that it would slow down the update speed of the loop. Duh.

Thanks Shaun.

-Ian

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.