Jump to content

probe with timestamp


Recommended Posts

Not quite a code challenge, I'v already done something like that, with quite some statistics (haven't the code anymore present, must have lost when I last changed job :( )

post-253-1097558950.png?width=400

You'll still have to wire them into your code, but less complicated than with sequences. If you make the icon footprint small (e.g. a small clock, 8x8pixel), it won't disturb your code too much.

Didier

Link to comment

It seems that LV makes a temporary copy of CustomProbe (which you create) when you place one, and than deletes when you remove a probe from diagram. So, if you place Probe tvice in the same diagram, there is tvo SEPARATED reentrant probes, but where them stores, i did not find.. Therefore, you cannot place SAME probe on tvo places in the same time, therefore simple "delay" vi would not work. So, probes must to share one resource, file or pipe. It is a tricky one. Or, when you place two probes, you need to "rename" (in memory? ) one of them, so both have same name.. (Talking about two instances with the same name :) )

Any ideas? /ProximaBleu

Link to comment
:worship: Sorry for being not up-to-date, I'm still using Lv6.1

2261[/snapback]

Hi All

using cut and paste (what else) :lightbulb:

have strung a probe example together using Danny and Helen's previous coding.

It provides a sound when probe recieves data and also recordes actual time to text log.

It is necessary to generate you own text log before hand for it to function.

Have funny & modify to suit your own appls.

:thumbup:

chow

xseadog

Link to comment
Hi All

using cut and paste (what else)  :lightbulb:

have strung a probe example together using Danny and Helen's previous coding.

It provides a sound when probe recieves data and also recordes actual time to text log.

It is necessary to generate you own text log before hand for it to function.

Have funny & modify to suit your own appls.

:thumbup:

chow

xseadog

2264[/snapback]

Soory all it appears had time out on upload.

Will try again

Download File:post-577-1097584426.zip

Link to comment

post-584-1098000631.png?width=400

post-584-1098000631.png?width=400

Here is a custom time probe I created to help me see how much time a vi used up.
the first one attaches to an error cluster and the second uses a variant to attach to any data
type.

The probe has a enum selector with 3 choices Start, Time and Cycle
Start: starts the timer
Time: takes a time reading
Cycle: takes a time reading and restarts the timer

The probe will use a different timer for every ID number used.
(see demo.png).

Download File:post-584-1098000659.zip
Link to comment
  • 2 months later...
Okay, here is the initial code. As I said, it is ugly, a hack and very minimal, but it gets the ball rolling and gets it out of my hands.  ....

:clock: Anybody got a little time to add a few features?

:beer: Cheers

3319[/snapback]

On another thread in the forums we ended up getting into some of the same stuff here. I don't like to cross-post, but I felt it might help a few more people see and also avoid some duplication.

Is there anyway to consolidate two topics into a single topic if their material has started to converge significantly? (Good question for the other Michael)

Link to comment
  • 1 year later...
BTW, I have did some probes project, for debugging applications, using Queries. It is working fine, have "console" debuging window, and works in DevSys as well in RunTime.. i had posted it in OpenG, but nobody was interested. Does someone will want to look at it? Works in LV6.1 too.

/PB

I downloaded this LVDEBUG utility. It's an interesting way to monitor data in real time.

I was however wondering what was the original intent of this utility as far as the DEBUG versus RELEASE builds go. I am guessing we don't want the data to get queued-up in the RELEASE mode; but to keep the VIs from breaking, we replace them with their RELEASE versions. Am I right here?

If so, then the DEBUG_TX_R.LLB should only have dummy VIs; but it appears to have the same exact VIs as the DEBUG mode i.e., the Queues, etc. So, even in the RELEASE mode we are queuing up the info' (-- but just not displaying it since the DEBUG_RX_R.LLB only has a dummy VI). Shouldn't we also have dummy VIs for all the VIs in the DEBUG_TX_R.LLB as well?

I have also emailed proximableu directly.

Any input/ideas on this would be much appreciated.

-Khalid

Link to comment
  • 3 years later...

I think the easiest way to find out how much time it takes for a set of operations, is to use a VI global. You write a small VI which just works like a stop watch, with start stop and reset. This VI could have an error clusters in it to preserve data flow. You then put this in before your calculation and tell it to start, it gets the tick count and puts it in a uninitialized shift register. Then you do your calculations, and at the end put down the same VI global with a stop action which gets the tick count and subtracts it from the shift register which contains the original time stamp.

A quick and dirty way is to use a flat sequence structure, have the first case get the tick count, then the second is the actual work, then the 3rd case is to get the tick count and subtract it from the first.

Link to comment

The solution is quite easy, you make a normal probe and display the current time when the probe is executed.

The problem is that I think that probes are not time critical for the LabVIEW compiler and parallel processes might continue to run while the probe evaluates, so I would keep the probe as simple as possible.

Ton

Link to comment

QUOTE (psychomanu @ May 27 2009, 09:27 PM)

Hello,

I would like to see a probe with a timestamp to see WHEN data passes instead of the data itsself, for easy evaluation of the time spent between two points in the code. Or does anyone know an easier way than adding a tick count before and after and calculate the difference?

Manu

Back to the original question. It is a probe with data and time stamp is what you are after, right?

I would create my own probe for this purpose. To do this you just 'right click' on the wire you want to place a probe then select 'custom probe>>new'

give it a filename and location then Labview will create an 'probe' vi for you with the data type of the wire you right-clicked on.

In this 'probe' vi, you need to add a get current time function and an indicator for that. Create an indicator for the data as you need to see the data on the probe as well. resize the front panel to make it look nice & clean, add color of you want.

Do the same with other type of data wire for their custom probe with timestamp. then jusp drop the probes in ur vi and run :) good luck

Then you will have something like this:

Link to comment

QUOTE (Yair @ May 27 2009, 12:59 PM)

Sounds like a good task for JKI's right click framework - you select a block of code, choose "add timing" and it wraps it in a flat sequence with timing code.

I like that idea! :thumbup:

Link to comment

A more interesting version of this would be if you use a LV2 style global to remember the time of the last probe and then subtract to show the difference. Just note that this will only work if you have two such probes. If you have more, you might run into race conditions. Also, using the Tick Count primitive for this is generally better because it has a higher resolution.

Ofcourse Yair, but i just want to demontrate the idea rather than do the whole thing for the questioner.

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.