Problems reading from bound shared variable

I have a shared variable that is bound to another shared variable.  When I go to read it's value in a VI by wiring the variable to the "value" property of a digital numeric object it displays zero.  When i look at the two shared variable in the variable manager they show the correct values.  Does anyone have a clue what's going on?

Welcome to the forums!
Let's narrow down the possibilities here.  Try wiring the shared
variable directly to a front panel indicator rather than using a
property node.  Second, the shared variable object includes an
error out terminal - this is where the variable engine can report any
errors in obtaining a value from the bound item.  Wire the error
out to an error handler VI and re-run - you may find that the Shared
Variable Engine is reporting an error, which would be most helpful in
determining the problem. 
If you could let me know the results of the above suggestions, I'll be glad to help further!
Cheers,
Matt Pollock
National Instruments

Similar Messages

  • Problema di polimorfismo con Read/Write delle Shared variable

    Salve,
    Cercando di modificare l'esempio di progetto "Shared Variable Client/Server" in un progetto dove sono i diversi client a mandare dati al Server ( ovvero l'esatto contrario di quello che fa )
    mi sono inbattuto nel problema illustrato nelle due figure che seguono.
    Ovvero, sostituendo "Writable PSP Variable" ad "Readable" nella scheda "Connect"(FIGURA 1) mi da un errore nella scheda "Read/Write" (FIGURA 2), ovviamente anche qui ho sostituito a "Read Variable" un "Write Variable".
    Mentre utilizzando il Data Socket funziona, ma non mi sono chiari i vantaggi e gli svantaggi nell'utilizzare quest'approccio.
    Qual'è la strada migliore tra Shared Variable e Data Socket per creare un sistema Client/Server così costituito, ovvero con un cospicuo numero di client da servire ( destinato a crescere  )che mandano simultaneamente un discreto quantitativo di dati ( circa quelli di una seriale a 115200bps ) ad un server
    FIGURA 1 
    IMMAGINE 2

    Translation 
    Hi,
    Trying
    to modify the sample project "Shared Variable Client / Server" in a
    project where different clients to send data to the server (ie the
    exact opposite of what it does)
    I untapped in the problem illustrated in the two figures that follow.
    That
    is, replacing "Writable PSP Variable" to "readable" in "Connect"
    (Figure 1) gives me an error in "Read / Write" (FIGURE 2), and of
    course here I replaced "Read Variable" a "Write Variable.
    While using the Data Socket works, but I have clear advantages and disadvantages of using this approach.
    What
    is the best route between Shared Variable and Data Socket to create a
    client / server system so constituted, or with a large number of
    customers to serve (to grow) that simultaneously sends a fair amount of
    data (approximately those of a serial to 115200bps) to a server
    The images points to a gmail location. It is not properly attached.

  • SAP BI - OLAP variable in DTP unable to read from input ready variable in query

    Hello,
    Here's the problem:
    We have a process chain which is launched in a WAD.
    We would like to filter the DTPs in the PC with the values entered in the variable screen of the WAD
    I created a variable of type customer exit X which reads the input ready variable Y in CMOD.
    Customer exit variable X was placed in the filter of the DTP.
    The input ready variable Y in the query contained in the WAD.
    I am getting an error that customer exit variable X is getting not value.
    Is it possible to read an input ready variable in a customer exit variable placed in a DTP?
    Or am I missing a step here?
    Please help.
    Thanks in advance

    Hi Anjalee,
    Maybe it would be good to share a bit more information on your scenario and the chosen solution design. I am currently missing the point of triggering a Process Chain using Web Application Designer.
    Anyway, I recommend to be careful with using OLAP variables in DTP filters. For sure not all functionality is present, e.g. because the variable pop-up is absent. Your constellation of an input ready variable and a customer-exit variable will only work in the context of a BEx Query and probably not if used in a DTP filter.
    Best regards,
    Sander

  • Problems reading from a file

    Hey,
    I have this file that I need to read so i can handle the contents. It was created in MSDOS and as I have very little experience in that topic, I wondered if anyone can point me in the right direction. I tried reading it as a ascii and binary file but neither work, I'm really just guessing though.
    The file has no extension. Hence I can't upload it to the forum. Its made up of mostly meaningless strings of characters.
    Any help is appreciated,
    Regards,
    Rkll

    Rkll wrote:
    Ya you're exactly right, its parsing the data that is the problem. I have done what you said and attached it as a .txt file. My inital thought was that it was a collection of binary digits but I was unable to read them with the built in Labview read binary file VI. Although maybe I had a setting wrong or something.
    This has nothing to do with the Read From Binary File VI, or any setting. That functions does not magically know the format of a file, just like any binary file read for any other programming language. Thus, you have to tell it how to interpret the data. You can tell it to read the file as a series of bytes, and it will dutifully return to you an array of U8 integers. Or, you tell it to read it as a series of 16-bit integers and it will dutifully return to you an array of I16. It will give you what you tell it to give you. 
    Looking at the file I can see some header information, though it's not clear what all the spaces are being used for. I can't tell whether they're padding for a section, or what. As I noted, do you have any idea as to the format of the file?  You said you're updating an old computer system. Any documentation?

  • Multiple serial ports reading from a shared USB port

    I have a program that reads from 4 flow controllers, which send data through RS232 serial ports. Because the computer is located pretty far away, the vendor suggested to use an Edgeport box to convert RS232 to USB, then convert to ethernet port using a SuperBooster converter. The signal travels long distance in ethernet cable to the computer and get converted back to USB, then to the computer. In MAX, I was able to see 8 com ports from the Edgeport box, and I was able to communicate with my flow controllers.
    The problem is, it will give me some error message occasionally. Sometime it's a VISA Read error, sometime it's a VISA framing error. Could this be caused by the way the signal is transmitted?
    In the program I have four parallel WHILE loops that constantly do READ and WRITE to the 4 flow controllers. Could this be causing the errors? If so, what is the best strategy to design this program?
    Thanks

    I agree with Mike, you will need an error handling strategy that accounts for these errors.  And retries the communications.  This can be a little tricky, but very doable.  I believe some sort of statemachine approach will work best for this. 
    As for your heated probe.  I would make some sort of hardware interlock that will shut it down in case of a coolant failure.  NEVER, EVER trust the computer to be running where safety is concerned, either for personal or hardware.  There are plenty of ICs that can monitor temperature, and have warning, and alarm outputs!  Another option is some sort of watchdog on the communications bus for the coolant control, but I think this is a bit more tricky. 
    Paul <--Always Learning!!!
    sense and simplicity.
    Browse my sample VIs?

  • Datasocket read stop but shared variable can update

    Hello ,
    I program with datasocket open/read, sometimes the read stops and after some time,maybe 10s, it go on reading, I compare this with shared variable (DSC) and found
    the shared variable can update ,I don't know what happen to my program.
    ( the reason I'd like to use datasocket is that I need to change the ULR dynamically , I have many OPC tags to read ( 100 PLCs time 80 tags per PLC )  )
    thanks for your help!  
    Solved!
    Go to Solution.
    Attachments:
    shared variable VS datasocket.jpg ‏23 KB
    shared variable VS datasocket.vi ‏17 KB

    Hi~
    The read function waits for items to be updated, and 10ms is the default time for this waiting. Setting wait for updated value to false will probably solve this issue.
    PS: URLs of variables could be changed programmatically, see this document if you like.
    Good day

  • Problem reading from xml

    So this is the thing: I have a regular xml file I want to
    read from flash, locally it works as it should, when I upload it
    things go wrong. Nothing seems to happen.
    If I use the safari activity window it shows me the xml file
    is either "forbidden" or "method not allowed". I already changed
    the permissions on all the files, still nada...
    I have no clue as to why is this happening, I'm leaving a
    copy of all the files here
    http://www.aquigorka.com/files.zip,
    but I said locally it works, the problem is online. If any of you
    have any ideas to figure out what's happening I'd appreciatte it.
    Cheers
    Gorka

    Let me clear a few things:
    It works offline as it should:
    A flash movie calls a static method from a class to bring
    data from a database.
    Usually I don't read from xml, I read from php (that is whay
    I need the sendandload method), but to debug I transformed the php
    into xml because I couldn't figure out what was causing the
    problem.
    So far, I think the problem is the sendandload method: if I
    change the method to just load it works fine (offline and online),
    if I turn it back to sendandload it just won't work online (offline
    it works smoothly).
    I know the onLoad action is being triggerred as it should,
    but the xml object is empty (why?), I'll try and see if the
    security settings have something to do with this.
    Any other suggestions will be appreciated.
    Thanks for the help so far, but I haven't found the answer
    yet.
    Cheers
    Gorka

  • Problem reading ' from XML uisng SAX Parser

    Hi All,
    I have a XML which contains the following element
    <DataText>This is simple ' Text</DataText>I have included & apos ; in the element called DataText.
    When parsing the element, am getting only the text that appears before & apos ;
    When Not including & apos ; am able to get the full text from this element.
    I observed that in the method characters(char buf[], int offset, int len)
    Thelen attribute shows the total length from start position to the position where & apos ; starts...
    How can i get the whole text which includes even " & apos ; "
    Thanks
    Note : while posting this request, & apos; is being formatted to ' . thats the reason included space between them

    HI,
    Was not doing much in the characters method, anyway here is the code
    public void characters(char buf[], int offset, int len) throws SAXException{
        elementText  = new String(buf, offset, len).trim();
    }The value for len is from the start position of the element value and the start position of the ' & apos; ' in the XML File...
    If i remove the ' & apos; ' in the element value , then the len is the full character length in between the element.
    Very confused why this is happening !!
    Did anyone face this problem ever before ?

  • Problem reading from file

    Hi,
    im bit new to java and i am having this problem. I have a Hashtable of 42000 keys and each value points to an object (vector of arrays). I am storing this hashtable to a file using ObjectOutputStream. the file size is 25 mb. no problem till this point.
    I am using ObjectInputStream for reading this object from the file. file is loaded successfully but it takes too much time (1 min to load 25mb file). is there a way to improve the function so it wont take that much time. here is my read function
    try{  
    FileInputStream f_in = new FileInputStream ("data.dat");
    ObjectInputStream obj_in = new ObjectInputStream (f_in);
    Object obj = obj_in.readObject (); // here is the problem. obj_in.readObject() takes 1 min to load
    if(obj instanceof java.util.Hashtable){
    Hashtable idx1 = new Hashtable();
    idx1 = (Hashtable) obj;
    return idx1;
    else{
    System.out.println("loading failed!");
    catch (Exception e)
    System.out.println (e.toString ());
    }

    it still taking that much time.
    the problem is here
    Object obj = obj_in.readObject ();
    Are you saying you do not gain any time at all using a buffered stream?
    In any case, there is no way (I know of) to improve the execution time of deserialization itself. What needs to happen, i.e. reading a lot of bytes from a file + re-constructing a lot of objects, needs to happen. Often disk access will turn out to be a bottleneck; using a buffered stream to the file can improve the speed of this part. But the object reconstruction can not be improved. You could profile your application to find out where exactly the bottleneck is, but I don't see how you can speed it up even if you do know if it's disk access or reconstruction.
    If there is a way to speed up the reconstruction process during deserialization, I'd be very interested to know how, actually.
    If the runtime is simply unacceptable for your requirements, you might consider looking into using something else then Java serialization to write/read your data.

  • Problem reading from the screen of Adobe Reader XI

    Hi,
    Since I installed Adobe Reader XI, I cannot no more reading the documents from the screen.  Here is what I see:
    I get this message from Adobe:
    I'm following the above instruction I don't see any such option as "Enable Protected Mode". 
    I'm not sure even if this is the cause of the above problem.
    Please help,
    Chanan

    Your top image seems to indicate you may have a computer virus on your system. I highly recommend you run a virus checking program on your computer, download the latest virus definitions and hope that they can remove the infection.

  • Problem reading from file, please help me.

    i have a file named test.txt like this.
    12 321
    13 321321
    11 421
    10 421
    1 4253
    6 3214
    3 4214
    1 46543
    4 5435
    5 54353
    1 5435
    3 7654
    im trying to write a class that has a method which returns a String[12][2] .
    The String should be like this:
    String[0][0] = 12
    String[0][1] = 321
    String[1][0] = 13
    String[1][1] = 321321
    here is my class
    import java.io.*;
    public class Reader{
         public Reader (){
         public String[][] readfromFile ()     {     
              int nreg = 12;
              int i=0;
              int j=0;
              int quebra = '\n';
              int ent=0;
              BufferedReader reader;         
              String[][] saida = new String[12][2];
              char[] cod = new char[5];
              char[] cod1 = new char[5];
              try     {     
                   FileReader file = new FileReader("test.txt");
                   reader = new BufferedReader(file);
                   while (i<nreg) {
                        while(ent != ' ') {
                             ent = reader.read();
                                cod[j] = (char) ent;
                             j++;
                        saida[0]=String.valueOf(cod) ;
                        while (ent != quebra) {
                             ent = reader.read();
                             cod1[j] = (char) ent;
                             j++;
                        saida[i][1]=String.valueOf(cod1) ;
                   i++;
              catch (IOException ioe)     {                 
                   System.out.println ("I/O Exception occurred!");      
         return saida;
    Im getting problem with while and dont know how to deal to make my program runs fine.
    My static void method is in another class
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.io.*;
    public class exe2{
         public static void main(String args[]){
              String[][] saida = new String[12][2];
              try {
                   Reader teste = new Reader();
                   saida = teste.readfromFile();
              catch(Exception e){
                   System.out.print(e.toString());
              for (int i=0;i<12;i++)
                   System.out.println(saida[0]);                
    Any help is really apreciated

    I have modified this class, but i still have problems
    import java.io.*;
    public class Reader{
         public Reader (){
         public String[][] readfromFile ()     {     
              int nreg = 12;
              int i=0;
              int j=0;
              int quebra = '\n';
              int ent=0;
              BufferedReader reader;         
              String[][] saida = new String[12][2];
              char[] cod = new char[10];
              char[] cod1 = new char[15];
              try     {     
                   FileReader file = new FileReader("test.txt");
                   reader = new BufferedReader(file);
                   while (i<nreg) {
                        j=0;
                        while(ent != ' ') {
                             ent = reader.read();
                                cod[j] = (char) ent;
                             j++;
                        saida[0]=String.valueOf(cod) ;
                        j=0;
                        while (ent != quebra) {
                             ent = reader.read();
                             cod1[j] = (char) ent;
                             j++;
                        saida[i][1]=String.valueOf(cod1) ;
                   i++;
              catch (IOException ioe)     {                 
                   System.out.println ("I/O Exception occurred!");      
         return saida;
    I see that there is a problem with cod1 because when i run this class
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.io.*;
    public class exe2{
         public static void main(String args[]){
              String[][] saida = new String[12][2];
              try {
                   Reader teste = new Reader();
                   saida = teste.readfromFile();
              catch(Exception e){
                   System.out.print(e.toString());
              for (int i=0;i<12;i++)
                   System.out.println(saida[0]);                
    I hava an arrayoutofbound exception 15 and displays null null null ....
    any hint?

  • SocketChannel problems reading from a non-blocking channel

    why when I read a "big" message from the channel (SocketChannel.read(ByteBuffer)) I receive it cutted in more parts?

    up

  • Timeout Problems reading from Agilent 53151A Counter

    Hello again:
    I'm having a problem programming the Agilent 53151A counter. For some reason, the timeout error (code -1073807339) would always pop up at the end of the VI execution. The error occurs in the VISA Read part of the VI. I've placed a 20 second timeout in the VI, but I'm still having trouble reading it.
    I find it incredibly frustrating because the same VI was working well a couple days ago. Now I can't get the thing to read.
    It's not a communications problem because it says on the counter that it's being controlled remotely (which is through the GPIB).
    I've attached a copy of the VI if you want to see the problem.
    Attachments:
    53131ReadFrequency.vi ‏80 KB

    There's a couple of things you might want to try. First, I would take out the VISA Clear before you run it every time. The clear operation may not be complete by the time you issue the measurement command so the instrument might not be receiving it and you'd have nothing to read back - causing the read timeout. The other thing is the triggering status of the counter. If its set to trigger on some level and the signal's not there, you might not get anything back. There is also a driver for the instrument available. You can find it here. It uses the traditional GPIB commands instead of VISA but it's pretty easy to modify.

  • Problems reading from / writing to files in C on XCode 3

    Hi all,
    I'm a newcomer to C, having been learning for about a week and a half. All going well so far.
    I'm working through Dave Mark's 'Learn C on the Macintosh' e-book, and am up to Chapter 10, 'Working with Files.' Herein lies the problem.
    I can't get any of the file-related commands to work. The most basic, it seems, is 'fopen()'. There's a very simple demo program which is supposed to open an accompanying file ("My Data File.txt") which is in there with main.c and so on. Nothing happens, though. I've tried it with a 'w' mode parameter which should create the file if it doesn't already exist, but Spotlight can't find it if it is indeed being made.
    I'm using a fairly vanilla install of XCode 3, so I shouldn't have messed up the settings anywhere along the way. I've tried all of the different path types in the 'Get Info' dialogs, but still nothing.
    I guess that it's something very basic that I've missed or not understood. If any of you could take the time to help me out, it'd be much appreciated.
    If there's any further information you need, please just let me know.
    Many thanks,
    Pete.

    Ok I'm new to c programming and xcode and I have this same problem but the suggestions have not remedied my problem. I get this warning:
    "warning: no rule to process file '$(PROJECT_DIR)/operations.txt' of type text for architecture i386"
    This is my code
    #include <stdio.h>
    #include <math.h>
    int main()
    char filename[128],fvalue1[128];
    int x=0;
    FILE *input;
    printf("Enter name of file: ");
    fgets(filename,128,stdin);
    if((input = fopen(filename,"r"))==NULL)
    printf("Failed to open file.\n");
    x=1;
    if(x!=1)
    fgets(fvalue1,128,input);
    fclose(input);
    fflush(stdin);
    printf("\n\nPress enter to continue...");
    getchar();
    return(0);
    I think its a setting but I dont know what else to try.
    Any further input on this would be greatly appreciated. thanx

  • Deploying Shared Variables to Remote Target?

    I have a 2-application server/client setup where my client(s) merely read information "published" by the server via a Network-Shared Shared Variable.  If I run my server on a "clean machine" (i.e. no LabVIEW development) and I "publish" the shared variable library (via the "Library : Deploy Library" Application method) to the localhost, I have no problems whatsoever reading the data in the client (the path of the .lvlib file provided to the Invoke Method VI is an absolute path to the .lvlib file, BTW).  However, I'm having a bear of a time getting the server to deploy the library to a machine running a second client on the same network - to do this I still use the same absolute path to my .lvlib file for the first input to the method (it's in the same place on the target as well as on the host, not that I know what this means for a targeted host) and I specify the IP Address of the target machine on the second input.  There is no firewall on either machine (I removed it because I was getting nowhere and needed to eliminate a possible source of problems) and my router doesn't filter traffic going across the local subnet.  Am I not using the programmatic publishing correctly to publish to another target (from within the server), or can anyone point out any problems in my usage?
    By the way, if I publish to the local host (127.0.0.1 or the host machine's IP address) I do not get an error out of the "Invoke Node" VI.  However, when I try to publish to a network target (both machines have the Variable Manager running and both machines work fine if both server and client are on the same machine) I get error code 1 and the message:  "Invoke Node in MyServer.vi<APPEND> Method Name: <b>Library : Deploy Library</b>" which is anything but helpful. 
    Any help would be greatly appreciated!
    -Danny

    Hi Arun,
    I hope you're doing well.  I'd like to clarify the architecture that you are actually using.  It sounds like you are deploying a network-published shared variable library on two seperate host PCs.  You are then attempting to read data from both of these hosts from a RT target using the Datasocket VIs.  The RT target seems to be reading from the shared variables from one of the hosts just fine, but you can't read from the other host.  Are both hosts deploying their libraries in an executable as mentioned in previous posts, or is the deployment process done through the LabVIEW development system?  Also, when you connect to the hosts using Datasocket, how are you entering in the addresses for each item?  Lastly, it might help to know whether you have LabVIEW and LabVIEW Real-Time versions 8.0 or 8.0.1.  If you could provide some more information on your set up, we can try to give some suggestions.  Thanks!
    Thaison V
    Applications Engineer
    National Instruments

Maybe you are looking for