LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time in seconds on x-axis

Hi
I am using LabView 7.1 on Windows XP. I am acquiring the data from pressure transducer through DAQ Assistant.
My problem is that, the x-axis i.e time scale is not coming in seconds in current format. It is starting from 3288945067 i.e the value from 01 Jan 1904.
I used the following ways to get the solution.
 
1. Right click the chart >>properties>>Format and Precision. In this I selected the absolute time and then selected the advanced editing mode>>%S to get the time in current seconds.
 
2. I gone through the following link of discussion forum. It gave the use of property node to get the current date and time. However, I need only the time in current seconds.
 
3. I also tried with build waveform function as shown in attachment. But it didn't gave any desirable result.
 
I can highly appreciate if anyone can suggest a solution.
 
Thanks in advance
 
Pramod
0 Kudos
Message 1 of 14
(4,741 Views)

Have you tried selecting a number instead of absolute time? Generally the current seconds is pretty useless in a display because the number is so large. Do you really mean relative time instead from the measurement? If so have you tried relative time setting?

0 Kudos
Message 2 of 14
(4,732 Views)
Initially instead of of absolute time, I selected the minimum and maximum values of x-scale in scales tab, but it didn't worked.
I tried with relative time also. It also failed.
I need the current acquisition time starting from 0 to around 600 seconds. However currently it is showing very huge value in seconds.
0 Kudos
Message 3 of 14
(4,720 Views)
Have you tried to wire a relative time instead of "Get Date/Time in seconds" to the t0 input of "build waveform"? Then you should switch to relative time:


You should also think about using loops (6 times the same code for 6 signals) or subvis (6 times the same code...).
And you can also use simple math instead of express vi for just calculate "0.1987*X1+0.0003974"!


Message Edited by GerdW on 03-22-2008 06:29 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 14
(4,709 Views)
Dear GerdW

Thank you very much for your reply. This was what I was expecting.
Although the overall result is okay, still I am facing one small problem.
 
1. If I place a Write LVM as shown in the attachment, the waveform comes up intermittently and you willnot find x-scrollbar to replay the data after pressing the stop button. If you remove the Write LVM, the waveform comes up smoothly as expected but it always starts from 51 seconds instead of 0.
 
I want to save the data as in future I can use that data file to replay the waveform.
What will be the best way to save the data file? Currently I am using Write LVM option to save the data.
 
Once again thanks for your help.
0 Kudos
Message 5 of 14
(4,688 Views)

Hi Pramod,

Could you try reducing your vi to the minimum programming required to recreate the problem?  I have tried reducing it myself, but I cannot see the problem you are referring to, as is always begins at 0 and does not come up intermittently.  I have attached my vi as well, if you want to use it as a reference.

Regards,

Lauren

Applications Engineering
National Instruments
0 Kudos
Message 6 of 14
(4,664 Views)

Dear Lauren

I am not able to open the VI as I am working on LabView 7.1 and you sent the VI from LabView 8.5. Can you please resend it for LabView 7.1?

Thanks

Pramod

0 Kudos
Message 7 of 14
(4,657 Views)

Hi Pramod,

Here is the VI for 7.1.  All I am trying to do at this point is to reduce the code in order to isolate the issue or create a working instance that you can build off of.  I still think it would be a good idea for you to try to create a very basic program that can reproduce the error.

Regards,

Lauren

Applications Engineering
National Instruments
0 Kudos
Message 8 of 14
(4,637 Views)
hi Lauren
Again the same problem is coming with Write LVM as posted earlier in this thread. The waveform is coming intermittently and I am not able to scroll back the data.
Can you please tell is there any other way of saving the data? And can I use that data file to replay the waveform to scroll it?
I have attached the image file of intermittent data.
0 Kudos
Message 9 of 14
(4,602 Views)

Hi Pramod,

I added a write to measurement file function to the reduced vi I attached, and it still appears to be working properly.  If the problem is a result of waiting for the information to be written, you may want to consider using low level file I/O, so that you can open and close the file reference outside of the while loop. Take a look at some of the file I/O examples for good practices for writing to a file using low level functions. 

You can add a scroll bar to the graph by right-clicking on the chart and selecting properties.  Then select the box "show x scroll bar" to see a horizontal scroll bar on the chart.

Regards,

Lauren

Applications Engineering
National Instruments
0 Kudos
Message 10 of 14
(4,556 Views)