Jump to content

yuxie

Members
  • Posts

    3
  • Joined

  • Last visited

    Never

yuxie's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. See the attached VI. When using the Get Control Value [Variant] methods or other similar methods, we have to assign the control name. Intuitively, the control name is identical to the label text. In version 8.5 it is. However, in LV 7.1, it is not always the same, even though 99% it is. This is not an obvious bug in LV 7.1. The problem is, if there is white space(s) at the beginning/end of the label text, we have to trim the white space(s). If you use "Set Control Value [Variant]" method you can see it returns the control name without white space if there is any. But the spaces within a label text are OK. For example, if the text label is " 12 3 ". The control name is going to be "12 3". This is an annoying bug since white space is very hard to identify especially when the background is transparent. Consequently, unlike the "label text" property node which could be an empty string, you have to have a nonempty label for the control you want to access. In addition, if you want to use "Get All Control Values" method, none of the controls can have empty label, otherwise LabVIEW will return an error. This issue is fixed in 8.5 (may be in 8.0, too. But I did not check). "Get All Control Values" method won't return an error even though a control has an empty label. However, such a correction causes a problem. You have to decide to or not to trim white spaces based on the version information.
  2. I have spent some time to study the new cursor-related features in LV8.0 and higher. I bet you all knew the cursor change event which is definitely a thumb-up thing. In addition, there is a new property node, called Label Offset in Cursor List. This new property node will slove a problem I have struggled in LV earlier versions. What I want to do is to show the cursor positions on the plot by setting the cursor name as the cursor position (string). But in earlier LV versions, it is hard to maintain the label string within the plot area. With the new property node, it is easy. But the tricky thing is the unit of the Label Offset which is however NOT well documented. Anyway, I figured out that it is not in pixel. It is also related to the offset and multiplier of both the X and Y axes. Therefore, in order to set the Label Offset, we have to map the relative offset in pixel to the absolute offset in the plot X-Y units. See the attached little example I made. Comments are welcome. Thanks.
  3. I have noticed a strange behavior of LabVIEW. Please see the attached VIs (LV 8.5). I am trying to synchronize the cursors of two plots. I mean, make them at the same X position. For two graphs, I can accurately set the X cursor position. However, for two XY plots, there is always a gap. I have also reproduced the same behavior in LV 7.1. The reason I am using 8.5 for this post is 8.5 has comvenient cursor change event. Is this a bug? If it is, it must have been there for a long time.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.