LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why the graph in Labview does not plot when there is a different set of data collected

Hi everyone,

 

I need help from you guys as I faced a problem with my Labview program. Actually, what I am trying to do with the labview program is that I will be collecting data of different days and use them to plot graphs according to the date that i have set in my program. However, my graph fails to plot whenever there is a change in date, it remains at the first graph that is being plot at the start of the program. I have tried to look through the whole process and found out that actually the execution of my graph in the program is not completed which might cause this program. Therefore, I hope that you guys can help by taking looking through my program which has been attached and tell me the solutions if any! I really appreciate your help! It is a winrar file, extract them and open the AMK_solar monitoring system(stack).vi

 

Regards,

Kok Wan

 

 

0 Kudos
Message 1 of 7
(2,911 Views)

Hi Kok,

 

please clean up your VI. It's way to big to be viewed on a FullHD monitor...

 

- You like the "Format Date/Time String" function very much, do you? You even use it when no formatting is needed!

- You can also resize the IndexArray function to provide more outputs instead of putting several instances next to each other...

- There are other Timestamp functions. You don't need to format the current time in a string to convert the string into a number to finally get the Year, Month, Day values...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(2,898 Views)

Hi there,

 

Actually this Labview program is done compilation of work done by different people. So it is like we are editing on each others work to improve on the program. Can you give me more details on "no formatting is needed", "resize the IndexArray function to provide more outputs instead of putting several instances next to each other" and "other timestamp functions" as I am actually quite new to Labview whereby I only know some of the basic functions in Labview. Nevertheless, thanks for your reply!

 

Regards,

 

Kok Wan

0 Kudos
Message 3 of 7
(2,882 Views)

By the way, this is the new VI after I have finish editing the index array. The problem is I cant still get my graph plotting after there is new sets of data coming in. From what I see when i activate the highlight execution.

0 Kudos
Message 4 of 7
(2,876 Views)

Hi Kok,

 

"no formatting needed"

check.png

Why do you feed "2358" to FormatDateTimeString? The result will be "2358" - so no formatting function needed...

 

"other timestamp functions"

check2.png

Found deep in your subVIs. You can work on timestamps as numbers, no conversion to/from string needed...

 

check3.png

This contains 3 unneccessary locals and a race condition resulting from overuse of locals...

 

"The problem is I cant still get my graph plotting"

Which graph? There are a lot of it...

Don't you read new data (correctly)? Is the data arriving in the correct wires?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 7
(2,866 Views)

Hi,

 

The new data will come in when there is a change of date, for this part I have no problem. It is the part where i need to plot the graph for this new set of data which i do not know why it get stuck somewhere in my VI. It is the point where my VI get stuck that causes my while loop not to execute another time which results in no graph plotted.

 

Regards,

Kok Wan

0 Kudos
Message 6 of 7
(2,857 Views)

Hey,

 

I had found out the problem which lies inside my subvi(auto searching two end time.vi). After the first execution, it is fine the graph and results are shown but during the second execution, the values could not get out of the while loop in the auto searching two end time.vi and it states the error "string (ARG 1) error". However, I still need your help in this as i do not know what is this error and how about to solving it.

 

Regards,

Kok Wan

0 Kudos
Message 7 of 7
(2,849 Views)