From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set X-axis to zero (time)

Hi everyone, I was looking for some help with this program I am working with.  I have attatched an image of the block diagram.  In 7.1 I am using this to collect data and display a chromatogram for a conductivity detector.  The y scale is the signal and the x scale is time.  The issue that I am trying to resolve is to get the x axis to start at zero and have essentially a timer.  the way it is set up now it clears the chart at the beginning of each run but the time unit is in the form of HH:MM:SS.  I know there is an exersize like this is the core 1 class but I have tried wiring in a history node and it is just clearinging the data for each run (which I want) 

 

so if anyone can give me a pointer on how to get this time scale to act as a timer and not the actual time I appreciate it.

0 Kudos
Message 1 of 21
(4,395 Views)

Use relative instead of absolute time? See the attached VI.

If not, property node "offset and multiplier" allow you to set arbitrarely the starting point and step of the X axes

0 Kudos
Message 2 of 21
(4,386 Views)

it is in relative time.  the time that shows up say if i was running at 1 this afternoon would be 13:23:34.

 

I have tried the offset and multiplier unless I am trying to use it incorrectly, which is a good posibility.  I have wired them in and a constant of 0 in and it is not affecting my graph at all.  Am I wiring that in wrong?

0 Kudos
Message 3 of 21
(4,380 Views)

How can anyone tell if you are using it incorrectly if you don't show your code. And please, don't convert an image to a pdf. For the best help, attach the actual VI.

0 Kudos
Message 4 of 21
(4,373 Views)

The reason I didnt attatch the vi is because I am in 7.1 and if you go and make a change and post in newer version, like you did before, I cant open it up to look at it.  I figured that was better than not posting anything at all, sorry.

 

 

0 Kudos
Message 5 of 21
(4,370 Views)

Hi rschmeling,

 

please set the x axis to show "relative time" as was said before...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 21
(4,366 Views)

I made no changes to any VI and did not post anything.

 

That VI has a history property and a ScrollVis property. I don't remember if the property names changed at some point and if your code really has the offset property. In any case, one of the shipping examples is one called Real-Time Chart. That example uses relative and sets the start time to the current time. If a zero is wired to the offset, then the chart always begins at 00:00:00. Your code should do the same thing.

0 Kudos
Message 7 of 21
(4,364 Views)

As I said before (and send you in the VI) the solution is to use relative time.

I send you a new version in which you can start your timer at 0, or at the current system time.

I can only downgrade to LV8. Consider updating your labview. LV7 is a little bit old now 😛

 

Solution timer.PNG

Message 8 of 21
(4,355 Views)

I always want it to start at zero so I dont need to use the case structure. 

 

I am getting it to start at 0 by adding what you have in the false loop, however when I wire the constant of 0 in like you have in the true case it has no affect on the scale. 

 

When I wire in the get time is seconds its starts at 0 but it does not progress the time at all.  it continues to stay at reading 0.

 

quick question what is the point of the 6 and 7 wired into the scale format?  what does that do?

0 Kudos
Message 9 of 21
(4,351 Views)

The 6 sets the format to relative time programatically.

If you dont do it via BD, then go to the FP, right click the chart, go to the properties, go to Display format, find the x axis and set the Type to relative time.

 

I am not sure to get your problem now. The zero will stay in the scale until the number of samples of the scale are acquired. In my VI the end of the X scale is set to 10. Once 10 samples are acquired, the plot will be updated according to the "update mode" (pop up menu>>advanced). For a "strip chart" this means that after the eleven-th sample, the scale will show 1-11, 2-12, 3-13 etc.

As an example:

Dibujo.PNG

0 Kudos
Message 10 of 21
(4,349 Views)