LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re-initializing my array with reset button

Solved!
Go to solution

@cbutcher wrote:

Hi Jarrold, 

 

I look forward to seeing your next iteration!

 

The Test Types indicator is the tab control I mentioned - it's a little difficult to see on the front panel because I took a "classic" style tab control and then made it transparent, and hid the label and the tabs.

 

Unlike your existing tab control, which is a control, this one should probably be called a tab indicator! I input a value (I needed to use a conversion to U32 and then coercion, not sure if there's a better way to give the same type to radio buttons and a tab control - they're both effectively an enum) to the tab indicator and it changes which tab is displayed. This makes it just like all of your visibility properties.

 

Since you had two states with different controls, a tab control seemed the natural fit. 


Ahhh I see. But i do not find it used anywhere other that it being created on the "waiting for button" state. 

0 Kudos
Message 81 of 93
(838 Views)

Yes - that was as far as I saw the only place that you changed the visibility of all of the items which I moved to either the first or the second tab.

 

If you wire a control to it (i.e. delete the wire going in, then right click and click Create Control) and start the VI, you can try changing the control value and see it switch. It should do the same as changing the Radio Button control.

 

By the way, I don't know if you prefer it that way, but you can change the boolean text of the radio buttons to be the same as the labels and hide all the labels:

radio.png


GCentral
0 Kudos
Message 82 of 93
(834 Views)

I am done reorganizing my codes! Here you go ! Please take a look ! 

I am really impress with the way you modified my codes. This comes to show the amount of experience you have ! 

 

Btw, I am still not very sure about the thing that you mentioned above. Like what is the purpose of it ? grouping all the visibility together? I dont know how you manage to group everything together and removed the property nodes cause I am pretty sure I couldnt find them under waiting for button (Or perhaps i missed them out)

 

Anyway, I found a way to avoid switching the visibility between my arrays and wavecharts. Just simple do it the same way as I am doing it for my temperature test. Displaying both at the same time. (Doesn't solve the problem but it works the way I want it to. Forgive me on this. Hahha)

 

Looking back at the very first post till now, I gotta say you really gave me a lot of help ! I can never thank you enough. Never. 

 

Right now, I wanna know if my program can further be improved ! Hahahha. Please advice me !

 

Regards,

Jarrold


0 Kudos
Message 83 of 93
(831 Views)

It's exactly like your Page 1 and Page 2 (I just hid the tabs that allow the user to click them and took that from the radio buttons you already had).

They're never hidden, they just are on a non-visible page of the tab control (indicator).

 

p.s. Edit and add your VI 😉


GCentral
0 Kudos
Message 84 of 93
(829 Views)

@cbutcher wrote:

It's exactly like your Page 1 and Page 2 (I just hid the tabs that allow the user to click them and took that from the radio buttons you already had).

They're never hidden, they just are on a non-visible page of the tab control (indicator).

 

p.s. Edit and add your VI 😉


Yeah, I get what you mean already but if you take a look at my latest VI. I actually did some modifications to the Front Panel thus I dont think it is necessary to apply the technique you taught me. Nevertheless, I still learnt something. 😄

 

I am bringing it to the test cell to test it out the next week to observe the performance of my program! Hopefully it is acceptable if not I will have to make the program run smoother and I will need some advice from you 🙂

 

Regards,

Jarrold

0 Kudos
Message 85 of 93
(825 Views)

Hi there cbutcher,

 

I did my testing in the test cell and i realise there is a slight problem with the results. 

Take a look at the results from the file attached below. 

 

You could notice that the timings are rather not in order. To be more precise, the first reading is not affect but the rest are.

 

2nd reading would be on the right, 3rd reading would be on the left, 4th reading would be on the right, so on and so forth.. Do you know where could the problem be?

Download All
0 Kudos
Message 86 of 93
(810 Views)

Hi Jarrold,

 

Do you know where could the problem be?

Yes, it's your programming (or the algorithm you implemented in your VI)!

 

What do you want to achieve here?

check.png

So you prepend a new "timestamp" to your 1D array. Then you reverse this array - which algorithm did you use?

(And why do you need to convert a 1D array to a 2D array just for display?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 87 of 93
(801 Views)

Hi Jarrold,

 

As GerdW explained, the reverse array was I believe placed earlier for some other reason. You probably don't want it anymore, now that your code has been simplified quite a lot.

 

You can adjust whether the most recent result is on the left or the right by switching the order of the inputs to the Build Array inside the case structure.

 

I'm sorry that I can't currently comment further - I'll take a deeper look later if you have anything else you want comments on, but it's looking quite a bit tidier. Be careful to avoid accidentally introducing regressions as you clean up the BD.


GCentral
0 Kudos
Message 88 of 93
(797 Views)

@GerdW wrote:

Hi Jarrold,

 

Do you know where could the problem be?

Yes, it's your programming (or the algorithm you implemented in your VI)!

 

What do you want to achieve here?

check.png

So you prepend a new "timestamp" to your 1D array. Then you reverse this array - which algorithm did you use?

(And why do you need to convert a 1D array to a 2D array just for display?)


Yeah I actually figured it out after I stared at it for awhile. I have rectified for the problem.

 

Anyway, the 1D to 2D is for report generation purposes:) Cheers mate

Jarrold

0 Kudos
Message 89 of 93
(784 Views)

@cbutcher wrote:

Hi Jarrold,

 

As GerdW explained, the reverse array was I believe placed earlier for some other reason. You probably don't want it anymore, now that your code has been simplified quite a lot.

 

You can adjust whether the most recent result is on the left or the right by switching the order of the inputs to the Build Array inside the case structure.

 

I'm sorry that I can't currently comment further - I'll take a deeper look later if you have anything else you want comments on, but it's looking quite a bit tidier. Be careful to avoid accidentally introducing regressions as you clean up the BD.


HI there cbutcher, I figured at the problem and I have modified my codes. Thanks for your help once again. Dont bother diving into my codes. Perhaps you can do that when I face some problem ! Hahahha Smiley Very Happy

 

Cheers,

Jarrold

0 Kudos
Message 90 of 93
(782 Views)