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.
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.
10-01-2017 05:48 AM
Hi,
its wha again...
Found an old "Test sweep - vi" now updated ... was a Demo for one of my Colleagues
I have saved it as LabVIEW2008 - version and it works without any Hardware attached.
Try it out
Rgds
wha
10-01-2017 11:35 AM
@jason91 wrote:
I have tried on the solution you shared. But the graph from previous iteration will appear when I run for second looping. Do you mind to share with me how to clear the data logging in the graph when running the next loop? As I tried on your solution, whenever Clear button is pressed, the graph will be cleared. However, the graph will be reappear when the Clear button is pressed again. From this, I think the data still store in the indicator. I'm looking forward to receive your advice.
OK, I looked at your code and don't quite see how it relates to your problem description. The inner loop records several traces and "clear" is only true when the outer loop is at iteration zero. During that time, the data is also stored in the two orange shift registers.
The program seems to work as I would expect, so if you expect a different behavior please provide a step-by-step description exactly how you are using it. What are the various settings? (all at default?) What happens and what do you expect to happen instead.
(Overall, the code seem overly complicated. Why is "Y" sometimes EXT precision (makes no sense!). It would seem much easier to use complex data type for the xy data. Why is the inner loop not a FOR loop (with a conditional terminal)? If you would place the "stop" terminal inside the inner loop, you would not need any local variables for it and it could be made latch action. The "[i]+1>=14?" belongs in the outer loop because the result is always the same., etc.)
10-01-2017 10:38 PM
Hi Jens,
Yes, I have attached it below. I have figured the problem by setting the reset in the build XY graph. Thanks for the respond.
Regards,
Jason
10-01-2017 10:47 PM
Hi Knight of NI,
I agreed that there is an error in the coding. I should set a TRUE constant outside the While loop to reset the build XY graph for every new run.
I'm using a graph to display the result. From the solution provided, it does not really clear the data, in fact it will be loop into the TURE condition (empty array) when the button is pressed. But once the button is pressed again, it will entered to the FALSE condition where it will display the previous result. I have uploaded my case study. Kindly correct me if I'm wrong. Or if there is any features we could use for the building the graph, please share with me as well. I'm still in the learning phase. 😃
Thank you for the sharing anyway.
Regards,
Jason
10-01-2017 11:37 PM - edited 10-01-2017 11:58 PM
Hi Wha,
Thank you very much for sharing your example. I have found the problem in coding. You may refer the attachment below. Hope you don't mind to share more with if any error found.
Regards,
Jason
10-02-2017 12:32 AM - edited 10-02-2017 12:41 AM
Your program still does not make a lot of sense.
10-02-2017 01:06 AM
Here's exactly the same functionality with somewhat cleaner code (one loop, one case structure, etc.). It would be simple to add more states as needed.
10-02-2017 02:46 AM
Hi Altenbach,
Thank you very much for putting effort to readout my coding. Ya, those mistake you pointed out is a very good finding. Actually the vi I uploaded is an simulation of my problem with similar configuration. So some features might seems to be less useful. However, I do agreed with you that by reset the graph is able to refresh the data while the constant to property nodes seems to be a redundant in this case.
Once again thank you for your advice in solving my problem.
Regards,
Jason