Sends data to a VI to the other

My test application consists of several VI. One of them is just to enter/modify test information, for example the tester name, date, HAD model names and numbers etc. Another is for entering the data of test equipment (serial numbers, calibration due dates, names of resourse VISA etc.). Third is to measure parameters (frequency, power limits, calendar, etc.). And I VI Reporting using the data entered, measurement and Calibration.

What is the best way to communicate between these VI? I use global variables, but every now and then I read in this area and other forums that abuse variables is a bad habit and should be avoided.

The best way is to use the wires in cases where data dependence created by the son is accepatable.  In your case it is not only acceptable mandatory weed. You cannot run the test until the parameters entered.

I propose an architecture of State machine with States who call the subVIs. Data can be passed on from one State to the other shift registers.

If parallel execution is required for some parts of the show, then wiring will not work.  A global variable functional or engine of the Action can be better for global variables.  Queues are also a good way to pass data to a parallel loop.

Lynn

Tags: NI Software

Similar Questions

  • Time increasing while sending data via http repeatedly on the storm

    Hi all!

    My application sends data (in general, this is a picture of ~ 1200 Kb) to the server via http.

    The data are sent ok, but the when I send data several times (without leaving the application) the time devoted to writing the data in the outputStream develops. On first use, it takes usually ~ 50 seconds, the second seconds of ~ 70, the third seconds from ~ 100... I see this problem only on the storm, others (Curve 8900, Bold, Tour) are OK. The url is used on Storm is: http://xxxxxxxxxxxxx.com/mobile/mobile.asmx;deviceside=true

    Here is the code snippet:

    private static WSResponse send(byte[] xmlBytes, WSResponseParser parser) throws Exception {
    
            HttpConnection connection = null;
        OutputStream outputStream = null;
    
           try {
                connection = (HttpConnection)Connector.open(WifiChecker.getURL(URL), Connector.READ_WRITE, true);
    
                connection.setRequestMethod(HttpConnection.POST);
                connection.setRequestProperty("Content-Type", CONTENT_TYPE);
                connection.setRequestProperty("Content-Length", String.valueOf(xmlBytes.length));
    
                outputStream = connection.openOutputStream();
    
                int offset = 0;
                int chunk = DATA_CHUNK_SIZE; // 1024
                int len = xmlBytes.length;
                while (offset < len) {
                    if (offset + chunk >= len) { // avoiding OutOfBounds Exception
                        chunk = len - offset;
                    }
                    outputStream.write(xmlBytes, offset, chunk);
                    offset += chunk;
                }
    
                xmlBytes = null;
    
                String response = getResponseAsSting(connection);
    
                WSResponse wsResponse = null;
                try {
                    wsResponse = parser.getWSResponse(response);
                } catch (Exception e) {
                    throw ApplicationException.invalidWsResponse();
             }
    
                if (!wsResponse.isSuccess()) {
                    throw new WSFailureException(wsResponse);
                }
    
                return wsResponse;
    
            } finally {
                IOUtils.safelyCloseStream(outputStream);
                IOUtils.safelyCloseStream(connection);
                if (xmlBytes != null) {
                    xmlBytes = null; // notify VM it can safely free the RAM
                }
            }
    

    I thought it may be a memory problem, so I manually cancel xmlBytes, but which does not solve the problem.

    Any ideas?

    Thanks in advance,

    Arhimed

    P. S.

    There is no question about Simulator, only on a real device of the storm.

    MSohm, thanks for your response.

    Fortunately, I have just fixed the problem. The problem was not in the code above, but in the code that made the xmlBytes. I converted bytes of the image base64 and looks like I did it dangerously on the use of the memory.

    Thanks again for your attention to this thread!

  • Says "sending data..." "and the printer does print (photosmart c440 &amp; macbook pro snow leopard)

    Hi, my photosmart C440 printer suddenly stopped working print and custom. The message says "Sending data...". "forever but never prints. The printer is on but does not respond to what it says my computer. I have a macbook pro snow leopard OS. This has never happened before, I did not any changes to the system. When the problem appeared first of all, I reinstalled the driver and was able to print once and then it stopped working. Then I installed snow leopard and it stil does not work.

    Thank you!

    We will restore the print system:

    -Sys Prefs, Print & Fax
    -Right (control) click inside the box that lists your printers and select Reset Printing System.
    WARNING - This will remove ALL your printers!
    -Select the sign + to add again. Search for the printer, select it, and wait until the button 'Add' becomes available. Until it clicks.

  • How can I use notifications to send data from different sources for the same chart?

    Hello

    I use the model of 'Continuous measurement and logging' project comes with LV 2013.

    It is extremenly helpful in understanding the messaging between the acquisition, graphic and loops of newspaper. (Thank you NEITHER!)

    I ran into a snag though.

    I want to change so that my graphic loop receives notifications of data from two sources of acquisition by the declarant.

    I have trouble getting the data from the two sources to display on one graph.

    I've isolated the problem in the attached vi.

    Here's what happens:

    1. I create 2 parallel loops data and send the data to a third parallel loop with the notifiers.

    2. the third loop receives data from one of the loops because one of the authors of just receiving notifications is to expire instead of receive data.

    Can anyone suggest how can I fix?

    Thank you.

    -Matt

    Here's my modification of your VI. I put notes on the block diagram to explain the changes. He uses a queue for data transfer to avoid data loss. It uses a notifier to stop loops. All local variables and value property nodes have been eliminated.

    The way loops are arrested probably let some data in the queue. No more of one or two iterations of each of the loops of data acquisition. If you need ensure that all data has been displayed (or recorded in a real application), then you must stop acquiring loop first and read the queue until you know it's empty and both other loops stopped. Then stop the render loop and release the queue and the notifier.

    Lynn

  • Composite planning form, copy data from one tab to the other?

    This is something I've heard of someone who did but have not actually seen. The requirement is to copy data from an existing entity to a new entity as a means of values seedlings early in the budget cycle. I was thinking about a form of 'source' and a form of 'target' within a composite shape. A calc would make a copy. After copying the Scheduler can manually adjust values, or type values in the accounts that the source had no data.

    If someone did please let me know how you did and what looked like the calc.

    Thank you!

    FA

    Hello

    Yes, this can be done in several ways. The calc script would be similar to what is mentioned above. But in regards to the copy, you can also create a menu on the source form set a rule of company on the menu and start the copy that also offer users the ability to choose several invited outside of the entity if necessary.

    Thank you

  • Creation of interface that won't use c $ table while getting data from one table to the other.

    Hello

    That was the question asked in an interview.

    Given the scenario has been that I have two servers say s1 and s2, each containing a database with tables source1 and source2 respectively...

    And I have a target table on server 2 with name target 1.

    Cent were as

    1 can data ufetch target1 source1 without creating table C $? If Yes, how can it be achieved.

    2. how temporary will be created all to get ata in source1 and source2 to target1? Explain the same thing?

    Also I would like to know what is the actual use of the c arrays $? Why they are used.

    I would be very grateful for answers.

    Thank you and best regards,

    Mahesh

    Hello

    Look at these links.

    http://odiexperts.com/why-creating-a-separate-schema-for-temporary-tables-in-ODI/

    Also this

    http://odiexperts.com/direct-load-by-interface-with-no-work-tables/

    Concerning

  • See the popup message if the data changes while moving to the other screen

    Hello

    We use Jdeveloper 11.1.1.4.0.
    If the data is changed on the page current and without clicking the button Save, we show a message like "do you want to save the changed data.
    while navigating to another page or by closing the browser.

    How do we get to know if the data is changed or not?

    Kind regards
    Vijay

    Published by: Christian Pat December 1, 2011 22:35

    Hello

    There is one off the behavior of the box that includes unvalidated data when you exit the page.

    This is the behavior of the uncommitted data

    http://www.Oracle.com/technetwork/developer-tools/ADF/unsaveddatawarning-100139.html

    However, it is a warning that will commit all the values.

    To do this, you must do it manually, as far as I know of course.
    One way is to get the application Module, get the Transaction and check if she isDirty.
    If this is the case, displays a context menu that is customized with what you want.

    You can apply that in all cases you want navigation.

    Kind regards
    Dimitris.

  • Pass data from one page to the other

    Hi all, I'm doing an upload of CSV file in a database application, and I wonder if it is possible to transmit the data from the file field to another php file that performs the command insert the data from the csv file into the database? Thank you!!

    Wanqi

    Hi, good news! I managed to solve the problem. It turns out that the bug was the connotation of the variable. Thanks a lot for your help!

  • How can I change the date format in Thunderbird for the list of received messages?

    Through 19/02/2015 12:28, I received my email with this format. Since that time, all the date Watch column is the time, the date does not show. How to get back to the default time and date format?

    The default is to show all the time on messages from today, with the date and time on all the other messages.

    http://KB.mozillazine.org/Date_display_format

  • How to read two files (one updates every second, the other is constant) simoltaneously

    Dear all,

    I'd appreciate if someone help me.

    I want to read two files, one is the temperature that updates every second, and the other is energy hysteresis that has specific lines and is constant.

    I had a program in the discussion forum to read a file as it is updated. I checked this program in my case and it works.

    Then I added playback file hysteresis energy to the existing file. But while I run the program, the energy hysteresis file is read with all the lines.

    But the goal is that every time the updates of the temperature, I need to read a line of the file hysteresis energy.

    in this way every second, so, I have a new temperature data and a row of the other file.

    I tried to use 'for loop' inside the program, but it did not work, because the temperature reading will stop until that end of the loop.

    I joined the program.

    Could someone help me how read only a row of hysteresis energy file every time that the temperature updated?

    IS that what you wanted to achieve?

  • Display today date + 10 days or show the date of the event if this is earlier.

    I have created an agreement form PDF.

    I would like to have the deposit due 10 days from "Date of the day" or the "EventDate", whichever comes first.

    currently it shows the date of the day + 10 days but sometimes the event date is earlier than that.

    Thank you all in advance!

    This script can be used for the filing date:

    document level scripts;
    function GetField (oDoc, cName)
    {
    get the object field with error checking.
    oField = oDoc.getField (cName);
    if(oField == null)
    {
    App.Alert ("Error to the field named" + cName + "\nPlease check the spelling of the domain name and capitalization.', 1, 0");
    }
    return oField;
    } / / end GetField function;

    Scand (cFormat, cDate) function
    {
    convert date stirng date with error checking object;
    Kai var = util.scand (cFormat, cDate);
    if(oDate == null)
    {
    App.Alert ("Date of conversion Error" + cDate, "using the format" + cFormat + "\nPlease verify that the date is valid", 1, 0);
    }
    Return to oDate;
    } / / end Scand function;

    function Date2Num (oDate)
    {
    convert the date object to the number of days since the EPO / / date of ch;
    set the time at midnight of the date;
    oDate.setHours (0, 0, 0, 0);
    convert milliseconds to days;
    Math.ceil (oDate.getTime (return) / (1000 * 60 * 60 * 24));
    } / / end of function Date2Num;

    function Num2Date (nDays)
    {
    Convert number of days date object.
    Back to oDate = new Date (nDays * 1000 * 60 * 60 * 24);
    } / / end Num2Date funciton.

    SetDate() function
    {
    If (GetField(this,_"Today").valuesAsString == null |) GetField(this,_"Today").valuesAsString == "")
    {
    var oToday = new Date(); get the date system;
    oToday.setHours (0, 0, 0, 0); Set to midnight;
    GetField(this,_"Today").value = util.printd ("dd-mmm-yyyy", oToday);
    }
    return;
    }
    Set the field to today's date.
    SetDate();
    end document level scripts;

    Event.Value = ""; Turn off the field;
    get the field objects and field values;
    var cToday = GetField(this,_"Today").valueAsString;
    var cEvent = GetField(this,_"Event").valueAsString;
    var cDateFormat = "dd-mmm-yyyy";
    If (cToday! = "" & cEvent!) = "")
    {
    objects convertdate to days;
    var oTodayDays = Scand (cDateFormat, cToday)
    var nTodayDays = Date2Num (oTodayDays);
    var oEventDays = Scand (cDateFormat, cEvent);
    var nEventDays = Date2Num (oEventDays);
    Make sure that the date of the event is not before the date of the day;
    If (nEventDays<>
    {
    App.Alert ("event date cannot be before the date. today', 1, 0);
    }
    on the other
    {
    Assume that filing date is the date of today + 10 days
    var nDepositDays = nTodayDays + 10
    If (nEventDays<>
    {
    nDepositDays = nEventDays;
    }
    fixed date of filing;
    Event.Value = util.printd ("dd-mmm-yyyy", Num2Date (nDepositDays));
    }
    }

  • Sends data to a form to an e-mail address

    I have a flex form 4, which asks the user to enter his name and address, name and address are 2 distinct areas. There is also a button "submit".

    I would do it like this when the user clicks on the button submit that users name and address is sent to my email address.

    Nobody knows how, preferably using .net or Java, as a language of middleware?

    j.

    Hello

    You can use HTTPService to send data to a script on the side Server (ie: an aspx page), which creates and sends the e-mail. should be plenty of examples if you google it

  • "Unable to send data to the printer.

    I have a HP deskjet F4440 printer.  He has always fought linking to our Mac.  We restart the printer or the computer often to do print, but after doing one or the other it would work normally.  But now it doesn't connect at all.

    I uninstalled and reinstalled the printer.  I downloaded and installed the software from the apple support Hewlett-Packard printer.  I restarted my computer, uninstalled and reinstalled my printer.  It presents itself as "in use" but says "Unable to send data to the printer" when I try to send a simple text of pages for print test.  When I try to scan it shows that the scanner is connected, initially said "waiting for scanner", then 'scanner is not available' stops.

    Do you have any suggestions?  Thank you!!!

    Hi mandi820,

    Welcome to the HP Forums! I see that your HP deskjet F4440 printer has difficulty to connect to your Mac. I'm happy to help you with this problem of connection! I have a few questions for you:

    Hope to hear from you and have a great day!

  • Computer does not send data to the printer

    I have a HP Pavilion g7-1310us laptop running Windows 7 Home Premium X 64, hung up on a printer Panasonic KX-MB1500. For two years, everything worked perfectly. Suddenly, a few weeks ago, my computer go haywire. Instead to start normally, I got a black screen with an underscore flashing in the upper left corner and a constant beep - not a signal POST, just a regular beep for about two minutes. Then start Windows. A week before, without any effort on my part, my machine started to run normally again, although starting up. However, when he went haywire, she also continued to send data to my printer and still won't. The printer itself is fine. It will scan and it makes copies, it will display its own internal test page. The USB cable is brand new, and it works very well in the opposite direction; everything I scan is in my computer normally. I installed, deleted and reinstalled the printer from my Panasonic CD drivers several times, but it will still not print computer. The printer is inactive on "Energy saving" and don't go to 'Print PC' (when the fuser unit starts to heat upwards), so that the printer is still asleep. Lenovo Thinkpad I borrowed a friend (also Windows 7) and installed my Panasonic drivers on this subject, then connected to my printer. He printed the test page for the devices & Printers immediately, without any problem. Obviously there is something wrong with the software from my computer. In Device Manager, the Lenovo showed two times more than my HP shows USB controllers. (Yes, I tried to uninstall all the USB controllers and leave the machine to reinstall on reboot.) Critical something is missing in my software that prevents all three of my USB to send ports, although they receive (the function of scan and a Logitech wireless mouse) very well. Is it possible that my Windows 7 is corrupted? I ran SFC, and it signals that all is well when it executes the audit program. Obviously, something inside of my box is NOT very well, if the works of Lenovo and my HP does not work. Is it possible to trace and fix this problem?

    Apparently you have isolated the fault with the new information. You may not realize that a new detail was very informative.  She completed a string of the integrity of the material.  A printer driver and PDF995 share a common fault - Printer Manager subsystem, which also includes a spooler.

    Rather strange that a function of the software OS remains faulty.  However, this type of failure must be reported and confirmed in the system event logs.   If this software does not work, then it also does not start in the Services (or by running the \Windows\system32\services.msc program).

    BTW, are you sure that you were to load a 64-bit driver in your CV?  The other was a 32 bit OS?  Doubtful, it is a problem - but stranger things have happened.

    Pdf995 in the meantime and the driver Panasonic the two default share a common factor - the print subsystem that includes also a spooler.

    If the print subsystem is declared problematic in the case of newspapers and in Services, then restore the system on the eve of the blackout is a safe and recommended solution.  But only if this subsystem is clearly problematic.

  • Sending data to the web and try again

    I have a web application running on Tomcat configured to accept data that I send from my 9000 "BOLD".  I have a test application now running on my BB.  I see examples for sending data, but I can't seem to find a way to roll everything into one. I was hoping someone can direct me to a post/example/etc that would meet my needs.

    I want to send my bb to my web application data, sometimes the text, sometimes media / other.  I want it will retry connections if it is not complete fully and hold until it does (or timeout after that # attempts then abandon).  If the sending of a photo on the EDGE and connection falls Mid-upload, I want he's trying to take over.  If theres no data connection, save and try again later.  I'm sure that it's simple, but I couldn't find anything in my research.

    Thanks for any help,

    Song

    Browse documents of the API, including at the level of the connector, class HttpConnection, CoverageInfo and coverage. Once you are familiar with those, you can get what you want easily.

Maybe you are looking for

  • Material

    1. name of product HP Pavilion DV7 #XW899AV 2. Windows 7 64 bit The problem I'm having is this, whenever I move the computer: oWireless light switch electrician orange o the best ie volume key functions up/down brightness, stop working o Windows 7 ca

  • soemone called me claiming to be from microsoft, is it a scam or not

    someone called my house and claimed to be Microsoft and said that my computer has been sending error messages and needed my cls number from my computer because it was corrupted it was just a scam?

  • HP Deskjet 3055 has all-in-one installation with mac

    just bought the perfect printer for my HP Deskjet 3055 A scanner/printer/photocpier needs and I precisely wanted to that it is wireless. to see that it won't install with MAC OS X 10.7.5... When I insert the instalation disc the message is "operating

  • Spooler does not, file not found

    I have the error message on the server print spooler does not. When I go and tell him to start, I get a second error message saying that the system cannot find the specified file.  What should I do?

  • Switch 11v accept fees entering via micro-USB?

    What is said. ^ ^ ^ Come with nothing on google and forum search. I'm debating on get this or shimmer for the 10v switch (in Europe now) or the switch 12 S (yesterday), but I'm really fan of portable portable smaller. 11V comments all say that life b