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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

impossible to turn off autoscaling?

For the GRAPH version to make sense, you have to manually assign PLOT 1 = AMPLITUDE 2 scale, PLOT 2 = AMPLITUDE 3 scale, and PLOT 3 = AMPLITUDE 4 scale.

 

The graph doesn't seem to remember these assignments upon saving.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 11 of 20
(554 Views)

For the record, the reference DOES have to be to the chart/graph itself, and the event DOES have to be the SHORTCUT MENU ACTIVATION? event.

Other events, other items don't cause a problem.

 

 

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 12 of 20
(548 Views)

Well, dang.

 

What my real code is doing is gathering ALL references to ALL controls on ALL pages of the tab, and registering the whole lot with one REGISTER EVENTS function.

 

I tried a workaround:

 

Step 1: Find the chart reference in that array and delete it before registering.

--- When I do that, normal behavior is restored.  My menu mods don't get done if I click on the chart, but the scales are handled correctly.

 

Step 2: Create a NEW event case, Set it to SHORTCUT ACTIVATION? and attach it directly to the chart.

--- When I do that, the wonky behavior is restored.  Popping up on any scale and changing AUTOSCALE affects Scale #0, not the one you clicked on.

 

I don't have to actually do anything in the new handler.  Just having it present will cause the problem.

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 13 of 20
(543 Views)

Mike Porter: If you delete that event registration and the dynamic event terminals and create a normal shortcut menu activation event, all is well with the world.

 

 

I took what you said as true when I worked up my workaround attempt, but when that failed, I tested what you said directly, and found it to be false, in both LV 2010 and LV 2011.

I'd like to know what you based the statement on.

 

 

See attached VI "Chart with 4 chans" (I didn't update the graph version).

 

With NO dynamic registration, but a static event tied to the chart's SHORTCUT MENU ACTIVATION? event, it fails (see instructions on diagram).

Delete the Event case, and it works normally. 

 

The rule seems to be:

 

If there is an event attached (directly or via dynamic registration of a reference) to the SHORTCUT ACTIVATION, then the WHICH SCALE portion of the event is lost, and the menu applies to scale #0 ONLY.

 

I can't really tell with the rest of the menu, as I can't get ARBITRARY/UNIFORM to work at run time. But this is certainly true of the AUTOSCALE Y item.

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 14 of 20
(535 Views)
I based my statement on deleting the event registration, all the associated wiring and the dynamic event terminals. I then created a shortcut menu activation event on the graph and it worked.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 15 of 20
(528 Views)

I based my statement on deleting the event registration, all the associated wiring and the dynamic event terminals. I then created a shortcut menu activation event on the graph and it worked.

 

Interesting.  Message 14 contains a VI that I did, and it works in neither 2010 nor 2011.

"Works" is defined as turning on/off Autoscaling on the scale you clicked on.

 

I wonder what could be different.

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 16 of 20
(517 Views)

Attached is the latest version of both the CHART and the GRAPH versions.

These are ready to go - simply RUN it and choose any scale OTHER than the left one.

Turn AUTOSCALE Y on or off, and notice that the LEFT scale changes.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 17 of 20
(510 Views)

Ok did a bit more poking and I can't duplicate what (I thought) I saw earlier. Moreover in a sense what we are seeing makes sense. There are predefined menu tags that are used with APP shortcut menus. In the list of these predefined menu tags there is only one for toggling the autoscaling of the Y axis so when you use the menu activation event LV can't tell which Y axis you want to manipulate, so it does the first one - or perhaps the last one set as the "Active Y Axis" -- havent't had the time to look into that...

 

In any case, if you replace the existig shortcut menu of one of your own making you can toggle the autoscale on or off as desired -- see the attachment.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 18 of 20
(502 Views)

@mikeporter wrote:

Ok did a bit more poking and I can't duplicate what (I thought) I saw earlier. Moreover in a sense what we are seeing makes sense. There are predefined menu tags that are used with APP shortcut menus. In the list of these predefined menu tags there is only one for toggling the autoscaling of the Y axis so when you use the menu activation event LV can't tell which Y axis you want to manipulate, so it does the first one - or perhaps the last one set as the "Active Y Axis" -- havent't had the time to look into that...

 


--- I don't think it's the ACTIVE Y AXIS setting, or else having the event case wouldn't make any difference.  
As I suggested in bold above, I think that the event carries a WHICH SCALE WAS CLICKED ON parameter, that's not brought out to the EVENT structure.
Internally, it's carried with the event data and used correctly, but when the event goes thru an EVENT structure, it's not carried thru, and thus defaults to 0 on the other side.
@mikeporter wrote:

 

In any case, if you replace the existig shortcut menu of one of your own making you can toggle the autoscale on or off as desired -- see the attachment.


Yes, we've come to the same conclusion.  The rest of the menu is not valuable in my case, but I have a hunch that it would misbehave as well.

 

In your scheme, you get the same menu wherever on the chart you click.  I'm thinking of using the BOUNDS of the different scales to determine WHICH scale you clicked on, and offering a single ON/OFF for that one.  

 

In any case, it sure looks like an LV bug, doesn't it?

 

(Tech support still has not responded).

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 19 of 20
(497 Views)
Got off the phone with them a little while go. PM me...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 20 of 20
(494 Views)