LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inside tab control, click ok button to display waveform chart in the next tab (second page)

Greetings,

 

Attached vi is what I am currently working on, I have looked everywhere for guides but I just cant seem to find the exact solution as most of the tutorials are jst the basic ones. Any help would be greatly appreciated.

 

Can anyone help me with examples/answer my following questions:-

Screenshot (49).pngScreenshot (50).png 

As shown above,

  • how to disable the OK button when none of boolean button is clicked and enable the OK button when atleast one of the boolean button is clicked?

 

  • when OK button is clicked, how to link the recently inputted file path control (that contains lets say a CSV file) to a waveform chart in the next tab "Data Signal"

 

 

Regards,

H

0 Kudos
Message 1 of 8
(3,239 Views)

Hi H,

 

how to disable the OK button when none of boolean button is clicked and enable the OK button when atleast one of the boolean button is clicked?

 You already know how to en-/disable the file path controls. You can do the same with your OK button: based on a condition you use the Dsiabled-property of this button!

 

when OK button is clicked, how to link the recently inputted file path control (that contains lets say a CSV file) to a waveform chart in the next tab "Data Signal"

You already did this in the event structure in your VI: use the filepath to read a spreadsheet file and display its content in a chart. What's your problem here?

 

On yur VI:

- NEVER delete lables of controls/indicators! You may HIDE them in the frontpanel, but NEVER DELETE them! How will you know, which property node belongs to which path control?

- Why did you use an additional loop to handle those disabled properties? Why didn't you create some value change events for your buttons?

- Why is there no value change event for your "stop 2" button?

Best regards,
GerdW


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

Thanks for the response. 

 

You already did this in the event structure in your VI: use the filepath to read a spreadsheet file and display its content in a chart. What's your problem here?

Have you even tried to run the vi I have given in this post? Have you also tried to understand my question?  The problem is it does not work as I wanted and thats the purpose of my questions here.

 

I know we can use the read a spreadsheet file vi but as mentioned, "how to link and display the recently inputted file path control (that contains lets say a CSV file) to a waveform chart in the next tab "Data Signal"" 

 

NEVER delete lables of controls/indicators! You may HIDE them in the frontpanel, but NEVER DELETE them! How will you know, which property node belongs to which path control?

Noted, anyway I just double-click on the object to know which belong to which. 

0 Kudos
Message 3 of 8
(3,188 Views)

Hi H,

 

The problem is it does not work as I wanted and thats the purpose of my questions here.

You asked for how to display the content of files choosen by the user in some charts - but you already know how to do that. What is it that you "want" exactly?

 

but as mentioned, "how to link and display the recently inputted file path control (that contains lets say a CSV file) to a waveform chart in the next tab "Data Signal"" 

To link a data source (ReadSpreadsheetFile) and a data sink (chart) you should use a wire - as you already have done for your chart.

I still don't understand your problem - maybe you should explain it more detailed?

 

Noted, anyway I just double-click on the object to know which belong to which. 

So when a colleague of you has to maintain your code (s)he always has to double click each item to learn about the relation of a property node and its control/indicator?

I guess you are not used to well-documented code…

 

how to disable the OK button when none of boolean button is clicked and enable the OK button when atleast one of the boolean button is clicked?

As you seem to have problems with developing some simple algorithm I suggest some pseudocode:

IF all buttons == FALSE THEN /* build an array from your button values and use OR-Array */
  disable(OK button)
ELSE
  enable(OK button)
ENDIF
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(3,182 Views)

@nnhas wrote:

NEVER delete lables of controls/indicators! You may HIDE them in the frontpanel, but NEVER DELETE them! How will you know, which property node belongs to which path control?

Noted, anyway I just double-click on the object to know which belong to which. 


But it makes your code completely unreadable. Imaging it's not your own VI and it's a bigger VI, and now you always have to double-click on the property nodes and terminals just to find out where it belongs to? Imaging creating a event for several of the controls where the label is removed?  Always right-clicking just to find out the control it belongs to?

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 5 of 8
(3,177 Views)

But it makes your code completely unreadable. Imaging it's not your own VI and it's a bigger VI, and now you always have to double-click on the property nodes and terminals just to find out where it belongs to? Imaging creating a event for several of the controls where the label is removed?  Always right-clicking just to find out the control it belongs to?

 

Thanks for responding. This does not seem to be the biggest problem in my question, I have noted my mistake on that so I hope everyone can just focus on the topic. 

0 Kudos
Message 6 of 8
(3,172 Views)

So when a colleague of you has to maintain your code (s)he always has to double click each item to learn about the relation of a property node and its control/indicator?

I guess you are not used to well-documented code…

 

The vi provided is not completed yet, its only the file path control labels that I only HIDE. Besides, I take note of this mistake you pointed out. Why does this have to be a big deal in this topic?  

 

I am relatively new in graphical programming as I am always used to do text-based programming. 

 

I will not be asking in this forum if I am clear with what to do.

 

Instead of just pointing out the mistakes and asking me the question back, I think would be better if you guide the steps with a simple diagram?

0 Kudos
Message 7 of 8
(3,168 Views)

Hi H,

 

its only the file path control labels that I only HIDE.

No, wrong. You did not HIDE the labels, you deleted them (aka used an empty string as label).

I am always used to do text-based programming. 

So you wrote code like '' = '' + '' using empty strings as labels of variables?

 

Beside this code documentation topic: did you read my answers above? Can you answer my questions?

 

Converted pseudocode from above:

check.png

Best regards,
GerdW


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