LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Detect if time/date browse button was used

Solved!
Go to solution

Hi,

 

I have a position control vi for indexing elements inside array and displaying corresponding time and date. I have large number of control signals inside my block, but I have removed all irrelevant blocks and signal for this discussion. I have replaced all unnecessary controls with constant values, so don't waste time analyzing it.   

 

If you take a look at my vi, you will see Star/Stop control, Position control and a time stamp indicator (Waveform time) with a time/date browse button from another time stamp control. I have all desired functionalities, but I have problem when using browse button for setting up time. I can't set my time two times in a row at same value because I'm comparing "Last entered time stamp" value with current one just entered. I would not like to completely change my blocks because I'm using a lot of property nodes and variables inside my project. I'm just looking for a way to figure out if time/date browse button has been pressed so I could jump to desired point in my recorded waveform.   

0 Kudos
Message 1 of 7
(2,876 Views)
I would suggest using an event structure for the whole thing. Then you can look for a value change insted of constantly polling the system. You can also look for a mous eup event for the button.
Tim
GHSP
0 Kudos
Message 2 of 7
(2,866 Views)

Hi, 

 

Since I dont have LV8.6, One suggestion would be

 

Using an event structure, add a value change event to timestamp control and you can get the current value and old value. If older than this values are required you can use a shift register to get it.

 

Find the attachment of using old value in a event structure 

 

Edit- I must work hard on my typing skills...  :smileymad:

Message Edited by Vsh on 11-17-2009 07:29 AM
0 Kudos
Message 3 of 7
(2,861 Views)

Well, there is a few problems.

 

Time/date browse button shown on front panel belongs to Last entered time stamp control. Waveform time is a indicator. I have only moved  browse button.

 

I must allow case in which user always jumps to same position (e.g. user can use browse button for rewinding). In this case Last entered time stamp will have constant value during execution. I must be able to make difference between setting time with browse button and setting position with slider. I'm looking for some kind of event like time browse button pressed but unfortunately labview doesn't detect such events.

 

I have attached lv8.0 version.

Message Edited by _thomas on 11-17-2009 07:44 AM
Message Edited by _thomas on 11-17-2009 07:44 AM
0 Kudos
Message 4 of 7
(2,847 Views)

I am not sure if I have understood your problem correctly. Could you eloberate a bit? (There are no event for a browse button click but there are many ways to fullfil your requuirement)

 

1. You can change your Waveform Time Indicator to a Control and check its browse button visible. Use property node/local variable to update the latest value from Last Time Entered Tmestamp

2. Use shift register for timestamp previous values to make a comparison.

 

PS- Block diagram doesnot follow left to right flow. wires are routed backwards. Keep the wires right/up/down direction never in the backward (left) direction.

Message Edited by Vsh on 11-17-2009 08:09 AM
0 Kudos
Message 5 of 7
(2,827 Views)

I can't change Waveform Time Indicator to a Control because that would make other controls much complex (not shown in attached vi)

I have modified my block to the simplest form. I have changed some control names.

There is now only one problem - how can I detect if user has pressed time/date browse button? I'm not interested at this point which value has been entered.

I need to replace User has entered value in  Jump to time/date with some kind of Boolean logic or event case.

Message Edited by _thomas on 11-17-2009 09:23 AM
0 Kudos
Message 6 of 7
(2,813 Views)
Solution
Accepted by topic author _thomas
I'm going to skip the actual implementation of what you're doing since it's not all that clear to me, and answer the question regarding detecting if the browse button was pressed. This general question has come up many times before in this forum. There is no built-in mechanism for detecting that the browse button in a timestamp control has been pressed. When you click that button it actually opens a VI with the title "Set Time and Date". Thus, you can monitor to see if this window pops up.
0 Kudos
Message 7 of 7
(2,798 Views)