Jump to content
klessm1

Array of VData to VCluster with XControl Refs Issue

Recommended Posts

I ran into an interesting issue with the Array of VData to VCluster when using XControl references as part of the VData. It looks like it puts it together correctly into a cluster, but when trying to type back to the XControl reference type it throws an error. You can convert it back to a normal control type, but when doing generic sets on controls in a cluster that method doesn't work very well. LV2011, Latest verison of the library.

Screen shots here and code attached. I actually tried it with a couple different XControls and it didn't work.

post-2966-0-99416800-1332359174.png

post-2966-0-85590500-1332359160_thumb.pn

I wouldn't think that this behaviour is normal, but maybe there are some known restrictions when using XControl references? The references themselves seem a little weird because I did a source build on the project and it changed the type of controls in the "new" cluster constant when LabVIEW compiled it. They were just normal control references made from scratch in the source code and then in the build it changed them. They still said "Control" but when you clicked on them to view the ActiveX class they had Control and MRUFilePath selected. Weird.

Anyway, I can probably manually cast these values, but the whole reason behind my method was I just had to add the control ref to a cluster in a class and input the refereces as a variant array and It would load them...no custom loading of the clusters.

XControlRef.zip

Share this post


Link to post
Share on other sites

Did you notice that both your refs are now the same - i.e. pointing to the first XControl?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Similar Content

    • By Bas de Jong
      Hello, I'm trying to display an animated GIF on the front panel. This gif should be loaded programmatically based on some user event. My google search led me to use the OpenG Read GIF File (Animated)__ogtk.vi file. However, loading a GIF is extremely slow. It takes almost 20 seconds to execute the vi when I load the attached GIF (I found randomly on the internet). Is this normal? And if so, is there a way to load a gif faster? Because I need to load several and I cannot afford to load maybe 2 minutes only for the gifs.

    • By ensegre
      Is anyone aware of a limitation on what the smallest possible FP size is? On LV 2017, I am under the impression that this is 116x41 on one windows machine, and 1x1 on a linux. Known issue, WM, or deserves a CAR?
      The reason I'm asking: I'm fiddling with the cosmetics of an Xcontrol. I would have nothing against a larger transparent border, but when I webpublish the big FP using it, the large transparent border turns grey on the snap png.
      ETA:, ah, https://forums.ni.com/t5/LabVIEW/How-to-set-front-panel-size-to-be-same-as-one-led/td-p/1565524
      ETA2: ok, tried the snippet of that thread and get either no reduction or eloquent "Error 1 occurred at Property Node (arg 1) - Command requires GPIB Controller to be Controller-In-Charge" for tighter sizes.
       
    • By Benoit
      Hi there!
      I am trying to find a workaround the the missing possibility to set key focus in an array at a specific location by using X-Control.
      I am struggling at the point that i manage the key focus in my X-Control to work, but I cannot set to other control. it always stay at the same one...
      Is anyone manage to enable key focus on specific element of a X-Control?
       
      Benoit
    • By fennectp
      Hi all,
       
      I've got a customer that wants to zip/unzip files on their cRIO-9035, so I had them playing with the OpenG Zip tools to see if it would fit their needs. Although they've found that they can zip files on their cRIO just fine, they find that they get disconnected from their RT target and the shell shows the following error message:
      LabVIEW caught a fatal signal 15.0 - Recieved SIGSEGV Reason: address not mapped to object Attempt to reference address: 0x0x10000000 stdin: is not a tty  
      The zip file they're testing with includes two simple .txt files with short strings in them ("booya" and "booya2"). This file unzips just fine on the host PC with the "ZLIB Extract All Files To Dir" VI, but when copied over to the cRIO and unzipped via the same VI, it only unzips the first text file and the resulting file doesn't have any text in it.
      I've attached a copy of the project and the zip file I used to reproduce this behavior using a cRIO-9033 that I had on hand. (The only thing I can't provide is the cRIO >_<)
      Could anybody tell me what I'm doing wrong? Any suggestions as to what other workarounds I could take to zip/unzip files on a LinuxRT target would also be very much appreciated!
       
      Regards,

      Tamon
      Unzip on cRIO-9033.zip
    • By Christian Butcher
      I'm writing some LabVIEW software to store and display data from a variety of data sources, mostly through an NI DAQ board.
      I'm displaying the data (stored in an SQLite database) on an XYGraph.
      I would like to have a toggle-able, probably semi-transparent box listing each of the plots on the graph, with the option to turn the plots on/off by clicking, along with some grouping of similar plots (all temperature measurements, or all measurements from experiment #5, etc).
      The Bloomy post at http://www.ni.com/newsletter/51918/en/ gives me semi-transparent panels pretty easily (in fact, this can conceivably be tri-state, since I have on, off and invisible :D)
      I've already programmed a simple multi-column listbox for something else in this project that switches symbols and handles double-click, mouse up/down, etc, so I could maybe use a modified version of that to hold my plots.
      I have never successfully used an XControl for anything, but when I come to problems involving collections of strange custom controls, I always think, is this what an XControl is for?
      So, do I need an XControl here? Or will I just be diving into another rabbit-hole leading to yet another unsuccessful XControl attempt? If so, what should I be using instead?
      In case it matters, the bulk of the project uses NI's Actor Framework to handle separate sections, and the graph is inside a subpanel, inside another subpanel.
      Some images of current pieces. The parent holds the scrollbar, and my current no-op (except show/hide on the little menu button bottom left) overlay (not at all transparent). The child holds the actual graph, and an ugly global variable mean (I needed it quickly for a colleague's use...). The child is embedded in a subpanel of the parent (above the scrollbar) and the parent is embedded in a subpanel of the MainUI's 'Actor Core.vi'.
       


×
×
  • Create New...

Important Information

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