Can't access variables in specific S7-1200 DB's in LabVIEW project

Hi all,
I'm trying to establish a connection between LabVIEW and a Siemens S7-1200 though Ethernet and SIemens OPC Server.
The physical connection is OK (I can ping S7-1200 with no problem).
When I needed to access variables from specifics DB's inside S7-1200 ( I want to access variable DB190,X0.4), I called Siemens support and they said I had to modify the variable's definition when using OPC Scout, from "MX0.4" to "DB190,X0.4", and then it was possible to access this variable.
Same solution (renaming the path) applies to NI OPC Client, I can read and write variables properly.
My problem is that when I try to add variables in LabVIEW Project, I can't find those variables whose address were modified, so I can't access the correct variable in my program.
I tried to change the variable path in Multiple Variable Editor, but it doesn't work either.
Any suggestions on what I can try??

First: Avoid the ODBC/JDBC Bridge if at all possible.
It's the worst JDBC driver I've ever seen. It's buggy
and a great hindrance both to learning and to
producing usefull code.I agree that there might be problems with M$ Access, but there are problems with all databases, including MySQL (e.g., no referential integrity in free download version). It's capable enough for the query the OP is trying to execute.
The problem is with his code, not Access or the bridge driver. He'll go through a lot of effort to switch databases and still have this problem. Better to understand what HE'S done wrong and fix it so he'll do it correctly for all databases, including Access.
You just need to be more careful with your query, I'm sure.
%

Similar Messages

  • I can't access any of my files or even a new blank project

    I'm working with RH 8. I have also installed the critical updates.
    I cannot access any of my RH projects. At first I could access the project I'm currently working on. I could not access any of my other projects.
    So, I reinstalled the critical updates. However, when I reinstalled I only got the window above. I clicked next.
    After i reinstalled I can't access any of my projects, including the one I could access before. I cannot access RH and just create a new project either. Can someone help.
    Thank you.
    I also got the message that my current file was more current than the version of RH. It seems that the update didnt' take.

    Hi there
    Question here. What is your operating system? Windows Vista or 7 maybe?
    I ask because you said your projects were on your C drive. Normally that's excellent and where you want projects to be. But I've found that if I am using Vista and I try to save something to the root ( C:\ ) from some applications, I'm blocked and see issues with the application. So my thought is that if you are attempting to work directly from the root and you are on Vista, that may explain things.
    Normally I suggest folks create a folder named Projects right off the root of C:\ and create a folder inside the Projects folder to house any project.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • JNI-Can't access variables in native methods

    Hello,
    I wrote a simple JNI code in which the native method accesses an instance
    method, prints it and modifies it. The java method is names Sample.java
    and the native method is called Sample.c.
    The problem is I don't seem to get the variables correctly accessed in the
    native code. I am reproducing Sample.java, Sample.c and Sample.h. here. I
    am also reproducing the output.
    Please let me know if there are any mistakes..
    //Sample.java
    public class Sample
    int i;
    public native void modify();
    Sample()
    i = 10;
    System.out.println("In Java: i = "+ i);
    static
    System.loadLibrary("samp");
    public static void main(String [] args)
    Sample s = new Sample();
    s.modify();
    System.out.println("Again in Java: " +s.i);
    //Sample.c
    #include <jni.h>
    #include "Sample.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL Java_Sample_modify(JNIEnv * env, jobject obj)
    jclass cls = (*env)->GetObjectClass(env, obj);
    jfieldID fid;
    jint ci;
    fid = (*env)->GetFieldID(env, cls, "i", "I");
    ci = (*env)->GetIntField(env, cls, fid);
    printf("Accessed in c\n: i = %d\n", ci);
    (*env)->SetIntField(env, cls, fid, 200);
    printf("modified in c\n i = %d\n", ci);
    //Sample.h
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class Sample */
    #ifndef IncludedSample
    #define IncludedSample
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class: Sample
    * Method: modify
    * Signature: ()V
    JNIEXPORT void JNICALL Java_Sample_modify
    (JNIEnv *, jobject);
    #ifdef __cplusplus
    #endif
    #endif
    and the output is
    In Java : i=10
    Accessed in c
    : i=196653
    modified in c
    i=196653
    Again in Java : 10
    Thanks,
    Aditya

    GetFieldID(..) expects an obj variable, not a cls. The
    obj passed in is a reference to the java object you
    are trying to modify, so you need to pass this to
    GetFieldID(..) etc.
    See below:
    JNIEXPORT void JNICALL Java_Sample_modify(JNIEnv *
    env, jobject obj)
    jclass cls = (*env)->GetObjectClass(env, obj); /// NOT
    REQUIRED
    jfieldID fid;
    jint ci;
    fid = (*env)->GetFieldID(env, cls, "i", "I"); // USE
    THE obj PASSED in NOT cls
    ...hope this helps :)Hi
    From what I got I modified the code as
    fid = (*env)->GetFieldID(env, obj, "i", "I");//obj instead of cls
    Well, the program kinda crashed :-(
    Moreover I used the same code I found in the jni tutorials on the sun website..which I reproduce. I noted that they used cls instead of obj.
    #include <stdio.h>
    #include <jni.h>
    #include "FieldAccess.h"
    JNIEXPORT void JNICALL
    Java_FieldAccess_accessFields(JNIEnv *env, jobject obj)
    jclass cls = (*env)->GetObjectClass(env, obj);
    jfieldID fid;
    jstring jstr;
    const char *str;
    jint si;
    printf("In C:\n");
    fid = (*env)->GetStaticFieldID(env, cls, "si", "I");
    if (fid == 0) {
    return;
    si = (*env)->GetStaticIntField(env, cls, fid);
    printf(" FieldAccess.si = %d\n", si);
    (*env)->SetStaticIntField(env, cls, fid, 200);
    fid = (*env)->GetFieldID(env, cls, "s", "Ljava/lang/String;");
    if (fid == 0) {
    return;
    jstr = (*env)->GetObjectField(env, obj, fid);
    str = (*env)->GetStringUTFChars(env, jstr, 0);
    printf(" c.s = \"%s\"\n", str);
    (*env)->ReleaseStringUTFChars(env, jstr, str);
    jstr = (*env)->NewStringUTF(env, "123");
    (*env)->SetObjectField(env, obj, fid, jstr);
    I may not have got your exact message :-(. But something seems to be wrong with yhe code and being a begining jni programmer, I am absolutely clueless:-(
    Any help would be appreciated :-)
    Thanks,
    Aditya

  • Access variables within a timer

    How can I access variables within a timer?
    I mean variables, that I can use in another class that extends applet i.e.?

    The Code can be compiled now with the Java Compiler.
    But the image won't move on the screen.
    import java.applet.*;
    import java.awt.*;
    import java.util.*;
    public class ChangingApplet extends Applet {
      private Image EricsBild;
      private int x,y;
      private TimerTask update;
      public void start() {
      EricsBild = getImage(getCodeBase(), "heuschrecke.gif");
      x=5;y=5;
        update = new TimerTask() {
          public void run() {
            if (x<300) x++;
            if (y<200) y++;
            if (x>3) x--;
            if (y>2) y--;
            repaint();
        Timer t = new Timer(false);
        t.schedule(update, 1000, 1000);
      public void stop() {
        update.cancel();
      public void paint(Graphics g) {
        g.drawImage(EricsBild,x,y,this);
    }

  • Can we access the session scoped variable by simply using its name

    The Java EE 6 Tutorial contains a "Duke's Bookstore Case Study Example”. I could not understand following statements of this case study:
    *bookdetails.xhtml*
    {code}
    <h:outputText value="#{selected.title}"/>
    {code}
    *BookstoreBean.java*
    {code}
    public String details() {
    context()
    .getExternalContext()
    .getSessionMap()
    .put(
    "selected",
    getFeatured());
    return ("bookdetails");
    {code}
    I want to know can we access the session scoped variable in bookdetails.xhtml by simply using its name as done above?

    It is basic Expression Language (EL) functionality, it isn't even specific to JSF. And it isn't specific to the session scope either, you can put beans in any scope (page, request, session, application, flash, conversation, whatever custom scope you create) and reference it using EL by only its name. The thing that you have to take care of is that the bean lives in SOME scope, which can be achieved using JSF specific annotations or configuration files, through CDI or by manually putting the bean in a specific scope through Java code. It's flexible, which is the nature of the Java platform.

  • Can we give UNIQUE ACCESS FOR THE SPECIFIC FILE IN THE LIBRARY in SP2013? How can we remove users from SHARED WITH link where files are shared with users?

    Hi,
    Any help on this?
    Thanks
    srabon

    Hi srabon,
    For giving unique access for a specific file in a library, you can go to the library, and select the file , and click FILES->Shared With->ADVANCED, under PERMISSION ribbon, click ‘Stop Inheriting Permissions’, then the file will have unique permissions.
    For removing the shared users for a file, firstly, like the above steps, select the file , and click FILES->Shared With->ADVANCED , make sure the file has unique access, then select the users that you want to remove, and click Remove User Persmissions
    under PERMISSIONS ribbon.
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • How can I access global variables in a loaded Applescript?

    How can I access global variables in a loaded script, in Xcode, ApplescriptObjC? Basically, I have a global variable defined in my parent script using "property", and I need to modify objects connected to those variables inside of a loaded script.
    Example:
    Parent script:
    script AppDelegate
    property myTextField : missing value
    //linked to a text field object
    tell myScript to myAwesomeHandler_()
    end script
    Loaded script:
    on myAwesomeHandler_()
    myTextField's setStringValue_("The new Xcode is so glitchy ugh")
    //changes value of linked text field of parent script
    end myAwesomeHandler_
    The problem is, the variable is undefined in the Loaded script, and I need it to have the same value as the parent script, and I don't want to pass the variable through the Handler. Any ideas?

    I think want you are looking to do will need to be done in two steps. Because myTextField needs to be a property for the ObjectiveC part of the code you cannot turn it into a global.
    However if you make a temporary variable global assign the string to it in the handler then set myTextField off of it.
    global myTextFieldGlobal
    script AppDelegate 
    property myTextField : missing value 
    //linked to a text field object 
    tell myScript to myAwesomeHandler_() 
    myTextField's setStringValue_(myTextFieldGlobal)
    end script 
    on myAwesomeHandler_() 
    set myTextFieldGlobal to "The new Xcode is so glitchy ugh"
    //changes value of linked text field of parent script 
    end myAwesomeHandler_ 
    I know you stated you did not want the handler to return a value but I have to ask why? Global's, imo, are not a good idea and really should be used as a last resort.
    One other possibility is to pass a reference to the property to the handler. Not sure if that works in AS of if that would satisfy our requirement of not passing the variable through the handler
    <edit>
    Another though have you tried to define the property outside the script?  That is
    property myTextField : missing value
    script AppDelegate
    Not sure if that will work.
    You might also want to have a look at Scope of Properties and Variables Declared in a Script Object

  • How can I access JSP variables from a JavaScript function in a JSP page?

    Respected sir
    How can I access JSP variables from a JavaScript function in a JSP page?
    Thanx

    You may be get some help from the code below.
    <%
        String str="str";
    %>
    <script>
        function accessVar(){
           var varStr='<%=str%>';
           alert(varStr);// here will diplay 'str'
    </script>

  • How can i access and assign java xml Document variable in javascript block

    How can i access and assign org.w3c.dom.Document variable in javascript block
    I tried this xmlDoc = "<%=xmldoc%>";
    it is not working
    plz give me solution.
    thanx
    Vidya

    The solution would only work on MS IE browsers, as other browsers do not support an XML DOM.
    It can be done, but you would be stuck with using the Microsoft broswer. If that is acceptable, I have some example code, and a book recommendation.

  • Firefox can't access a specific web site. WHY?

    "I have already posted that in 10.4 Forum but the problem is in Leopard"
    At home and office I can't access a specific web site with Firefox.
    I have tried everything I was able to: cleared cache, deleted cookies, deleted firefox prefs, flushed DNS, tried to log with IP instead of domain, created a new user account in Mac OS, repaired permissions, but nothing happens!
    The strange thing is I can access the web site trough a proxy. And I don't have a firewall or similar, my Mac is conected directly to the web. And the problem is the same in any browser I use, like Safari or Firefox or Camino.
    Anyone has any idea about what is causing my problem?
    Just in case, the site is demonoid.com.
    PS: Thanks BDAqua to all support on the other thread.

    demonoid.com
    I feel like a dork. Maybe next time I'll read the post better.
    Okay, I went to that site and it works fine for me.
    Apple //GS

  • Firefox can't access a specific web site

    This problem is driving me crazy.
    At home and office I can't access a specific web site.
    I have tried everything I was able to: cleared cache, deleted cookies, deleted firefox prefs, flushed DNS, tried to log with IP instead of domain, created a new user account in Mac OS, repaired permissions, but nothing happens!
    The strange thing is I can access the web site trough a proxy. And I don't have a firewall or similar, my Mac is conected directly to the web. And the problem is the same in any browser I use, like Safari or Firefox.
    Anyone has any idea about what is causing my problem?
    Just in case, the site is demonoid.com and it's running ok in other computers I tested.
    Message was edited by: nikollas

    No proxies, AV, firewalls or anything. The internet cable is pluged into this Mac.
    The problem began 2 weeks ago. When I loaded the page the browser shows status done at the bottom of the window, and at the address bar I see the icon of the web site nd the address but nothing is shown. The source code for that page also is in blank.
    I am now using firefox 3 and still have the problem. Safari is up to date with no enhancers. I uninstall all extensions from Firefox also.
    Hard to believe, hum?

  • I can't access specific websites on my macbookpro and macbookair

    I can't access specific website on my macbookpro and macbookair at home, using he same internet access. I can from my Ipad. Thank you for your help,

    NVM: Found out all I had to do was reboot my Macbook Pro. 

  • Hi All, Can I access Adobe reader internal variables in my pdf? for example location, file size, creator etc.

    Hi All, Can I access Adobe reader internal variables in my pdf? for example location, file size, creator etc. I want to create a hyperlink in my pdf $Location/another.pdf?

    Thanks Gilad.
    let me rephrase my requirement. I have a group of pdf files where one pdf has hyperlinks to the other pdfs
    parent.pdf
    -- child1.pdf
    -- child2.pdf
    when I click on the child hyperlink I want the child.pdf to be displayed in another window/reader
    If I have the hyperlink as file:./child1.pdf it does not work. It needs a complete path.
    So when I create this file in MSWord first, Can I artificially create a placeholder for the directory and append the child.pdf?
    suppose the properties say Location = /tmp/pdfs/
    can I have in the hyperlink something like file:/$Location/child.pdf and when reader is used it substitutes the url
    so I get file:/tmp/pdfs/child.pdf
    Hope I explained this.
    thanks
    -Francis
    OK, let me have a very simple requirement. Can I create a pdf and when I open it
    there is one line that says - This File is in xxx directory.
    where xxx is the directory name where the file is. If I have the file in /tmp then it should say This file is in /tmp directory
    and if I copy it to /other then open it, it should say This file is in /other directory.

  • Why private variables, while still can be accessed by accessor methods

    Agreed it is well defined way of encapsualtion. But i wonder how it works differently. can any one explain . We declare a varibale as private which can be accessed by accessor (set/get) methods which are usually public. so why dont we say vairbkles itself as Private ??
    Pls explain

    Not only that, but imagine the case where you have an api method, getTotal(). Your first iteratation you have something like:
    double gross;
    double net;
    double commission;
    so to get the total you may want gross - commission = net. Thus your method may look like:
    public double getTotal()
    return gross - commission;
    But later on, iteration 2 or so, you find out you need to account for taxes, so now you don't want to break the code, the result should be the same, the NET total. However, you now need to account for taxes:
    public double getTotal()
    return (gross - commission) + tax;
    Without breaking any code and all while maintaining the actual API definition, you have made a public accessor method provide more functionality. All code using the getTotal() method wont break nor has to be recompiled and even better it now takes into account tax.
    Now, there is one "sticky" issue in the above. Because the getTotal() makes direct use of "private" variables, you may not get the "right" tax. In other words, what if there is state and local tax that need to be added? You may have two variables:
    double localTax,stateTax;
    The problem is, do you want your method like this:
    public double getTotal()
    return (gross - commission) + localTax + stateTax;
    Or would it look (and possibly account for future updates) better like so:
    return (gross - commission) + getTax();
    The thing is, what if later on you have additional tax to handle? Sure, you can simply add it to the end, adding it, what ever. But by making a "helper" method of getTax(), you might have on iteration 2:
    private double getTax()
    return localTax + stateTax;
    and in iteration three, you may have:
    private double getTax()
    return localTax + stateTax + salesTax;
    Now, unless you are calling code in an intensive performance needy loop, making a couple of helper method calls won't hurt performance at all, and it will greatly enhance your code quality because you can easily change the implementation of the method(s) used, without affecting the API.

  • Having a global variable which can be accessed by PCUI application?

    Hi there,
    Is it possible for us to have global variables that are available to use by the PCUI application during runtime??
    Thanks,
    Josh

    In the standard code SAP creates singleton classes i.e. only one instance of this class is possible. When you ever you try to create same instance is returned.
    <P>
    Like this you can have all your global variables in this class and can be accessed from other MAC's.
    <P
    In the class you need to have method GET_INSTANCE  as static method which will return the instance and have CONSTRUCTOR method. You need to make sure that same instance is returned. But i am  not sure what will be the code insidde these methods.
    Cheers, Raj

Maybe you are looking for