LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 y axis over current date

Good afternoon guys. sorry my english, i'm not very good. I am trying to make a graph of 2 y-axis over current date, but the date does not appear current. Would there be any configuration within the software or something of the logic?

0 Kudos
Message 1 of 5
(1,428 Views)

It definitely is not clear what "2 y axis over current date" means.

 

Perhaps if you attached a picture of what you are trying to do, even better a VI that you have to try to attempt this, someone would be able to help.

0 Kudos
Message 2 of 5
(1,403 Views)

Hi femolina,

 


@FeMolina92 wrote:

Would there be any configuration within the software or something of the logic?


Yes.

 

What have you tried? Where are you stuck?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 5
(1,401 Views)

 

Sorry, but with the image and the VI help understanding. The graph has two y-axes (Tensão [voltage] and Soma [sum]) vs current date on the x-axis, but the date does not match the current date [like 02-11-2021 - 14:00:00]
Download All
0 Kudos
Message 4 of 5
(1,395 Views)

Please don't use the code box for the message text.

 

Your dates appear to be 12/31/1903 and the time 9:00.  I can't tell if that is am/pm or 24-hour clock.

 

1/1/1904 midnight UTC is a very special time for LabVIEW it is the epoch.  It is time 0 for the time system.  On PC's that time will show up as a few hours before or after depending on your time zone as LabVIEW adjusts the display of "time 0" to your local time.

 

I see your data is just scalar values.  You are combining numbers together without any sense of what time they occurred.  Interestingly, I see you are accumulating timestamps in an array, but you never do anything with them.

 

I don't even know why you have a time value as the X axis because you are combining X,Y data and neither appears to be time.  They are just both different calculations based on AI0 voltage.

 

Your event structure has an issue in that you have unwired tunnels and the set for Use Default if Unwired.  So if the other event occurs, you'll lose the data in you array.

 

You're using a local variable to send data from the analog read to the combining into the arrays.  That means you have a race condition and may lose data or get repeated data just based on the timing of the other code in any given iteration.  Values, Values 2, and DI12 are all using local variables unnecessarily.

 

You don't need those constant 0, 1, 2 on the Index Array.  Delete them and you'll get those same indices by default.

 

If you are plotting two values vs. time, you should be using a Waveform Chart.  If you make your values a waveform data type, the time will be applied to the data automatically.

 

 

0 Kudos
Message 5 of 5
(1,386 Views)