Shared Variable Properties and DSC

Is there a way to assign engineering units to a shared variable as a
configuration parameter?  This should be on the "Scaling" page of
the shared variable properties.  It seems this is a logical and
convenient place to track units.  Assigning units programmatically
using the Scaling:Units property is awkward (to say the least).
On similar lines, why aren't shared variable properties automatically
saved to the DSC historical database?  Every trace should have a
set of information that exposes ALL the shared variable properties that
created it.  Take something like engineering units for
example:  then you would know what kind of historical trace you
are looking at!  This seems so basic I can't imagine why it was
missed.
Unless I missed something -- please enlighten me.
Regards,
David Moerman
TruView Technology Integration Ltd.

Hello David,
You are correct in that the units property is not exposed on the
Scaling page of hte Shared Variable properties dialog, and it sounds
like you are already well aware of the existing method to access this
property through the property node interface.  As you have also
discovered, the Citadel database that we use with DSC does not have a
built-in provision for storing metadata about the shared variable from
which a trace originates.  You can emulate this with, for example, an
array of strings which is also logged to the database, with each string
containing the metadata for a particular trace. 
Since it seems like having these features would benefit you, I
encourage you to let our DSC development group know your needs by
filling out product feedback, accessible on our site at
http://www.ni.com/contact   .  This will send a feature request
directly to the appropriate R & D group, who reads and evaluates
every suggestion made.  This is your most direct way to let us know
what features would best meet your needs.
Cheers,
Matt Pollock
National Instruments

Similar Messages

  • In the shared variable properties box, when enabling aliasing, what is the difference between binding to a project variable vs. to a psp url

    In the shared variable properties box, specifically with regard to a the target being an rt target, when enabling aliasing, what is the difference between binding to a project variable vs. to a psp url?

    The difference is in the type of variable you are binding it to.  A project variable is a variable that lives within the specific project in which it was created.  A PSP URL is an address using the Publish-Subscribe Protocol (PSP).  You can learn more about PSP URLs here: http://zone.ni.com/reference/en-XX/help/371361G-01/lvconcepts/using_datasocket_technology/#Specifyin...
    PSP URLs will enable it to communicate between different machines and also between projects which may or may not be open.  The project variable will exist within the project.
    Julian R.
    Applications Engineer
    National Instruments

  • Where can I find the "Shared Variable Properties" VI to be used in my program for configuring SV remotely?

    I was using the "configure Alarms" and "configure Logging" VIs to design two user interfaces to make use of these VIs when I came across a problem.  In both VIs you can enable logging of alarms.  So which one is valid?  Which one has priority?  Then I looked at the "Shared Variable Properties" built into the project explorer.  Now I realize that I am spending all of this time redesigning this properties dialog (which also has two options of enabling logging of alarms (on the Alarms tab to the far right side as well as on the Logging tab).  So now my question is, how do I access this "Shared Variable Properties" dialog through my program (Note: this would be on a different machine than where the shared variables are set up.  The point is to configure shared variables remotely).
    Thanks
    Matt

    Here is a VI I re-created and posted for all.  I'm not sure why NI doesn't provide their VI to the developer.  The only thing I can't figure out is that when reading in the "Ack Type" into a variable, it generates an error.  It will work if you go into "project explorer" and right click on the library with the shared variable and "deploy" but eventually stops working.  I have tried using the "undeploy library" and "deploy library" to see if this would be a work around but had no success.
    Just pipe the path of the shared variable into the vi.
    Mattk
    Attachments:
    Shared Variable Properties.vi ‏95 KB

  • Difference between Shared Variable Refnum and Control

    Dabbing my toes in Shared Variables for another project.  Glad to see A LOT more support from NI in terms of Shared Variables (especially now that built executables can be set to automatically deploy shared variable libraries...thats a big help).
    In the Shared Variable block diagram palette (under Data Communication) there are a number of VIs that can be used to progmatically access and consume shared variables.  Awesome.  One thing that I have noticed is there is a difference between a "Shared Variable Control" (from the I/O front panel palette) and the "Shared Variable Refnum In" that you obtain from right-clicking one of the VIs from the Shared Variable palette and selected "Create Control".
    My first thought was that these two were one and the same, but they are not.  Visually they look different:
    Also, the reference input to the VIs in the Shared Variable palette only take the "shared variable refnum" control as input.  The control from the "I/O" palette does not work.
    This wouldn't be much of a problem, but I prefer the look of the Silver Shared Variable Control much more to the control I get from the "Create->Control".  Also, the variable browser in the Shared Variable Control is A LOT nicer than the control refnum gives me.
    Here is the Shared Variable refnum variable browser:
    Here is the much nicer looking browser that pops up from the Shared Variable Control:
    So I guess my questions are:
    Why are there two reference data types that seemingly perform the same function but are incompatible with one another in LabVIEW?
    How can I use the Shared Variable Control with the Shared Variable palette VIs?
    Thanks for your input.

    Hello Nickerbocker,
    You actually want to use the Shared Variable Control in the context of Alarms, I/O Servers and other categories inside the DSC Module. Like you already saw, to use the basic functionality of a Shared Variable, such as programmatically reading / writing to it, you need to use a refnum.
    Regards,
    Daniel REDS
    RF Systems Engineer
    Help us grow.
    If a post solves your question, mark it as The Solution.
    If a post helps, give Kudos to it.

  • Can't open/access Shared Variable Properties Dalog Box

    I've just upgraded to LV 8.6 from 8.5.  Now I can't open up the Shared Variable Properties Dialog Box.  In the Project Explorer, I expand the shared variable library, select the shared variable, right-click on it to get the pop-up menu, select Properties, nothing happens.  The same is true when I right-click on the shared variable library or My Computer and select New>>Variable.
    On another computer that I upgraded to LV 8.6, I can do the same things and get the dialog box, albeit it looks different in 8.6 than it did in 8.5. 
    There were no errors reported in upgrading these computers.  Any ideas as to what is wrong?

    I've tried re-installing LV 8.6 from the DVDs sent to me.  I get the following errors:
    Error 1335. the cabinet file 'mib.cab' required for this installation is corrupt and cannot be used. This could indicate a network error , an error reading from the CD-ROM, or a problem with this package. -  I responded with 'ignore'
    The NI Assistant Framework LabVIEW Code Generator 8.5 installaion has failed with the following error.
    Internal Error 2350.
    Continue? - I responded with 'yes'
    LabView installs but I still can't get access to the dialog box.

  • Shared Variables - Properties

    Hello,
    I have a couple of questions about properties of Shared Variables (SV). They can be configured either by using the dialog box (right-click on SV -> Properties), or programmatically via the "SharedVariableIO" property node. Have a look at the NI-Examples to see how SV can be created programmatically by using the DSC module.
    1)  The dialog box offers a property "Variable Type" which can be "Network-published", "Single-Process" or "Time-Triggered". The "SharedVariableIO" property node gives no access to this property. Does anybody know why? The same question can be rephrased: How can I create a "Single-Process" SV programmatically?
    2) The "SharedVariableIO" property node has two items, "Network.OnScan" and "Network.ConnectionType", which have no direct correspondance to any of the properties available in the dialog box. What is the exact meaning of those properties? The on-line help isn't of much use here...
    3) Mutliple SV can be edited by using the Multiple Variable Editor (Tools->Shared Varaible->Multiple Variable Editor). A cool feature is the import/export of CSV-files. I am interested in programmatically creating SVs from the information stored in such a CSV-file. Reading the file is no problem, but connecting the file entries to the properties of the "SharedVariableIO" property node would be quite some job. In principle NI has already solved that within the Multiple Variable Editor. I guess there is a bunch of VIs somewhere below "....Program Files/NI/.../vi.lib that do exactly this thing. Does anybody know, if these (which ones?) are available for public use?
    Regards,
       Dietrich

    dietrich wrote:
    1)  The dialog box offers a property "Variable Type" which can be "Network-published", "Single-Process" or "Time-Triggered". The "SharedVariableIO" property node gives no access to this property. Does anybody know why? The same question can be rephrased: How can I create a "Single-Process" SV programmatically?
    You can't.  The single-process shared variable is an old style LabVIEW global placed under the shared variable abstraction.  There is currently no way to create those on the fly.  Time-triggered also cannot be created programmatically.  I confess I don't know enough about them to know the reason why.
    dietrich wrote:
    2) The "SharedVariableIO" property node has two items, "Network.OnScan" and "Network.ConnectionType", which have no direct correspondance to any of the properties available in the dialog box. What is the exact meaning of those properties? The on-line help isn't of much use here...
    Network.On Scan = read/write hardware? - this allows you to programmatically control when you are reading from or writing to configured hardware.
    Network.ConnectionType = connect to hardware even when no one is viewing me? - this has 2 choices, UpFront & OnDemand, UpFront means that the variable will be connected to hardware even when no one is connected to the variable.  This is useful when you want to reserve hardware or when logging is enabled.  OnDemand means that you disconnect from hardware whenever no one is reading the variable.
    dietrich wrote:
    3) Mutliple SV can be edited by using the Multiple Variable Editor (Tools->Shared Varaible->Multiple Variable Editor). A cool feature is the import/export of CSV-files. I am interested in programmatically creating SVs from the information stored in such a CSV-file. Reading the file is no problem, but connecting the file entries to the properties of the "SharedVariableIO" property node would be quite some job. In principle NI has already solved that within the Multiple Variable Editor. I guess there is a bunch of VIs somewhere below "....Program Files/NI/.../vi.lib that do exactly this thing. Does anybody know, if these (which ones?) are available for public use?
    I would advise against using any of these.  National Instruments can change, or remove, those underlying files at any time as a result of modifications to the MVE.  That could cause issues for any code using those sub-VIs.
    Regards,
    Robert

  • -1950679023 Shared Variable Engine and the NI 9148

    I'm running an RT application on a cRIO-9074 that calls I/O from a connected cRIO expansion chassis (NI 9148). At some point some digital input variables throw he following error
    -1950679023, The connection to the server was disconnected.
    What's strange is that its only some of the inputs that have this problems. Other variables on the same module work just fine. What's going on here and how can I get my system to recover from this error once throw?
    I'm running RT 2011.0.1  and Network Variable Engine 1.8.1
    Craig

    Hi Craig,
    Do you see these same problems if you place the two offending modules in the 9074's chassis instead of an expansion chassis? If you do make this switch do you then see errors on other modules?
    Have you tried programmatically reading the variables instead of using shared variable nodes? You can find an example of this if you're not familiar with it here, https://decibel.ni.com/content/docs/DOC-12548. 
    When you see these errors does your application stop running, or do you just see the errors being carried through the variables as it continues to run? Also, just to double check, you're seeing these errors intermittently not every time you run correct? Also is there anything noticeable happening when this error occurs other than the error itself?
    Finally, could you post a little bit of your code, or some screenshots of where you're accessing these variables and how often you're doing so? 
    Thanks,
    Miles G.
    National Instruments
    Applications Engineer

  • Shared Variable Deployment and Hosting

    Hi all,
    I am writing a labview RT application where a host PC will communicate with a RIO 9074 to write/update some 400 I/O simultaneously..
    I have decided to write an entry level VI on the host PC so that I can pass all data to the RIO and then receive the processed data back. Here is my question... Where should I create the network shared variables in my project?? Under the host PC or under the RIO target?? What would be the difference between hosting the network shared variables in my host PC or hosting them in my cRIO??
    Cheers,
    Harry

    There are some questions you need to ask yourself before you make those decisions. The following tutorial has that covered under the title 'Recommendations for Shared Variable Hosting Location'. Have a look and let us know if you have any further questions:
    Using the LabVIEW Shared Variable
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • Shared variables not working on PC

    Can anyone tell from the attached screen shot, why my one shared variable is not working with the labview application I'm running on my PC. I set the variable to 48 (I thought), and yet in the NI Distributed System Manager the value doesn't changed. 
    Solved!
    Go to Solution.
    Attachments:
    shared_var_not_working.JPG ‏255 KB

    Its not likely to be a deadband problem if you haven't touched the settings. I would check it out just in case though. In the project window, right click on the shared variable>>properties and select Update Deadband. See attached image. If it's not this, I shall have to think some more about what else could cause this.
    As for ensuring it works when setting it from DSM...from your screenshot you appear to have a VI that writes to the SV. Change the code ore create a new VI so that it reads the SV and then double check that if you change the value in DSM, the VI also reads back the updated value. It may be that the number changes in DSM but does not update the SV in the VI - this would indicate a problem with the shared variable engine or the deployed variable library...Reboot PC and retry... if the problem persists let me know or attach the SV library!
    Regards,
    Dave
    Senior Software Engineer
    www.Adansor.com
    Attachments:
    SV_deadband.PNG ‏8 KB

  • DSC Saving Shared Variables to Library

    I'm guessing this is a bug (LV/DSC 2009 SP1), but I wanted to see if anyone else had experienced this or had a workaround.
    I'd like to make changes to the logging state of some shared variables programmatically and be able to save the changes. When I use the SharedVariablestoLib.vi function on a simple test library it works. However when I use it on my actual library I get the following (testing vi I'm using is Untitled 2):
    Error Code 1
    Invoke Node in PRC_SVsToLib.vi->PRC_DumpSharedVariables.vi->NI_DSC.lvlibharedVariablesToLib.vi->Untitled 2
    Possible reason(s):
    LabVIEW:  An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
    =========================
    NI-488:  Command requires GPIB Controller to be Controller-In-Charge.
    I think the culprit is that my library has variables organized into virtual folders. Any thoughts?
    Thanks,
    Kyle
    CLD using LV, DSC 8.5-2009, RT 8.5
    Ghoti!

    I can pretty well cause the problem with virtual folders. I have attached the vi I'm using to change the logging state and save the changes as well as the two libraries I used for testing purposes.
    What I did to test:
    -Disabled logging on both variables in both libraries.
    -Saved, undeployed, and redeployed both libraries.
    -Ran my log enabling vi on each library. It ran on Test 2 (no folders) fine. On Test 3 (includes a folder) it threw the same error as above.
    -At this point I tested and both libraries were logging both variables.
    -Looking at the variable properties in the project, both Test 2 variables showed Enable Logging checked. Neither Test 3 variable did.
    -Exited the project. Test 3 had unsaved changes so I saved it.
    -Re-opened the project and examined the variables, both Test 2 variables showed Enable Logging as before. In Test3 the root variable showed Enable Logging but the variable in the folder did not.
    -Undeployed and redeployed both libraries.
    -Confirmed that both Test 2 variables and only the root Test 3 variable were logging.
    CLD using LV, DSC 8.5-2009, RT 8.5
    Ghoti!
    Attachments:
    Programmatic Log Change.vi ‏17 KB
    Test 2 Library.lvlib ‏5 KB
    Test 3 Library.lvlib ‏4 KB

  • Dsc shared variable property are saved to library?

    Hi,
    I would like to be sure to know if the shared variable properties like "alarm level" and "description" are saved to the library directly?
    If not, where? database?
    Also can we not add table to the dsc ms sql express database? (the one for alarms and events)
    Thanks
    Patrick
    Message Edited by paubine on 09-04-2009 08:23 AM

    The properties of the shared variables like alarm and description do get saved to the library. As for your second questions about a table in ms sql, can you tell me more about this? Are you using the LabVIEW DSC VIs to do this, if so provide a screen shot or your code or a good description. Tell me exactly what is going wrong, what behavior you expect and what you are seeing.
    Thanks,
    Anna K.
    National Instruments

  • How to add a new Shared Variable programmatically to an existing and deployed library?

    Hi there!
    I am trying to accomplish this on both LabVIEW 8.6 and LabVIEW 2010 and seems like it's not any different in this situation.
    My case: A project has a library with 4 Shared Variables (SVs). The library and the variables are deployed (visible in Distributed System Manager 8.6/2010). I want to add 2 more variables into this library. It is possible to do this manually from Project Explorer window's options menu. But while running an application it has to be done programmatically. Can I provide the library reference to the one currently existing without creating a new one?
    "Create Or Add Library To Project" function in the Datalogging and Supervisory Control (DSC) toolkit does not help in this case. That function, as the name suggests, just tries to create a new library in the project.
    Two possible methods:
    The function "Add Shared Variable To Library" (DSC>EngineControl>Libraries & Processes) needs a library reference, which could be provided via "CreateOrAddLibraryToProject" function, but this function tries to create a new library, and if I provide the path of the existing library it throws an exception that the library already exists in the project (yes, as I wrote above, I need to add new variables to an existing and deployed library).
    OR
    The function "Create Shared Variable" (DSC>EngineControl>Variables & I/O Servers) will add Shared Variable in a process, and not physically in a library file, and the problem (limitation) with this approach is that it doesn't allow to add complex data type Shared Variables (for example in LabVIEW 8.6 it has only 4 datatype options in input parameter, and even in LV2010 it does not have "Image" datatype that I need).
    The scond method is my preferred method as it allows to work on Online Shared Variables and doesn't create them physically in libraries (and this is good as the variables' scope remains only till the Variable Engine is running). But it doesn't support advanced data types, and the first method is powerful in terms that it supports to virtually any datatype, it just seems tricky to get that reference to the library.
    Any tips?
    Thanks ahead!
    Vaibhav

       <<<<>>>>   
    As the above two images show, while a library does not exist, it is easy to use the "CreateOrAddLibraryToProject.vi" which will add a new library to the project (if it doesn't exist on file system, a new library will be created) and that way, using the reference (the green wire going out from the function and the Case Structure, can be used to add Shared Variables to the library. The problem was what to do when a library already exists in the project, how to add more variables to it. I was looking for a way to get a library reference, and somehow I could not see it inside a Project's property (VI Server functions). Hence I posted the question. And upon continuing my search, I found it on the Application's property list.
    I hope it was useful for someone else as well. And thanks for the replies. Please share a better idea if you have.
    Vaibhav

  • Using Shared Variables and Initialize Front Panel Binding (to PSP)

    Hi,
    I use LV DSC RT 8.2.1
    I have a Vacuum System That includes signals from - Pumps failure, Valves status, Vacuum gauge, start Pump ...
    Each signal is read by a FieldPoint. 
    All the relevant FieldPoint Channels are read by the Server (a computer in the Ethernet Network) and published to the network in the form of Shared Variables.
    I have a client VI that is reading the Shared Variables published by the Server using Front Panel Binding.
    Problem : 
    Some of the Bindings are in the mode 'Write &Read' and that causes some initialization problems.
    For example - Valve #1 is Open, and then a User start running the Client VI, (the Valve #1 Status mode is 'Write & Read")
                           if in the VI the status of Valve #1 is closed (before running it) then the Valve status is changing to Closed.
    I want the Client VI to first read the Physical status of the instrument and then to change the Value if the User changes it.
    But that's seems to be a problem when using Front Panel Binding... (is it?)
    I know I can Deploy a lvlib in the Client Side and Item Bind to the Shared Variables or Use DataSocket.
    (Is DataSocket is a Reliable method when connecting to Shared Variables? What are the disadvantages when using DataSocket?) 
    What is recommended by those of you that are experienced or by NI ?
    Sincerely Yours,
    Amitai Abramson.

    Amitai Abramson,
    Hello and thanks for using the NI Forums.
    I'm glad that you've read the Using the LabVIEW Shared Variable Tutorial on our website. Check out these other resources:
    Network Variable Technical Overview
    Troubleshooting Network-Published Shared Variables
    Why Do I See Unexpected Value Change Events for Shared Variables Using LabVIEW DSC?
    All You Need to Know About Shared Variables
    Creating a Value Change Event for Shared Variables
    Alternative Method for Using Shared Variables Between Systems in LabVIEW 8.x
    What Is The Difference Between Using Shared Variables And DataSocket VIs To Access OPC Tags?
    The issue that you are seeing by having "Write & Read" bound items on both the server and client side is essentially a race condition, you don't know which one is being read/written at what time. To resolve this issue I would take a look at some of the documents below.
    Using a Local, Global, or Shared Variable in Parallel Loops Can Cause Race Conditions
    Using Local and Global Variables Carefully
    Tutorial: Local Variable, Global Variable, and Race Conditions
    Locking a Shared Resource or Variable in LabVIEW Using Semaphores
    You mentioned not wanting to have two sets of shared variables (one on each side), but this is a great method to resovle this issue, that, or you can develope some sort of hand shaking to prevent these race conditions.
    I would suggest that in the future when using these forums you try to ask only one question per thread and make it more concise. It's hard to tackle multiple questions and such broad questions as "I want to know all the ways that I can connect to Shared Variables, and I want to know the advantages and disadvantages." I suggest this because we want you to get your questions answered and more concise questions will result in quicker and better answers. 
    Message Edited by Ben S on 10-01-2009 06:05 PM
    Ben Sisney
    FlexRIO V&V Engineer
    National Instruments

  • What happened to my shared variable DSC alarms?

    I would like to programmatically alter the alarm levels of my shared variables using the recommended datasocket write method, but for some reason my alarm levels disappear.  If I open Variable Monitor, sometimes the alarm data isn't there.  I have them configured, and sometimes they are there.  This also means that the Datasocket URL doesn't exist for the alarm levels.  Why is that?
    Attachments:
    Shared Variable Monitor.JPG ‏94 KB
    Shared Variable Properties.JPG ‏46 KB

    Hi Brian,
    I am not sure what resource pointed you to using Datasocket Write to change the alarm levels of a shared variable programmatically, but that is not the recommended method.
    One resource that you I suggest you check out is the example called Library Generation.lvproj, it is in the example finder under Toolkits and Modules->Datalogging and Supervisory Control->Fundamentals. This shows how to add variables to a library and set the alarms.
    For an existing library, please check out this Knowledgebase article, which describes getting a shared variable reference. One you have the reference, you can use the property "Alarming..." to set Hi, Lo, etc. Then, once you're done, redeploy the library programmatically (Deploy Library.VI).
    Best regards,
    -Sam F, DAQ Marketing Manager
    Learn about measuring temperature
    Learn how to take voltage measurements
    Learn how to measure current

  • Weird delay reading shared variables

    Hello,
    I'm working on a project were I'm monitoring some prodution lines. I'm using DSC module's OPC server to connect to PLCs on the production line and I've created bound variables on my labview project of the PLC's tags.
    On my project I have one main VI were I show information about the production lines and were I can access several subVIs were I show other information about those lines. Then I have a VI that is running in background were I'm reading about 50 shared variables from the PLC and where I'm registering some data in a MySQL database, datalogging data on the Citadel database and registering alarms.
    The problem I'm having is that on the VI that runs in background I noticed a delay reading the variables that are reading containers weights from the production line. It seems that all the other shared variables don't suffer any delay, only the weight variables start having some delay when the values are increasing. It also seems like that, when I'm only running that VI alone, without running the main VI, there isn't any kind of delay. I'm reading the shared variables as shared variable nodes.
    Can anybody help me understand what's happening and how can I fix this delay? The VI that runs in background is time critical and a weird delay like that messes up my data.
    Solved!
    Go to Solution.

    Hi Mateus23,
    The shared variable has various buffering capabilites, including integration with the Real-Time FIFO feature in LabVIEW Real-Time.
    I guess that the buffering settings are causing the unexpected behavior.
    Check these resources:
    Buffered Network-Published Shared Variables (whitepaper)
    Shared Variables Properties Dialog
       - Network Page
       - Real-Time FIFO Page
    ~~

Maybe you are looking for

  • Voice memo app not working

    On the  iphone 5 when I click on the voice memos app it open and closes straight away.  When I have had this issues with other apps I can delete and reinstall them, however this is not possible to do with the voice memo app, does anyone have any idea

  • Asset: Error of Year End Closing and depreciation

    Experts, We are testing a scenerio in Quality Server. System was throwing error " You Can not post to asset in Company Code ABCD, fiscal year 2012". So we performed Fiscal year change "T-Code: AJRW" Now we have created asset in Year 2011, then posted

  • How to upload a video clip to iCloud?

    Hi folks,   I have iCloud setup for all of my computers (mostl MacPro) for iCloud.  Everything wokrs fine but this issue:  iCloud is able to autmomatically sync my photos from my iPhoto and share them with other MacPros; however, it won't load and sy

  • How to Extract & View Archived Accounting Document

    Hi all, My user has posted Diff Excise posting through Transaction code-J1IH, 3 years back. If I display this Excise JV through J1IH and click on Accounting Doc. Button, system shows message u201CDocument is not in database. Search documentu201D then

  • Yet another network problem (SIOCADDRT: No such process)

    After IP address of router in my apartment changed I have troubles with bringing up my network connection. I changed my gateway address and now it fails with: :: Starting Network [BUSY] SIOCADDRT: No such process [FAIL] however $route add <gateway ip