LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I create a toggle lin/log option on a graph for user?

I am producing an XY graph in LabVIEW and require to put a control button which allows the user to toggle between a linear and logarithmic scale on the front panel ( for the y-axis), whilst the programme is acquiring data. Is there any way to set a control button on the front panel to allow this without having to enter the graph properties?

Thanks, DD
0 Kudos
Message 1 of 11
(3,163 Views)
Hello DD,

what do you mean with "without having to enter the graph properties"?
You can set a switch and connect this the the appropriate graph property.
Or you can set a switch and have some calculation on your data to "simulate" a log y-scale...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 11
(3,153 Views)
Hi GerdW.

Thanks for your reply! I wish to set a control so that the user can toggle lin/log on the front panel whilst the measurements continue to be taken, as the graph properties cannot be accessed whilst the VI is running. Are you refferring to setting up a reference node? My knowledge of LabVIEW is a little limited so i appreciate the advice!!

thanks, DD
0 Kudos
Message 3 of 11
(3,152 Views)
Hello DD,

i meant:
right-click on the terminal of your graph, select create-property node, then select the property Y-scale->MappingMode and connect that with your switch (with a conversion "boolean to (0,1)" in between). Then you can access the graph properties at runtime.

That's the method to change interface settings at runtime anyway...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 11
(3,147 Views)
Create a property node for the graph. Select the property Yscale.Mapmode 0=linear 1=logarithmic
0 Kudos
Message 5 of 11
(3,146 Views)
Hello guys, thanks for the advice, appreciate it!!!

DD
0 Kudos
Message 6 of 11
(3,139 Views)
that´s exactly what i am trying to do right now. Sorry for my english i am german. can someone help me with the attached file? i want to switch the histogram scale between logarithmic and linear
0 Kudos
Message 7 of 11
(2,973 Views)
Hi Biberkacke,

why the hell do you use such a user name? I wouldn't let somebody call me like this...

Have a look at the changed attachment. You have to set the property nodes to 'write' to set parameters! And there are simpler methods to convert a boolean to a number...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 11
(2,966 Views)
Hi GerdW
 
first of all many thanks for your help. I dunno what you did, but thank you. And i have to admit, I do not really understand what you are tryin to tell me abouet the property nodes or whatever, I´m just a noob 😉
 
About my nick, actually I wanted just Biber (=Beaver in english) but it was already used by someone else. So I just added kacke. sorry for that
 
adios amigos
0 Kudos
Message 9 of 11
(2,964 Views)
Hi Biberkacke,

just right-click the property nodes. The first menu entry is 'set all to write' (or 'read'). You can also set single properties to read/write, when you use more than one property in a node.

In read mode you get the actual settings. To chnage settings you have to switch to write mode!

What did I do:
I cleaned up your code a little bit. Then I added a property node for the Histogramm. Then I added a while loop to demonstrate the new behaviour...
Now you can change lin/log mode to see the difference. Use the stop button to stop the vi.

Message Edited by GerdW on 12-12-2006 10:45 AM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 11
(2,959 Views)