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

Similar Messages

  • How to add a new Local Variable for DataBase Logging?

    Hello
    I need to add a Local sequence variable to my STEP_RESULT table, i know i need to modify the schema by adding a new column but not sure on what to write in "Expression" to access the value of local variable. 
    Please reply asap, as its a little urgent.
    Regards
    Nitin Goel

    Hi
    you can read this here:
    http://digital.ni.com/public.nsf/allkb/F5ADBC61222343B586256CE00055E6D6?OpenDocument
    Regards
    DianaS

  • How to add a new spotcolor channel in a filter plugin

    How to add a new spotcolor channel in a filter plugin and how to make it aktive?

    Re: An Entity/View Object attributes default values from other view object should help

  • How Can i retain the Shared Variable Values after PC rebooting

    Hi all,
    I am facing a paculiar problem with Shared Variables. I have an application in which shared variables are used for data communication.
    One of the application requirement is to retain the variable values eventhough PC is rebooted or started after crashing. 
    As per the my understanding, the variable values will retain eventhough the PC is rebooted. But here i can observe a paculiar problem like some library variables are retaing the values while some others not. I enabled logging for all the variables.
    I tried many ways. like logging enabled, logging disabled, changing variable names, changing process names etc... But i am not getting a consistent behaviour.
    I hope some you can help me in solving this issue.. "How Can i retain the Shared Variable Values after PC rebooting"
    Thanks and Regards,
    Mir

    Hi Blackperl,
    Thanks for the post and I hope your well. 
    What do you mean by not getting consistent behaviour.. this will all depend on excatly when the crash happens i.e. before the write or after. 
    Surely a better method would be to log the data to a file during the reboot...
    I beleived the value read back
    will be the default value for the shared variable's data type.
    The LabVIEW DSC 8.0 module adds more functionality to the shared variable, including initial values and alarms.
    If you enable an initial value on a shared variable, when the variable
    engine comes back on-line it will default to this value. Setting a bad
    status alarm for the shared variable is also a good way of handling
    this type of event. Additionally, if you are using a LabVIEW Real-Time
    target such as Compact RIO or Compact FieldPoint, it is appropriate to
    consider hosting the shared variable engine on the real-time target.
    These devices have watch-dog capabilities and are typically the
    hardware controlling the critical pieces of an application. Most
    Windows or PC-based targets do not have these fail-safes.
    I guess, if you could explain to me again that would be great. From my point of view, if I have a cRIO and a Windows PC. If the windows PC crashes, the cRIO will still update its shared variables. Then once the PC has started up its own shared variable engine, and the bindings are loaded, it will once again continue to update its copies of the variables.
    Please let me know what you think,
    Kind Regards,
    James.
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!

  • Hi All ,How to add a new  field for MEDRUCK if we havea ZMEDRUCK

    Hi All ,
            How to add a new  field for MEDRUCK if we have a ZMEDRUCK
    Req: If I want to add a new field for the following text editor line :
    IN MAIN WINDOW > TEXT EDITOR> SERCH FOR TOTAL_AMOUNT-->
    In that we will have
    &ekko-waers&    &komkfkwrt&
    (currency)       (numerics)
    Pls send the Code to make these changes .Pls its urgent
    Thanks&Regards.
    Bharat.

    Hi
    If that field which you wants to add is available in one of the structures like EKKO,EKPO then you can add that field just beside the other fields
    If that field is not there in the any of the structures then you can define a variable using define command
    /: DEFINE  &VAR&
    / &VAR&  = <some value>
    or you can write subroutines to fetch the data from outside tables and can use those fields data in the script
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to add entire new row at the top of table in pdf report from c# windows forms using iTextSharp

    Hi for past 3 days i was thinking and breaking my head on how to add entire new at top table created in pdf report from c# windows forms with iTextSharp.
    First: I was able to create/export sql server data in form of table in pdf report from c# windows forms. Given below is the code in c#.
    using System;
    using System.Collections.Generic;
    using System.Configuration;
    using System.Text;
    using System.Data;
    using System.IO;
    using System.Data.SqlClient;
    using System.Windows.Forms;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    namespace DRRS_CSharp
    public partial class frmPDFTechnician : Form
    public frmPDFTechnician()
    InitializeComponent();
    private void btnExport_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer= PdfWriter.GetInstance(doc, new FileStream("Technician22.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(7);
    table.TotalWidth=585f;
    table.LockedWidth = true;
    PdfPTable inner = new PdfPTable(1);
    inner.WidthPercentage = 115;
    PdfPCell celt=new PdfPCell(new Phrase(new Paragraph("Institute/Hospital:AIIMS,NEW DELHI",FontFactory.GetFont("Arial",14,iTextSharp.text.Font.BOLD,BaseColor.BLACK))));
    inner.AddCell(celt);
    Paragraph para = new Paragraph("DCS Clinical Report-Technician wise", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK));
    para.Alignment = iTextSharp.text.Element.TITLE;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(95f, 95f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn=new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select t.technician_id,td.Technician_first_name,td.Technician_middle_name,td.Technician_last_name,t.technician_dob,t.technician_sex,td.technician_type from Techniciandetail td,Technician t where td.technician_id=t.technician_id and td.status=1", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("ID");
    table.AddCell("First Name");
    table.AddCell("Middle Name");
    table.AddCell("Last Name");
    table.AddCell("DOB" );
    table.AddCell("Gender");
    table.AddCell("Designation");
    while (dr.Read())
    table.AddCell(dr[0].ToString());
    table.AddCell(dr[1].ToString());
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString());
    table.AddCell(dr[4].ToString());
    table.AddCell(dr[5].ToString());
    table.AddCell(dr[6].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(inner);
    doc.Add(table);
    doc.Close();
    The code executes well with no problem and get all datas from tables into table in PDF report from c# windows forms.
    But here is my problem how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    As the problem i am facing is my title or Header(DCS Clinical Report-Technician wise) is at top of my image named:logo5.png and not coming to it's center position of my image.
    Second the problem i am facing is how to add new entire row to top of existing table in pdf report from c# windows form using iTextSharp?.
    given in below is the row and it's data . So how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    as you can see how i create my columns in table in pdf report and populate it with sql server data. Given the code below:
    Document doc = new Document(PageSize.A4.Rotate());
    var writer= PdfWriter.GetInstance(doc, new FileStream("Technician22.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(7);
    table.TotalWidth=585f;
    table.LockedWidth = true;
    Paragraph para = new Paragraph("DCS Clinical Report-Technician wise", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK));
    para.Alignment = iTextSharp.text.Element.TITLE;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(95f, 95f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn=new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select t.technician_id,td.Technician_first_name,td.Technician_middle_name,td.Technician_last_name,t.technician_dob,t.technician_sex,td.technician_type from Techniciandetail td,Technician t where td.technician_id=t.technician_id and td.status=1", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("ID");
    table.AddCell("First Name");
    table.AddCell("Middle Name");
    table.AddCell("Last Name");
    table.AddCell("DOB" );
    table.AddCell("Gender");
    table.AddCell("Designation");
    while (dr.Read())
    table.AddCell(dr[0].ToString());
    table.AddCell(dr[1].ToString());
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString());
    table.AddCell(dr[4].ToString());
    table.AddCell(dr[5].ToString());
    table.AddCell(dr[6].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    So my question is how to make my column headers in bold?
    So these are my questions.
    1. how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    2. how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    3.how to make my column headers in bold?
    I know that i have to do some modifications to my code but i dont know how to do it. Can anyone help me please.
    Any help or guidance in solving this problem would be greatly appreciated.
    vishal

    Hi,
    >>1. how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    2. how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    3.how to make my column headers in bold?<<
    I’m sorry for the issue that you are hitting now.
    This itextsharp is third party control, for this issue, I recommended to consult the control provider directly, I think they can give more precise troubleshooting.
    http://sourceforge.net/projects/itextsharp/
    Thanks for your understanding.
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • SQL Server Distributed Partitioning Views how to add a new node online

    We are using distributed partitioning views in SQL Server 2012 Enterprise Edition for scaling out our data across more than one servers. Now we faced to question how to add a new node (server) into the scale outed db servers system without sending the servers
    down, so our users will be able to use them during the process as well.
    For example we have 4 servers with scaled out data. When we add the new empty server, the CHECKINGs for the partitioning columns should be reorganized. But during the process the partitioning views are not working.
    The High Availability, Always On or Failover Cluster approaches seem are not resolve the problems.
    So my question is how to add new node online?
    KH

    Thank you Erland for the reply.
    Yes, it's sounds as possible solution but has some not resolvable nuance in it. Let's say we copied some data from Node5 to new added Node6. Let's assume in Node5 we had data in Table1 with partitioning column's values 100,101,102,103,104,105,106.  Now
    we want to copy part of the rows with partitioning column's values 103,104,105,106 from Node5.Table1 into Node6.Table1. With this Node5 will contain less data and will work more quickly (less IO, less CPU usage etc), and the rest data will be contained on
    Node6. But because of Node5 is already in use, the Node5.Table1 contains CHECK CONSTRAINT = ParttionColumn should be from 100 up to 106. This is check for Node5. The Distributed Partitioning Views are already using the CHECKs to identify what server should
    be used to get data from.
    Now when we copied part of the Node5.Table1 rows to Node6.Table1 the views are still using the 103-106 rows from Node5.Table1 because the CHECK points there. Then we include the newest Node6.Table1 in the distributed partitioning views. OK, but we should
    set some CHECK on new Node6.Table1 which will be used by views. We can't set intersecting checking like Node5 has CHECK 100-106 and Node6 has CHECK 103-106. We also can't edit Node5 check and set it 100-102 untill the data will be removed in it. But this means
    that the data will not be available during the execution. 
    So, any ideas ?
    KH

  • How to add a new payment type

    Hi,
    We need to add a new payment type in Oracle Applications 11i and I could not find the required setup steps. The Form Name is : APXPAWKB
    The user's navigation is as follows:
    Payables super user responsibility->Payments -> Entry ->Payments:Type:
    There is a LOV with Manual, Quick and Refund and we need to add a fourth one as Elses.
    How can we do this?
    Thank You...

    Hi,
    You cannot define a payment type as that is based on a lookup defined under the navigation Setup>lookup>Payables.
    This look up access level is System whihc implies it does not allow user level values to be defined.
    So you have to use the available payment types,
    Thanks
    Manish Jain.

  • How to add a new character set encoding?

    Hello,
    can anybody please explain to me, how to add a new character set encoding to Mac OS Tiger?
    I have two Mac laptops, a new one with Snow Leopard and an older one with Tiger, and on the old one i cannot use or enable anywhere the "Russian (DOS)" character set encoding, which i need to be able to use some old text files.
    On the Snow Leopard, this encoding is present in the list of available encodings of TextWrangler, but not in TIger.
    If i have understood correctly, this is not a problem of TextWrangler, and the same encodings are available systemwide.
    So, the question is: how to add new encodings to Tiger (or to Mac OS in general)?
    Thanks.

    I think possibly that's in the Get Info window of Finder?
    I don't think either that or the input menu have any effect on available encoding choices. Adding languages to system prefs/international/languages can do that, but once you have added Russian there, I don't know of any way to add an additional Russian encoding (there are quite a number of them).

  • How to add a new Element to the Context

    Hello all.
    I created in the wdInit()
    ArrayList datas = new ArrayList();
         for (int i = 0; i < 25; i++) {
              MyData data = new MyData();
              data.setMethods();
              datas.add(data);
         wdContext.nodeMyData().bind(datas);
    Now, I want by clicking on the Button "Create new Element", forward user to the other View, which elements are connected with the same model -> context, the new element should be added to context, the user should fill the form and click Save-Button.
    How can I add a new Element to the Collection I created and choose it as a current element?
    If I do: wdContext.nodeMyData().bind(new MyData()) all information will be lost. And I will have only one field.
    If I do it like this:
    IWDNodeElement dynTabElem=(IWDNodeElement)wdContext.nodeMyData().createElement();
    wdContext.nodeMyData().addElement(dynTabElem);
    I get an error: com.sap.tc.webdynpro.progmodel.context.ContextException: NodeInfo(DataComp.MyData): value node is created without a reference
    Well I can pass to my new View a Collection as a parameter and then
    Collection.add(new MyData()) and then bind it. But I find this solution not good.
    Is there any possibility to get the existing Collection from the Context without passing it to the view?
    Can I just add a new element to the existing collection?
    Thanks in advance.

    Hallo Monalisa,
    I did as you said. But I can't add something to my model class, because it is not collection.
                            MyData data = wdContext.currentBelegElement().modelObject();
                   data.add() ???? - don't work
                   wdContext.nodeMyData().invalidate();

  • How to add a new column (Project Number) in the action items table under NPD Module?

    There are two projects with same name and created by same person in NPD.
    So when it is displayed in "Action Items" table, It looks similar.
    To avoid this, I need one more column (Project Number) to be added in the "Action Items" table and " Strategic briefs and projects" table.
    So, How to add a new column (Project Number) in the "Action Items" table and " Strategic briefs and projects" table under NPD Module?
    Please do the needful.

    There is no out of the box configuration available to add columns to NPD action items.   As always we welcome enhancement requests. 
    Thanks
    Kelly

  • How to add a new field in MM01, with say contaminent  as a field?

    How to add a new field in MM01, with say contaminent  as a field? I process that i know is i has to go the user exit and check out the three user exits that are available for MM01 after that what i have to do please can any one help me out with the procedure to proceed?

    Hai      venkateshwar reddy ,
    try with these user exits
    MGA00001 Material Master (Industry): Checks and Enhancements
    MGA00002 Material Master (Industry): Number Assignment
    MGA00003 Material Master (Industry and Retail): Number Display
    Refer these steps also
    http://sap.ittoolbox.com/groups/technical-functional/sap-r3-dev/screen-exit-on-mm01-mm02-mm03-322717#

  • How to add a new tab for the project?

    Dear All Experts,
        Could you tell me how to add a new tab for the project?
        Pls refer to the screenshot as below:
    Thanks!
    Xinling Zhang

    Hi,
        The new tab in cj20n , and the new tab can only be displayed in the highed level.Pls refer to below
        And in cj02, there is no this tab also in the wbs detailed screen,
    Thanks!
    Xinling

  • Urgent - How to add a new control instead of tabs in JTabbedPane

    Hi,
    Please give me an idea or a sample program for how to add a new control
    in JTabbedpane instead of tabs that means overlay any Java controls or pane
    in the tabpane empty place next to tabs

    "Urgent" is not relevant to the question. Your question is no more important than anybody elses.
    My answer in this posting show a limited solution:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=636289
    Otherwise I suggest you try using a layered pane approach:
    http://java.sun.com/docs/books/tutorial/uiswing/components/layeredpane.html

  • How to add a new data element for existing table filed(Primary key field)

    Hi Experts,
    How to add a new data element for existing table field(Primary key field)
    For this filed ther is no foreign key relation ships and even check table.
    while activating table it is giving message like below.
    can you help any one to solve this and wil steps to add new dataelement for existing primary key filed of a table.
    Check table (NAMING SPACE/TABLE NAME(EX:/TC/VENDOR)) (username/19.02.10/03:29)           
    Primary key change not permitted for value table /TC/VENDOR
    Check on table  /TC/VENDOR resulted in errors              
    Thanks
    Ravi

    Hi,
    Easiest way is to download the table eg into an Excel table (if possible) or text table. Drop the table from the database. Build your table with the new key field. Build the database table again and fill it.
    You can do it also over the database into a new table. Drop the old one. Build the enhanced one and fill it. Afterwards drop your (temporary) table.
    Maybe there are other ways, but this works.
    Success,
    Rob

Maybe you are looking for

  • FireWire no longer works after 10.4.8 update

    I used the Software update (after repairing disk permissions) and without any USB/FireWire units connected to my PowerBook G4 17". The update seemed to work fine until I connected my LaCie FireWire disks. The disks powers up, but they won't mount in

  • Premiere Pro CS5.5 Mac - Major Metadata Problems

    Hi... I am having major problems with the Metadata system in Premiere Pro CS5.5 I have created a custom scheme and added the following property "Key" and set it to have a boolean value (Check Mark) My Metadata display correctly displays the "Key" pro

  • Changing battery  symbol to percent and playing with Jambox

    Hi, Two questions: 1. Can I change the battery icon on top of my iPod touch 4g from battery symbol to one with percent like I have on my iPad 2? 2. Does playing music with Jambox will drain my iPod battery more quickly the iPod earphones? Thanks, Amn

  • Overheating? (Causing major system slowdown)

    The laptop stands on a wooden table, with constant new air coming in from the open windows in the room. It reaches 95° celcius and 6205 fan rpm while running some games.... It's extremely annoying because it makes the game unplayable. I get 5 fps whe

  • User exit to prevent delivery while creating (VL01N).

    Hi Experts, Is there any User Exit, While creating Outbound Delivery with reference to Sales order using VL01N,subitem cannot be created without the related H.Level item.  So my requirement is: Check Higher Level Item (VBAP-UEPOS), If Higher Level It