LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting a Relative Time Indicator to Display ZERO

Solved!
Go to solution

Greetings,

 

I'm having a hard time finding any solid answers about how numeric indicators with a relative time display mode work.  I've searched the online help, I've searched the forums, and I've Googled like crazy.  No simple answers to what seems like a simple problem.

 

I have a numeric DBL indicator set to a Relative Time display mode. If I set the value to ZERO on my block diagram, I end up with 19:00:00 on my front panel.  If the indicator is RELATIVE time, shouldn't a value of ZERO seconds be 00:00:00?  If I set the value on the front panel to zero, then create a constant, it says the value is -68400.  What's the deal?

 

Thanks in advance!

0 Kudos
Message 1 of 16
(4,988 Views)

ronbrown wrote:

If the indicator is RELATIVE time, shouldn't a value of ZERO seconds be 00:00:00?


It should. My first guess was that you're converting to a timestamp somewhere, but that doesn't seem to agree with what you say. My second guess is that you have coercion in your data range. I suggest you upload your code so that we can look at it.


___________________
Try to take over the world!
0 Kudos
Message 2 of 16
(4,977 Views)

This is about as straightforward of an example as you can get.

 

Have the "Init With Zero?" boolean set to FALSE and then RUN, and the front panel looks the way it should, but the numbers in the block diagram start at -68400.

Have the "Init With Zero?" boolean set to TRUE and then RUN, and the front panel gives me 19:00:00 but the numbers in the block diagram start with 0.

 

I've attached the VI as well as images of my VI so you can easily see what I'm talking about.

 

Why does this happen?  Obviously I could just hack this together and have an offset of -68400 in my application, but that certainly seems like a sub-optimal solution. 

Download All
0 Kudos
Message 3 of 16
(4,966 Views)
When I open it, the indicator is set to absolute time, not relative time. Are you sure it's set to relative time for you?

___________________
Try to take over the world!
0 Kudos
Message 4 of 16
(4,960 Views)

Thanks for the replies, tst.

 

As far as I know, I'm certain I set it to relative time.  I deleted the indicator and made a new one, with the following steps:

 

Create Numeric Indicator and named it "Elapsed Time"

Right-click "Display Format..."

Select "Relative Time"

Change "System Date Format" to "Date Unused"

Change "System Time Format" to  "Custom Time Format"

24-hour

HH:MM:SS

Click ok

 

Run it.  Identical results.

0 Kudos
Message 5 of 16
(4,957 Views)

I followed your steps in LV 8.5 and 8.6 and did not see any problems with Relative Time starting at 0.

 

However, in your list of steps, I crossed out 3 lines that I was not able to explicitly set once I chose relative time.  They were all disabled and grayed in the dialog box.

 


 

As far as I know, I'm certain I set it to relative time.  I deleted the indicator and made a new one, with the following steps:

 

Create Numeric Indicator and named it "Elapsed Time"

Right-click "Display Format..."

Select "Relative Time"

Change "System Date Format" to "Date Unused"

Change "System Time Format" to  "Custom Time Format"

24-hour

HH:MM:SS

Click ok

 

Run it.  Identical results.


 

0 Kudos
Message 6 of 16
(4,951 Views)

That doesn't make any sense to me.  I'm using LabVIEW 8.5.

 

Those options were grayed out in the "System Time Format" DROPDOWN?  The attached image is what I see, where clearly, the Relative Time option is selected.

0 Kudos
Message 7 of 16
(4,946 Views)
Are you sure you're using a fully legitimate version? There was a bug in one of the recent beta versions (it might have been 8.5 or 8.5.1) where the absolute time and relative time values in that dialog were reversed, but I don't think it should be in any of the released versions. Try selecting absolute time instead and seeing if you're getting the relative time.

___________________
Try to take over the world!
Message 8 of 16
(4,936 Views)

Try formatting your "0" constant for relative time. I agree that those selections are available once you choose custom time format.

Hope this helps.

Message Edited by GovBob on 09-04-2008 02:52 PM
Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 9 of 16
(4,930 Views)
Solution
Accepted by ronbrown

tst wrote:
Are you sure you're using a fully legitimate version? There was a bug in one of the recent beta versions (it might have been 8.5 or 8.5.1) where the absolute time and relative time values in that dialog were reversed, but I don't think it should be in any of the released versions. Try selecting absolute time instead and seeing if you're getting the relative time.

 

This is a fully legitimate, activated, and registered version.  This was installed via the 8.5 DVD we got with our Developer Suite subscription.

 

But I think you might be onto something here.  I right-clicked the constants on my block diagram, went to Display Format, selected "Relative time" and I got what looked like a FULL TIMESTAMP with AM/PM and a year.  I switched to "Absolute Time" and I got 00:00!

 

I've attached a little "table" I made of the different settings.  If this was a bug, then it certainly seems like it made it into a release version.

 

 

Message 10 of 16
(4,923 Views)