Jump to content

Search the Community

Showing results for tags 'shared variable'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Software & Hardware Discussions
    • LabVIEW Community Edition
    • LabVIEW General
    • LabVIEW (By Category)
    • Hardware
  • Resources
    • LabVIEW Getting Started
    • GCentral
    • Code Repository (Certified)
    • LAVA Code on LabVIEW Tools Network
    • Code In-Development
    • OpenG
  • Community
    • LAVA Lounge
    • LabVIEW Feedback for NI
    • LabVIEW Ecosystem
  • LAVA Site Related
    • Site Feedback & Support
    • Wiki Help

Categories

  • *Uncertified*
  • LabVIEW Tools Network Certified
  • LabVIEW API
    • VI Scripting
    • JKI Right-Click Framework Plugins
    • Quick Drop Plugins
    • XNodes
  • General
  • User Interface
    • X-Controls
  • LabVIEW IDE
    • Custom Probes
  • LabVIEW OOP
  • Database & File IO
  • Machine Vision & Imaging
  • Remote Control, Monitoring and the Internet
  • Hardware

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Company Website


Twitter Name


LinkedIn Profile


Facebook Page


Location


Interests

Found 8 results

  1. DLL functions or shared variables? Or something else? I have a Labview 2014-64 executable (or I can build a DLL) that runs one piece of equipment, the X-ray. The other engineer has a large CVI Labwindows 2015 + MS Visual Studio 2012 (C++) executable that runs everything else. I want the Labview code to be a slave of the CVI code, accepting commands to turn X-ray On or Off, reporting failures, and the like. Translating the X-ray code into C++ would be possible in principle, but not fun. Shared variables look easy, but I'm kinda scared of them. I would define all the shared variables in my LV code, since I'm more familiar with LV, then use them in both. There's a thread in here called "Shared Variable Woes" so maybe I should be scared. In the alternative, I tried building a proof-of-concept DLL in Labview, and calling its functions in CVI/C++, and it works, but it's kinda clunky. (I'm attaching it below in case you want to play, or advise.) Your advice would be appreciated. XrayDLL.zip
  2. Thought I'd pass this along and see if anyone can reproduce with different versions of LabVIEW. Appreciate it if anyone has seen this and has a fix. I'm using shared variables to communicate between applications (1:N). I'd been seeing some memory creep that was inconsistent and somewhat bizarre. Eventually managed to track it down to that I'm programmatically opening a connection to a shared variable in one loop, then reading the value in a different loop (the different loops have to do with reconnecting on connection loss and startup). There is a functional global used to pass the variable to the second loop. The Read Variable primitive deallocates all but 4 bytes of memory for the previous loop handle and then allocates memory for a new handle on each iteration of the while loop, hence creating a leak. This behavior does not occur if there is only one loop where there is an open, while loop with a read, and a close. Main.vi demonstrates the issue. Main 2.vi is more like the NI example. I've got service request #7728859 with NI going, but I think I got the guy's first day. LabVIEW 2015 SP1 32-bit on Win7 64-bit. Shared Variables memory leak.zip
  3. More out of curiosity than of hope: has anybody any idea why SVs are almost unsupported on linux? By almost I mean that controls and indicators cannot be bound to shared variables, and that shared variables cannot be programmatically created and looked up. I know that SVs hosted on windows can be accessed in linux LV using datasocket nodes, but that is all it gets. And it has been said that datasocket is despicable. What are the missing pieces that make SV windows-only? I didn't find much in the canonical places, so I posted a dumb zero-kudos attracting idea.
  4. I would like to use programmatic access to manipulate shared variables on a computer and an NI cRIO 9033, but cannot get programmatic access to shared variables on the cRIO. I have boiled the situation down to a simple example to try to explain what I am seeing. The shared variables are hosted on the cRIO. I am using the same VI to perform the accesses on the computer and the cRIO. On the computer, access to the shared variable via a shared variable node and programmatic access both work. On the cRIO, access to the shared variable via a shared variable node is functional, but programmatic access to the shared variable does not work. The error code received when trying to to a Read Variable or Open Variable Connection on the cRIO to the shared variable is -1950678943. The error text reads "Timed out while attempting to open a connection to the variable." I'm quickly becoming confused as to why the cRIO should have trouble reading a shared variable programmatically that is hosted on itself. The web searches I have done haven't turned up such a simple scenario causing this error, so I'm wondering if I've stumbled into a beginner mistake. I have attached the source code to this post, so if someone could please take a look that would really help! Block Diagram: Result of running on computer (programmatic and shared variable node access both work): Result of running on NI cRIO 9033 (programmatic shared variable access does not work, shared variable node access does work): Test Access to Shared Variable from cRIO.zip
  5. Hi All, Is there a way to log a programmatically created shared variable of cluster or array datatype into citadel DB? I have attempted to programmatically create a shared variable of type 'double' and was able to successfully log the same into Citadel DB. In the attachment, Please refer to the attached project SV_TC.lvproj and specifically to SV_W.vi for the code that i have used (W.png file shows the dB in MAX and shared variable in NI Distributed System Manager) However when i tried the same approach to create a shared variable 'array of double', i noticed that traces are not getting created and hence data logging isn't happening into the Citadel DB. I was however able to write and read the shared variable array without issues. The same is true with cluster datatype also. Please refer to SN_NW.vi for the code that i have used - only difference from SV_W.vi is that i have tried to create a shared variable of type 'array of double' One observation is that if i create an 'array of double' or cluster in a shared variable library using the project explorer and deploy, i could see that these being logged into Citadel DB. Hence i want to understand what could be done to achieve the same programmatically? Could you please advice? Regards, Sridhar SV_TC.zip
  6. We found this bug when updating from 2010 to 2012 last week. Certain types of clusters will not update over datasocket or network-published shared variable. You will only get their default data. Here are the conditions that will cause the problem: The cluster contains an array of clusters The array of clusters is not the last item in the cluster The array of clusters is empty All three conditions must be fulfilled in order for the bug to appear. An AE was able to reproduce it and it has CAR #385089.
  7. Hi everyone I have a question about how I should approach the design of an application. Here it goes. I am making a DAC which will be reading data from multiple sources and controlling servos/steppers based on some control inputs and then logging things like position strain gauge readings and rpm. All that is fine and I have made successful DACs which perform those tasks. Now I want to make each portion of a separate vi and integrate them together in one main gui using subpanels. I have seen this done using the AMC message queues, which worked but seemed overly complicated and messy. I know this could be done using shared variables but I am not sure what the drawbacks/challenges I would face are? Would this be a viable way to go about doing this? Is there another cleaner way via events or something I haven't mentioned? I have been try to use VI Server References but I don't know how to transfer that data between sub panels, can this be done? I am using Labview 2010 and have access to if needed 2011. Thanks in advance!
  8. Hello everyone, Basically i have 2 VIs, one running on a PXI, lets call it PXI.vi and one on the pc, GUI.vi I started testing my application some days ago and after 3 hours of running i got the error in the picture. Error -1073807339 occured at VISA Write in PXI.vi Reason: Timeout expired before operation completed. Then immediately also this error: Unable to locate variable in the shared variable engine. Deployment of the variable may have failed. I restarted the PXI and started the test and it happened again after 2 hours. The third time even sooner. It is always 2 variables that cause this problem.They are used to pass information about error happening on a instrument. So actually they are not even used when giving the message. I check them in a loop every second. They are not buffered. I initialize them when the vi starts I am using Labview 2011 and windows 7 Thank ou in advance for your time.
×
×
  • Create New...

Important Information

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