Error codes for shared variables in Labview 8.5?

I am trying to use Shared Variables in Labview 8.5 to enable real-time loops (similar to some of the examples in "Using the LabVIEW Shared Variable", published Aug 28, 2007).  I created it to hold the result of a 16-channel A/D converter (so a 16-element I16 array).  To avoid losing samples, I used buffering, with a buffer of 5.  To test this, I made a pair of VIs, one a producer that stuffs a 16-element I16 array into the shared variable "every so often" (controlled by a timed loop), and a consumer loop that reads the shared variable and does something with the data.
If I think of the buffered shared variable as a Real Time FIFO (as the article suggests it is), I was curious how I would know (a) when the queue was empty, and (b) if the queue had overflowed.  Both are necessary if this is to be a practical means of exchanging data -- you want the producer and consumer to run more-or-less at the same rate, but only the producer is deterministic.  The consumer needs to be able to run "faster" if it falls behind (for example, because it is writing data to disk), but you don't want it to read data from the shared variable if there's nothing there.  [One can always read a shared variable, after all -- as the article states, it simply "holds" the last value written to it].
Snooping around, I discovered that there are "error codes" associated with the shared variable.  In particular, a code of -2220 (FFFFF754) seems to signify an empty queue (or a shared variable that has not yet been written to), while a code of -1950678981 (8BBB003B) appears to be "buffer overflow".
Is this documented anywhere?  Are there other "error codes" that would be helpful to know?  Is there some rationale to these seemingly-random numbers?  [It would help to develop code to utilize shared variables if there was a bit less "magic" and "mystery" involved].
For what it is worth, with a buffer of size 40, I could generate 16 I16 values at 1 KHz (simulating sampling from a 16-channel A/D at 1 KHz) and pass it to a consumer node that (a) read from the shared variable until it was empty, then (b) "went to sleep" for 20 msec (simulating "doing something else non-deterministically"), and not miss any data (because I could then empty the Shared Variable RT-FIFO, which should have been half full, before it overflowed on me).  Not bad throughput -- I bet I could push it even higher.
Bob Schor

Hey Bob,
The errors are documented in the LabVIEW help:
Shared Variable Error Codes
Real-Time Shared Variable Error Codes
There are several error messages for buffer underflow/overflow depending on the settings of the network or RT FIFO buffers. In particular the -2220 and -2221 are useful for the producer/consumer use case. For example (as you probably know) the consumer can flush a variable using the error code (see the attached image).
Gerardo
Attachments:
variable1.png ‏3 KB

Similar Messages

  • Support for Shared Variables in Third Party XP embedded based TPC's?

    I have deployed an application in an XP embedded based Touch Panel (Third party). The application is working fine, but the shared variables hosted on an RT (sbRIO Board) are not getting updated in the application on TPC
    1. The TPC is part of the project as Windows XP Embedded Touch Panel
    2. NI TPC Service has been installed on the TPC and the application can be deployed remotely from the development PC through ethernet. (Hence network connections and communications are OK)
    3. By using Distributed Systems Manager in the development computer, I can see that the shared variables are getting updated on the network
    I believe that the problem can be solved if the following programs are installed on the TPC
    A. Support for shared variables for XPembedded
    B. Shared Variable engine
    I have tried installing support for shared variables from Program Files > National Instruments > Labview 8.6 > PDA > Utilities > Variables > x86 - but am getting an installation error "Unable to find application manager for Pocket PC applications".
    Shared variable engine has been installed from ve220 folder. The program is getting installed. But the Variable Engine is not started Control Panel > Administrative tools > Services in Xpe, the service is stopped and cannot be started. When I try to start the service, I am getting the following error on TPC
    "Could not start the National Instruments Variable Engine Service on the local computer.
    Error 1053. The service did not respond to the start or control request in a timely fashion."
    Please suggest solutions for the above or alternate locations for the following:
    1. Support for shared variables for XP embedded TPC's
    2. Shared Variable engine installer program.
    Thanks
    Krish
    Solved!
    Go to Solution.

    Problem solved!
    Update for interested folks working on XP Embedded TPC's
    Just to make sure that Shared Variables were indeed accessible to the TPC, I wanted to install Distributed Systems Manager 8.6 on the TPC. However since the TPC was having only 1 GB of DOM (Disk on Memory) and with all the software I had tried, there were only a few Megabytes left on the system. I had to add another DOM of 2 GB.
    All the products of the Installation went fine, with the exception of NI Logos (Version 5.0). NI Logos installation failed repeatedly.  I tried installing NI Logos separately, with the same results. Then I had this gut feeling that NI Logos had something to do with the issue.
    I then downloaded the new version of NI DSM 2009 SP1. Although this was supposed to get installed on any fresh system without Labview, the installation would not proceed beyond the setup stage. I tried installing NI Logos from the products folder on the new download separately and it worked like magic!
    Once the new Logos (Ver 5.5) got installed, the Shared Variable Engine started automatically and the Shared Variables were finally unleashed - free to rise and shine! Thank God Almighty!!
    On the lighter side, come to think of it - for running an application of around 400KB, we need XP embedded, NI Run Time, Logos, DSM ..........  (all around 900MB). Can we make it any simpler?!!  Inviting your comments .......
    Thanks
    Krish

  • Same error code for two different errors

    I have a simple state machine with a few states, two of which are read ini file and read GPIB data. I also have an error handling state where I would like to handle all errors. Errors are checked for on each iteration of the loop, passed by shift register. However, I can't just unbundle the error cluster and wire the error code to a case structure because if the ini file doesn't exist (error code 7) I want to exit the program. But if I get error 7 from the gpib (Nonexistent GPIB interface) I want the program to continue running. What is the best way to track where the error is coming from so I know how to handle it when two error codes for different errors have the same error code value?
    Message Edited by for(imstuck) on 01-27-2010 03:47 PM
    CLA, LabVIEW Versions 2010-2013

    Another option is to check the existence of the file before opening the config file, then exit the program if nessecary. Relying on error codes might be a bad option.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Capturing oracle error codes into a variable

    Hi
    Can someone show me how it is possible to save an Oracle defined error code into a variable? What I am trying to do is when a stored procedure fails an Oracle error is raised, such as ORA-xxxx, then pass this code into variable to be saved into a log.
    How do I achieve this?

    user633278 wrote:
    How do I achieve this?Function SQLCODE in PL/SQL exception handler returns error code. SQLERRM returns message:
    SQL> declare
      2      x number;
      3  begin
      4      x := 1/0;
      5    exception
      6      when others
      7        then
      8          dbms_output.put_line('Error code: ' || SQLCODE);
      9          dbms_output.put_line('Error message: ' || SQLERRM);
    10  end;
    11  /
    Error code: -1476
    Error message: ORA-01476: divisor is equal to zero
    PL/SQL procedure successfully completed.
    SQL> SY.

  • Unable to debug/correct the CMOD code for a variable used in a query

    unable to debug/correct the CMOD code for a variable used in a query
    i am using the data in a DSO in a query and using a custom coding variable in that query , but this data not coming in that query ..
    can anyone suggest how to debug that cmod code for the variable?
    code is written in CMOD tocde for the variable.

    belowis the code that i have written for a custom coding for a variable
    *******Start***
    IF i_step = 2.
      CASE i_vnam.
        WHEN 'IC_COMPCD'.
         TYPES:       BEGIN OF gt_itab_DyAuthTable,
                           username  TYPE /bic/afiop_o1200-/BIC/IC_USER,
                           companycode TYPE /bic/afiop_o1200-COMP_CODE,
                      END OF gt_itab_DyAuthTable,
                      BEGIN OF gt_itab_Cocd_all,
                            companycode TYPE /BI0/MCOMP_CODE-COMP_CODE,
                      END OF gt_itab_Cocd_all.
          DATA: gi_itab_DyAuthTable TYPE STANDARD TABLE OF gt_itab_DyAuthTable,
                wa_itab_DyAuthTable TYPE gt_itab_DyAuthTable.
           DATA: gi_itab_Cocd_all TYPE STANDARD TABLE OF gt_itab_Cocd_all,
                wa_itab_Cocd_all TYPE gt_itab_Cocd_all.
          SELECT /BIC/IC_USER
                 COMP_CODE FROM /bic/afiop_o1200
            INTO CORRESPONDING FIELDS OF TABLE gi_itab_DyAuthTable
            WHERE /bic/ic_user = sy-uname.
          LOOP AT gi_itab_DyAuthTable INTO wa_itab_DyAuthTable.
            IF wa_itab_DyAuthTable-companycode EQ '*'
              OR
              wa_itab_DyAuthTable-companycode EQ ' '.
              SELECT COMP_CODE FROM /BI0/MCOMP_CODE
                  INTO CORRESPONDING FIELDS OF TABLE gi_itab_Cocd_all.
              LOOP AT gi_itab_Cocd_all INTO wa_itab_Cocd_all.
                l_s_range-low    = wa_itab_Cocd_all-companycode.
                l_s_range-sign   = 'I'.
                l_s_range-opt    = 'EQ'.
                APPEND l_s_range TO e_t_range.
              ENDLOOP.
          to exit the loop if any one value is */space/all for a user's compcode values
            EXIT.
            ENDIF.
          ENDLOOP.
           if control is here means, the comp codes values didnt have */space
              LOOP AT gi_itab_DyAuthTable INTO wa_itab_DyAuthTable.
                l_s_range-low    = wa_itab_DyAuthTable-companycode.
                l_s_range-sign   = 'I'.
                l_s_range-opt    = 'EQ'.
                APPEND l_s_range TO e_t_range.
              ENDLOOP.
      Endcase.
    Endif.

  • Where to find LED error codes for Portege 4010?

    Hi,
    My Portege 4010 isn't working, and the AC indicator is blinking an error code (either 0xA or 0x50 depending if I should interpret the first bit as least or most significant). I've tried searching, and I've found a fairly detailed guide that includes these error codes for the Portege M100 and M300 (at  http://tim.id.au/laptops/toshiba/portege%20m100.pdf and http://tim.id.au/laptops/toshiba/portege%20m300.pdf) but I can't find anything for the 4010. So can anyone give me a location (ideally official Toshiba) for a document detailing the meaning of the error codes for my model?
    Thanks,
    Jes

    See for 'REP messages' in help menu.

  • Verification Code for "Sharing" photos in PhotoShop Elements 8

      How do I obtain my original verification code for "Sharing" photos in PhotoShop Elements 8?  My e-mail address has changed.

    In Organizer, go to preferences (Under Edit menu)
    Then go to sharing under sharing you can change the email address to your latest email address, click ok and then send the email verification cod again.
    Thanks
    Harshit yadav

  • Ora (OCI) error codes for TAF failure

    Hi,
    I am working on project where in I have to support Transparent Application Failover (TAF) in GUI (using Java). From web (by googling) I found that this is automatically done by JDBC Thick (OCI) drivers.
    I also found in some web site that there are lot of Ora Error Codes for various senarios like SELECT TAF failure(Ora 25401), or for DML command TAF failure(Ora 25402).
    Is there any set/range of Ora(OCI) Error Code which is specifically for all TAF failure senario?
    Thanks
    Ram

    :-)

  • Property code for Shared Member

    Hi,
    Could you please let me know what is the property code for Shared Member. I am trying to create a text file and trying to create some members as shared. Something like for Dynamic Calc we have "X" so I need similar kind of code for Shared Member.
    Thanks

    I am not sure some thing like that exists.
    It is not required for building shared heirarchy.
    You can use dupgen or duplev fileld properties in the dim build rules. By the way you can tell Essbase to tag them as shared.
    Parent/Child reference build method automatically shares the second time encountered member under differant parent.

  • Error Reading a Shared Variable Array

    Hi,
    I am having a problem reading an array of 20 unsigned integers from an Allen Bradley ControlLogix PLC with Labview.
    I have set up a shared variable for this purpose.  I have set the Data Type of the shared variable to ArrayOf Unit16.  The Variable Type is Network-Published, and I have check the Bind To Source checkbox.  I think my problem is in the shared variable path.  I have tried the following with no success:
    MyComputer\ControlLogixTags.lvlib\RsLinx\ProjectX\Online\Faults\Faults
    MyComputer\ControlLogixTags.lvlib\RsLinx\ProjectX\Online\Faults\Faults[0]
    MyComputer\ControlLogixTags.lvlib\RsLinx\ProjectX\Online\Faults\Faults[]
    MyComputer\ControlLogixTags.lvlib\RsLinx\ProjectX\Online\Faults\
    MyComputer\ControlLogixTags.lvlib\RsLinx\ProjectX\Online\Faults
    I have created a simple vi for testing.  I have wired the shared variable to an indicator which is an array of UInt16 items.  When I run the vi, I get an error which says "Error 91 occurred at Variant to Data in Text.vi.  Possbile Reason:  The data type of the variant is not compatible with the data type of the input."
    Does anyone have a suggestion as to what I am doing wrong?
    Thanks in advance for your help,
    Phil

    Phil,
    In order to determine that you can correctly communicate with your OPC server, I would suggest creating a shared variable bound to a single tag. It sounds as if you already have an RSLinx I/O Server in your project library. Now you can create a new shared variable and use the browse option to browse the items of your I/O server. Be sure to select a tag that has a known value such that you can verify successful communication.
    Also, does your VI utilize a dynamic data conversion? The error code mentioned (error 91) is normally associated with this data type. Our next step will be to look at this VI once we can establish successful communication. I hope this was useful for you. Please let me know if I can be of further assistance.
    Mike
    National Instruments
    Applications Engineer

  • Are clusters or individual elements better for shared variables?

    So...  I have some RT code that is being updated, and pulled out of the Stone Ages of LabVIEW.  It was originally written for an old FieldPoint controller operating in "headless" mode, and used the "publish" and datasocket methods for communications and external control.  I had to get clever way back then, and put together a parsing/unparsing system for strings to send sets of data back and forth between the controller and any HMI or other computer attached.
    Now, I'm completely rewriting the code for a cRIO system, and doing my best to leverage all of the strengths of the latest LabVIEW versions.  I have already done an intermediate stage, where I converted from the publish/datasocket method to using network shared variables for my strings, so I could keep some of the original control and calculation logic.  Now, however, I'm going back to the drawing board for most of the program, with only some of the proven logic being held over into the new version.  And, as I'm putting together the data structures I need for both internal control and external communication, I'm in a bit of a quandary...
    I have come upon a data structure dilemma:  should I use individual shared variables for my data, or assemble associated data into clusters?  My original program had a string (essentially a flattened cluster) for each sensor in use (up to 4), one for the system parameters and states, and one for the control parameters and states.  There was a certain advantage to keeping the data compartmentalized like that, it kept things organized and forced me to avoid too many random references of each data point.  And it kept the number of communications channels limited to just a handful.  Mimicking this structure with cluster shared variables would be easy.  But, I'm not sure it's the best or most network-efficient method.
    I know the bundling/unbundling will add some processor time in my code, that is not new to me (it will still be much faster than my old parsing routines).  But, if I have individual data points being thrown around, I can access them easily from things like Data Dashboard (which is great, but far too limited to be able to grab items in clusters and such).  Having all of my data points individually available would make my project messier, but open up easier access.  It would also dramatically increase the number of data points being thrown around on the network at any one moment.  For reference, I would probably have a maximum of 100 data points at one time, made up of a combination of integers, floats, booleans, integer arrays, boolean arrays.  Or I would have a maximum of 8 clusters that would contain those data points.
    Any suggestions on which way I should lean?  Are there any advantages/disadvantages between shared clusters like the ones I need vs. the number of individual shared variables I would need using the alternative methods?  Network traffic and efficiency are always a concern, particularly since this is a "headless" cRIO in a control situation that must maintain a fast scan rate...
    Thanks for any help.  I'm so stuck on this fence, and I can't figure out which side to fall off!
    Solved!
    Go to Solution.

    Thanks Tim, that is a great source that I somehow missed in my hunt for information regarding my dilemna...
    I have to wonder though, does that 25 number also include the I/O points on your cRIO?  Anyone know that particular?  Most of the I/O points are network shared by default during initial configuration, and you could very quickly exceed 25 variables on an 8 slot rack (such as the one I use, a 9074).  Now I'm a bit worried that I'm overusing the variable engine, even before the communications clusters get figured in...

  • Using Modbus TCP I/O Server with new DSC Shared Variables in LabVIEW 8.6

    Hello,
    I'm using LabVIEW 8.6 and want to communicate with a Beckhoff BK9000 Ethernet TCP/IP Bus Coupler via Modbus TCP. Instead of using the NI Modbus Library, I've tried the new LabVIEW 8.6 feature "DSC Shared Variables" as described at the bottom of this page: Latest NI LabVIEW DSC Module Features and Demos. Reading of analog input bus terminals works fine. However, I haven't figured out yet how to write on an anolog output bus terminal with these shared variables.
    It's about a 16 bit analog output and I need to write to the registers 0x1121 and 0x0801. It works with the NI Modbus Library (just using function code 6 and choosing the registers), but on the other hand I don't know which shared variables I have to choose for these registers. I've tried several data items (e.g. 400001 upwards as well as 402049 for 0x0801) but none of them worked. I would be glad for a short explanation - thanks in advance for your support!
    Regards
    utechle

    The Beckhoff documentation says, that holding registers start with 0x0800. I've checked this by using the NI Modbus Library. I used the "MB Ethernet Master Query.vi" togehter with the function code 6 for "Write Single Registers", changed the settings of the starting address to hexadecimal view and entered 801 (since it starts with a control byte in 0x0800 and the data out word follows in 0x0801). Furthermore, I had to address register 0x1121 in the same way for resetting the watchdog. As I've mentioned in my first post, this method works fine. However, I haven't found out yet which shared variables i have to use for accessing these registers.
    On the other hand, it's no problem to read data from analog input bus terminals using shared variables. They start with 0x0000 (status byte) and 0x0001 (data in word) and I can read data with the shared variable and data item 300001, respectively.
    Message Edited by utechle on 01-27-2009 11:12 PM

  • Error with the Shared Variable Engine

    Hi,
    I have a problem with the Shared Variable Engine,
    A .doc File is attached to this message, decribing the problem with pictures.
    I will be glad if anyone can help me. 
    Sincerely yours
    Amitai Abramson
    Attachments:
    Question.doc ‏819 KB

    Hi Amitai,
    Good afternoon and I hope your well.
    A member of the team from NI Israel contacted me regarding this post.
    I want to provide you with extra details on how to resolve your issue - i.e. Repair (Or Re-install) the Shared Variable Engine.
    If you use the MsiBlast Tool it will populate a list of all MSI NI Installers. One of these will be NI Variable Engine. On the right-hand side you can the click 'Repair'. I would also Repair the engine support for the versions of LabVIEW you have installed. Please see attachments for MsiBlast and a screenshoot of the MSIBlast screen.
    If this doesn't work I would recommend re-installing LabVIEW using the following guide, which I posted on this forum. (second post by me).
    Please let me know how you get on,
    Kind Regards,
    James.
    Message Edited by Hillman on 12-03-2008 12:19 PM
    Message Edited by Hillman on 12-03-2008 12:19 PM
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!
    Attachments:
    Repair Shared Variable Engine.JPG ‏97 KB
    msiBlast.zip ‏110 KB

  • Error programmatically deploying shared variable lvlib from an installed app

    I'm using shared variables in my app.  According to what I've read, I need to deploy the lib programmatically using the app invoke node deploy library.  I do this and it works fine for the app exe on my machine.  But then I created an installer and tried it on a "virgin" machine and I get a "error 1 at invoke node" saying "an input parameter is invalid."  I added an indicator that shows the lib file path I'm using and it's fine.  I had left the target IP addr unwired but I also tried 127.0.0.1 just in case.  Any ideas what's going wrong here?

    Hi:
    If including the SVE installer didn't resolve the issue then it looks like there are some other possibilities that are discussed in the following forum threads.  Not sure if you've seen these yet, but hopefully they will help.
    http://forums.ni.com/ni/board/message?board.id=170&message.id=240865
    http://forums.ni.com/ni/board/message?board.id=170&message.id=230033
    http://forums.ni.com/ni/board/message?board.id=170&message.id=249345
    Message Edited by A Person on 03-23-2009 02:40 PM
    Message Edited by A Person on 03-23-2009 02:40 PM
    Alex Person
    NI-RIO Product Support Engineer
    National Instruments

  • Shared Variable Crashing LabVIEW

    This is just one of those projects that has a brick wall at every turn so far. Two computers running LV2009. Computer A hosts Data Write Shared Variable. Computer B hosts Data Read Shared Variable. Data Read is bound to Data Write. Everything was working fine, and then late yesterday afternoon, I don't think I had changed anything on the shared variable, I start up my VI on Computer B, and LV crashes. The VI starts to run until the first execution of Data Read, and then poof, everything open in LV dissapears. The problem is one hundred percent repeatable since then.
    Here is what I know:
    1. An error indicator hooked to Data Read shows -1950679034 (Shared Variable has no value) for about a second before the crash. Everything stops executing as soon as the warning appears.
    2. The Data Write is single writer, but it is also occasionally read in the VI that it is written in. It is not being read when the crash happens. I can however perform the read on Computer A without incident.
    3. Not sure if this is related, but if I open the VI on Computer B, and then open the project, I am not able to drag Data Read from the project onto the block diagram. I also cannot perfrom any operations on the Shared Variable (like right click, ignore timestamp). I have to close the VI and reopen it from the project. Thinking back, this problem may have started when I opened the VI without opening the project.
    I am torn between abandoning Shared Variables and trying to figure this out. I would definetely prefer to use the Shared Variable, especially because I need some buffering. I'm guessing I can buffer things some other way. Not sure if I can remotely access a queue, or ... ?
    Solved!
    Go to Solution.

    I looked at STM, but I think the Data Socket VI's may be a better fit for me. It seems like Data Socket and shared variables are sort of intertwined, but I'm hoping DS doesn't suck as much as the SV seems to so far.
    I think NIC means network interface card? Anyway, I don't really know how many I have. The Data Writer is on a PXI8108 with Windows, the reader is an old crappy Dell that I inherited with the desk.
    I'm also not sure about the logos.ini file you referred to.
    My intention is to transmit an array of double waveform that is about 15 - 20 channels acquired at 100 - 1000 Hz. I think the Data Socket looks like the simplest way to do this, and I could live with 100 Hz if speed is a problem, but I sort of don't think it will be. I'll try tomorrow unless somebody has a better suggestion.
    By the way, I saw in another post a similar problem with Shared Variables that is supposedly fixed with the new patch for 2009, but I'm not sure I trust SV's because this will, for about thirty seconds of its lifetime, be one of the most critcal applications I've written, so I want confidence that it will work for those thirty seconds.

Maybe you are looking for