Why is the second serial read delayed 30 sec?

I have two digital scales connected through two separate serial ports. The first one reads fine, the second one reads but the display is on like a 30 sec delay. It is reading the string, because if you put weight on the scale and then let off, the readout will eventually show the weight that you put on the scale

'VISA flush I/O Buffer.vi' should work (Somewhere in VISA advanced)
or a 'read VISA while bytes @ port >0' construct
see attached vi.
But keep in mind that you have to sync your data flow after that. the head of your next data might be cutted.
maybe you want to collect the strings read the hole buffer and use a match pattern to get the last valid reading.
something like "[~\f]+\f$" if a formfeed is your termination character
Henrik
Greetings from Germany
Henrik
LV since v3.1
“ground” is a convenient fantasy
'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'
Attachments:
empty_buffer.vi ‏37 KB

Similar Messages

  • HT4972 After the process stops due to a "corrupted" download of the new iOS file, why does the second try repeat the ten-hour backup process?

    After the process stops due to a "corrupted" download of the new iOS file, why does the second try repeat the ten-hour backup process? I am doing this on the latest iTunes, and a Windows XP computer.

    After the process stops due to a "corrupted" download of the new iOS file, why does the second try repeat the ten-hour backup process? I am doing this on the latest iTunes, and a Windows XP computer.

  • What property settings to I need to set in order for VISA Serial Read to read ASCII exactly like the legacy serial read vi?

    I have successfully built a vi which communicates with a piece of equipment via the serial port using ASCII characters. I am trying to replace the older versions of Serial Read and Write VIs with the VISA Serial Read and Write VIs. The VISA Write works fine, but the when reading data coming from the "box", the VISA Read VI returns string data with foreign looking characters instead of the usual correct ASCII characters as shown by a dumb terminal which is in parallel with the serial data line. Is there a special property node which needs to be configured on the VISA Serial Read vi, or do I need to set something on the VISA Configure Serial port v
    i?
    Why aren't the VISA serial vis compatible with the older serial vis?
    Thanks...

    Usually, garbage characters are an indication of a baud rate or parity mismatch, or maybe a stop bit or number of data bits setting. Make sure that you have configured your port correctly with VISA Configure Serial Port. I have used VISA serial successfully many times.
    - tbob
    Inventor of the WORM Global

  • Why is the second row in the recordset not updated?

    Hi,
    I have this problem.
    I have written a servlet named processPOItem.
    The following is the doPost Method in the processPOItem class:
    public class processPOItem extends HttpServlet {
    //attributes
    public String strPO;
    ConnectionPool connectionPool = null;
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, java.io.IOException {
            int counter=0, remainder=0;
            String SearchPOItems;
            String strStatus, ISBN;
            String price;
            response.setContentType("text/html"); //html output
            PrintWriter out = response.getWriter();
            //get the parameter named PO
            strPO = request.getParameter("PO");
            Connection dbConn = null;
            try{  
                out.println("<html>");
                out.println("<head>");
                out.println("<title>Purchase Order " + strPO + "</title>");
                out.println("</head>");
                out.println("<body>");
                out.println("<table width=600 border=0 align=center>");
                out.println("<tr>");
                out.println("<td colspan=4 align=center>");
                out.println("<font face=Arial size=2>");
                out.println("<b>Purchase Order: " + strPO + "</b>");
                out.println("</font>");
                out.println("</td>");
                out.println("</tr>");
                out.println("</table>");
                out.println("<form method=post action=processPOItem>");
                out.println("<input name=updatePO type=hidden value=1>");  
                out.println("<table width=800 border=0 cellspacing=1 cellpadding=0 align=center>");
                out.println("<tr bgcolor=\"#990000\">"); //Display the mb_PurchaseItem
                out.println("<td align=center><b><font size=1 face=Verdana color=\"#FFFFFF\">No</font></b></td>");
                out.println("<td align=center><b><font size=1 face=Verdana color=\"#FFFFFF\">ISBN</font></b></td>");
                out.println("<td align=center><b><font size=1 face=Verdana color=\"#FFFFFF\">Title</font></b></td>");
                out.println("<td align=center><b><font size=1 face=Verdana color=\"#FFFFFF\">Status</font></b></td>");
                out.println("<td align=center><b><font size=1 face=Verdana color=\"#FFFFFF\">Quantity</font></b></td>");
                out.println("<td align=center><b><font size=1 face=Verdana color=\"#FFFFFF\">Unit Price</font></b></td>");
                out.println("<td align=center><b><font size=1 face=Verdana color=\"#FFFFFF\">Delivered Date</font></b></td>");
                out.println("</tr>");
                //get the SQL statement
                SearchPOItems = searchSQL(strPO);
                //get free connection from Pool
                dbConn = connectionPool.getConnection();
                //create a statement object
                Statement stmt = dbConn.createStatement();
                //create the recordset
                ResultSet rs = stmt.executeQuery(SearchPOItems);
                //display the recordset
                while (rs.next())
                    counter++;
                    remainder = counter % 2;
                    if (remainder == 0)
                       out.println("<tr bgcolor=\"#C1C1C1\">");
                    else
                       out.println("<tr bgcolor=\"#E1E1FF\">");
                    //Display the individual Purchase item under the customer
                    out.println("<td align=center><font size=1 face=Verdana>" + counter + "</font></td>");
                    ISBN = rs.getString("mb_ISBN");
                    out.println("<td align=center><font size=1 face=Verdana>" + ISBN + "</font></td>");
                    out.println("<td align=center><font size=1 face=Verdana>" + rs.getString("mb_Title") + "</font></td>");
                    strStatus = rs.getString("mb_Status");
                    out.println("<td align=center><font size=1 face=Verdana>");
                    out.println("<select name=\"mb_Status" + ISBN + "\">");
                    out.println("<option value=PENDING");
                    if (strStatus.equals("PENDING"))
                       out.println("selected>Pending</option>");
                    else  
                       out.println(">Pending</option>");
                    out.println("<option value=PROCESSING");
                    if (strStatus.equals("PROCESSING"))
                       out.println("selected>Processing</option>");
                    else  
                       out.println(">Processing</option>");               
                    out.println("<option value=DELIVERED");
                    if (strStatus.equals("DELIVERED"))
                       out.println("selected>Delivered</option>");
                    else  
                       out.println(">Delivered</option>");
                    out.println("<option value=CANCELLED");
                    if (strStatus.equals("CANCELLED"))
                       out.println("selected>Cancelled</option>");
                    else  
                       out.println(">Cancelled</option>");
                    out.println("</select>");
                    out.println("</font>");      
                    out.println("</td>");
                    out.println("<td align=center><font size=1 face=Verdana>" + rs.getString("mb_Qty") + "</font></td>");
                    /*price = rs.getString("mb_Price");
                    NumberFormat moneyAmount = NumberFormat.getCurrencyInstance();
                    Double dPrice = Double.parseDouble(price);
                    out.println("<td align=center><font size=1 face=Verdana>" + rs.getString("mb_Price") + "</font></td>");
                    out.println("<td align=center colspan=2><font size=1 face=Verdana>");
                    if (strStatus.equals("DELIVERED"))
                        //status = "DELIVERED"
                        out.println("<input align=center name=\"deliveredDate" + ISBN + "\" type=text size=10 maxlength=10 value=" + rs.getString("mb_DeliveredDate") + ">");    
                    else
                        out.println("<input align=center name=\"deliveredDate" + ISBN + "\" type=text size=10 maxlength=10 value=Nil disabled>");
                    out.println("</font>");   
                    out.println("</td>");
                    out.println("</tr>");
                out.println("<tr><td> </td></tr>");
                out.println("<TR>");
                out.println("<TD colspan=3 align=center>");
                out.println("<INPUT TYPE=submit BORDER=1 value=update name=update>");
                out.println("</td>");
                out.println("<TD colspan=3 align=center>");
                out.println("<a href=\"javascript:window.close()\"><img src=\"Close.gif\" BORDER=0></a>");
                out.println("</td>");
                out.println("</tr>");
                out.println("<tr>");
                rs.close();  
                stmt.close();
                out.println("</form>");
                out.println("</table>");
                out.println("</body>");
                out.println("</html>");
                out.close();
            catch (Exception e)
                //sendErrorToClient(out, e); //send stack trace to client
                System.out.println(e.getMessage());
            finally{
                //return connection to Pool
                connectionPool.returnConnection(dbConn);
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, java.io.IOException {
               response.setContentType("text/html"); //html output
               PrintWriter out = response.getWriter();
               Connection dbConn = null;
               //get the parameters posted back by processPOItem servlet
               String processingAll = request.getParameter("processingAll");
               String deliveredAll = request.getParameter("deliveredAll");
               String deliveredDate = request.getParameter("deliveredDate");
               String refInvoice = request.getParameter("refInvoice");
               String refNumber = request.getParameter("refNumber");
               //String status = request.getParameter("status");  
               //check if update button is pressed
               String updatePO = request.getParameter("updatePO");
               //sql statement variable
               String sqlUpdatePOStatus;
               String isbn, poItemStatus;
               //update button was pressed
               if (!updatePO.equals(""))
                try{
                    //get the SQL statement
                    String SearchPOItems = searchSQL(strPO);
                    //get free connection pool
                    dbConn = connectionPool.getConnection();
                    //create a statement object
                    Statement stmt = dbConn.createStatement();
                    //create the recordset
                    ResultSet rs = stmt.executeQuery(SearchPOItems);
                    int index = 0;
                    //display the recordset
                    while (rs.next())
                      isbn = rs.getString("mb_ISBN");
                      poItemStatus = request.getParameter("mb_Status" + isbn);
                      out.println(isbn + " " + poItemStatus);
                      out.println("<br>");
                      //update the status of individual PO item
    if (!poItemStatus.equals(""))
    sqlUpdatePOStatus = updatePOItemSQL(strPO, isbn, poItemStatus);
    stmt.executeUpdate(sqlUpdatePOStatus);
                    rs.close();  
                    stmt.close();
                    out.close();
                catch (Exception e)
                    System.out.println(e.getMessage());
                finally{
                        //return connection to pool
                        connectionPool.returnConnection(dbConn);
    }When I perform a form submit in my doGet() method, the doPost Method() responsed. However, it encounter error in updating the second row in the recordset as highlighted in bold.
    After the first row is updated. The second row did not get updated at all.
    The error return was "Resultset is closed".
    What actually is wrong? How can I execute a sqlstatement inside a recordset? How to solve this problem?

    Did you turn on the "updatable" switch for the result
    set?
    public Statement createStatement(int resultSetType,
    int resultSetConcurrency) throws
    SQLException
    Parameters:
    resultSetType - a result set type; see
    ResultSet.TYPE_XXX
    resultSetConcurrency - a concurrency type; see
    ResultSet.CONCUR_XXX
    static int CONCUR_UPDATABLE
    JDBC 2.0 The concurrency mode for a ResultSet object
    that may be updated.Hi,
    do you refer to the following change of code:
    //create a statement object (original)
    Statement stmt = dbConn.createStatement();change to the following:
    //create a statement object (original)
    Statement stmt = dbConn.createStatement(resultSetType,
    resultSetConcurrency);when I use another statement object for executeupdate, what I got was the connection was used by another hstmt. Thus the second column was not updated at all.
    Why?

  • Why is the second procedure in my package not working??

    Hi I have a package that I want to run every 15 minutes. When I try to run the procedures manually and each one seperately they work. But when I put together these procedures in a package, the second procedure does not work or not updating the table. Any idea why this is creating a problem??
    PROCEDURE UPDATE_CS_ACTIVITY is the one in the below package that does not seems working .. but when i run the procedure manually it works fine.
    Any help in this regard is greatly appreciated...
    Thanx in advance
    Here is the Package code:
    CREATE OR REPLACE PACKAGE BODY UPDATE_ACTIVITY AS
    CSREWORK NUMBER(4);
    CSTRACKOUT NUMBER(4);
    STARTDATE VARCHAR2(20);
    ENDDATE VARCHAR2(20);
    PROCEDURE INSERTVALUES IS
    BEGIN
    DELETE FROM 2DAY_ACTIVITY;
    IF SUBSTR(TO_CHAR(SYSDATE,'MM/DD/YYYY HH24:MI:SS'),12,2) > 18
    THEN
    STARTDATE := '18:30:00';
    INSERT INTO 2DAY_ACTIVITY(STAGESTEPPROD,RESOURCES,CSTRACKOUT)
    SELECT "ACT_VIEW"."STAGESTEPPROD","ACT_VIEW"."RESOURCES",COUNT(TRACKOUTTIME)
    FROM "ACT_1DAY_VIEW" "ACT_VIEW"
    GROUP BY "ACT_VIEW"."STAGESTEPPROD","ACT_VIEW"."RESOURCES" WHERE "ACT_VIEW"."TRACKOUTTIME" > SUBSTR(TO_CHAR(SYSDATE,'MM/DD/YYYY HH24:MI:SS'),1,10)||' '||STARTDATE AND ISREWORKSTEP = 'F';
    INSERT INTO WAFER_2DAY_ACTIVITY(STAGESTEPPROD,RESOURCES,CSREWORK)
    SELECT "ACT_VIEW"."STAGESTEPPROD","ACT_VIEW"."RESOURCES",COUNT(TRACKOUTTIME)
    FROM "ACT_1DAY_VIEW" "ACT_VIEW"
    GROUP BY "ACT_VIEW"."STAGESTEPPROD","ACT_VIEW"."RESOURCES" WHERE "ACT_VIEW"."TRACKOUTTIME" > SUBSTR(TO_CHAR(SYSDATE,'MM/DD/YYYY HH24:MI:SS'),1,10)||' '||STARTDATE AND ISREWORKSTEP = 'T';
    COMMIT;
    ELSE
         STARTDATE := '06:30:00';
         INSERT INTO 2DAY_ACTIVITY(STAGESTEPPROD,RESOURCES,CSTRACKOUT)
    SELECT "ACT_VIEW"."STAGESTEPPROD","ACT_VIEW"."RESOURCES",COUNT(TRACKOUTTIME)
    FROM "ACT_1DAY_VIEW" "ACT_VIEW"
    GROUP BY "ACT_VIEW"."STAGESTEPPROD","ACT_VIEW"."RESOURCES" WHERE "ACT_VIEW"."TRACKOUTTIME" > SUBSTR(TO_CHAR(SYSDATE,'MM/DD/YYYY HH24:MI:SS'),1,10)||' '||STARTDATE AND ISREWORKSTEP = 'F';
    INSERT INTO 2DAY_ACTIVITY(STAGESTEPPROD,RESOURCES,CSREWORK)
    SELECT "ACT_VIEW"."STAGESTEPPROD","ACT_VIEW"."RESOURCES",COUNT(TRACKOUTTIME)
    FROM "ACT_1DAY_VIEW" "ACT_VIEW"
    GROUP BY "ACT_VIEW"."STAGESTEPPROD","ACT_VIEW"."RESOURCES" WHERE "ACT_VIEW"."TRACKOUTTIME" > SUBSTR(TO_CHAR(SYSDATE,'MM/DD/YYYY HH24:MI:SS'),1,10)||' '||STARTDATE AND ISREWORKSTEP = 'T';
         COMMIT;
    END IF;
    END INSERTVALUES;
    PROCEDURE UPDATE_CS_ACTIVITY AS
    BEGIN
    INSERT INTO CS_ACTIVITY(STAGESTEPPROD, RESOURCES, CSTRACKOUT, CSREWORK) select MAX(stagestepprod),MAX(resources), max(cstrackout) ,max(csrework) from 2day_activity group by 2DAY_ACTIVITY.stagestepprod,2DAY_ACTIVITY.resources;
    COMMIT;
    END UPDATE_CS_ACTIVITY;
    END UPDATE_ACTIVITY;

    You have create global variables CSREWORK and CSTRACKOUT
    in your package.
    Your have then selected the
    max(cstrackout) ,max(csrework) which would probably pick these variables up.
    Rename your variables to v_CSREWORK and v_CSTRACKOUT or remove altogether as no sign they are being used which should fix that problem. The normal naming standard for oracle is to name variables with a v_ and parameters with a p_ to prevent problems with naming.

  • Why is the second update in trigger not executing

    Hi all I'm just starting with pl/sql . My trigger works but the second update does not execute.
    why is it not executing? and how can I get it to execute?
    CREATE OR REPLACE TRIGGER bb_ordercancel_trg
    AFTER UPDATE OF idstatus ON bb_basketstatus
    FOR EACH ROW
    WHEN( new.idstage = 4)
    DECLARE
    CURSOR basketitem_cur is
    SELECT idproduct,quantity,option1
    from bb_basketitem
    where idbasket =:new.idbasket;
    lv_chg_num NUMBER(3,1);
    BEGIN
    FOR basketitem_rec in basketitem_cur LOOP
    IF basketitem_rec.option1 =1 then
    lv_chg_num := (.5*basketitem_rec.quantity);
    ELSE
    lv_chg_num := basketitem_rec.quantity;
    END IF;
    update bb_product
    set stock= stock - lv_chg_num
    where idproduct = basketitem_rec.idproduct;
    update bb_basket
    set orderplaced = NULL
    where idbasket = :new.idbasket;
    END LOOP;
    END;

    I retract that and with the modified code it works .
    thanks guys, I should have drank a little more coffee when I started this ;-)
    CREATE OR REPLACE TRIGGER bb_ordcancel_trg
    AFTER INSERT ON bb_basketstatus
    FOR EACH ROW
    WHEN( new.idstage = 4)
    DECLARE
    CURSOR basketitem_cur is
    SELECT idproduct,quantity,option1
    from bb_basketitem
    where idbasket =:new.idbasket;
    lv_chg_num NUMBER(3,1);
    BEGIN
    FOR basketitem_rec in basketitem_cur LOOP
    IF basketitem_rec.option1 =1 then
    lv_chg_num := (.5*basketitem_rec.quantity);
    ELSE
    lv_chg_num := basketitem_rec.quantity;
    END IF;
    update bb_product
    set stock= stock - lv_chg_num
    where idproduct = basketitem_rec.idproduct;
    update bb_basket
    set orderplaced = 0
    where idbasket = :new.idbasket;
    END LOOP;
    END;
    Edited by: user8690163 on Dec 8, 2009 12:57 PM

  • Why does the location always read "go to a website" instead of the actual address?

    If I were to go to www.amazon.com, why doesn't it show as this in the navigation bar? It always reads as "go to a website." I would like it show the exact http address like it always did.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    Another possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.org/kb/Bookmarks+not+saved#w_places-database-file

  • Why are the buttons not reading my fingers now? Terrible upgrade

    This upgrade is frustrating, wish I could undo it. The buttons don't respond to touch and I'm doing things more than one time now.

    You turned into a zombie? 

  • Why is the first character typed delayed and showing up as the 3rd or 4th character?

    For about 2-3 weeks now, I've been running across this problem. It shows up all over the OS. I can be typing something into Spotlight or Safari and a lot of other apps and the first initial character typed doesn't show itself until the 3rd or 4th letter typed. It is really getting annoying.
    Does anyone have a fix for this?

    In the meantime, plug your USB cable into your computer. It may say "Not Charging", however, it will charge, but slowly.
     Cheers, Tom

  • Any ideas why the second HOST call does not work???

    Hi Folks.
    I have written the following code which works fine in all but one respect.
    The code creates a zip file on a server (Accessed over a network) hence the full windows network path name.
    The call to host on the server works in terms of running the zipinvoices.bat file and the zip file is generated on the server in the correct location.
    The prigram unit also generates the correctly formatted mailinvoices.bat file. However, the second call to HOST does not run/execute the mailinvoices.bat file. If I go to the server and run the mailinvoices.bat file directly, it runs perfectly and emails the file to me, no problemo.
    Why does the second call to HOST from the client machine not run?
    Any clues anyone???
    Cheers
    Simon Gadd
    PROCEDURE send_email_invoices_pu_p (p_organisation IN VARCHAR2) IS
    v_processing_cycle          CHAR(4);     
         v_alert_but                              NUMBER;
         v_error_num                              NUMBER;
         v_sent_status                     NUMBER(1);
    v_stage                                        NUMBER(1);
    v_year                                        VARCHAR2(4);
    v_month                                        VARCHAR2(9);
    v_folder_name                         VARCHAR2(25); -- Name of the file which holds the 'Printed' invoices in the receivables folder. v_organisation                    VARCHAR2(50);
    v_password                              VARCHAR2(25);
    v_organisation                    VARCHAR2(25);
         v_host_command                    VARCHAR2(100);
    v_from_name                              VARCHAR2(100);
    v_to_name                                   VARCHAR2(100);
    v_subject                                   VARCHAR2(100);
    v_error_txt                              VARCHAR2(200);
    v_file                                        VARCHAR2(200);
    v_message                                   VARCHAR2(500);
         v_line_buffer                         VARCHAR2(5000);
    v_working                                   BOOLEAN := TRUE;
    v_zipinvoices_bat               TEXT_IO.FILE_TYPE;
         v_mailinvoices_bat          TEXT_IO.FILE_TYPE;
         CURSOR c_sent_status IS
              SELECT sent
              FROM INVOICE_EMAIL
              WHERE UPPER(ORGANISATION) = UPPER(v_organisation);
         CURSOR c_select_folder IS
              SELECT folder
              FROM INVOICE_EMAIL
              WHERE UPPER(ORGANISATION) = UPPER(v_organisation);     
    CURSOR c_select_email_elements IS
    SELECT      send_to,
                        send_from
    FROM INVOICE_EMAIL
              WHERE UPPER(ORGANISATION) = UPPER(v_organisation);
    BEGIN
    v_organisation := p_organisation;
    -- Check to see if the invoices have already been e-mailed for this Procssing Cycle. If they have,
    -- then warn the user of this and get them to confirm that they wish to proceed and e-mail them again.
    -- The batch e-mail process will re-zip the invoices (ignoring a pre existing .zip file) and overwrite
    -- the existing zip file if it exists or generate it if it does not exist.
         OPEN c_sent_status;
              FETCH c_sent_status INTO v_sent_status;
         CLOSE c_sent_status;     
         IF v_sent_status = 1 THEN
              v_alert_but := SHOW_ALERT('SEND_AGAIN_ALRT');
                   IF v_alert_but = ALERT_BUTTON2 THEN RAISE FORM_TRIGGER_FAILURE;
                        ELSE NULL;
                   END IF;
         END IF;
    :CONTROL.WORKING := 'Started Zipping invoices for '||INITCAP(v_organisation)||'.'||CHR(10)||'Please wait..';
    SYNCHRONIZE;
    -- The following code opens the zipinvoices.bat file which resides in the root folder \\Ebony\c$\FCSS\DB_SCRIPTS\ and modifies it ready to
    -- zip up the invoices in the relevant organisation's invoice folder for the current processing cycle.
    v_processing_cycle := GET_CURRENT_TRAFFIC_PERIOD;
    v_month := RTRIM(INITCAP(TO_CHAR(TO_DATE(v_processing_cycle, 'MMYY'), 'MONTH')));
    v_year := (TO_CHAR(TO_DATE(v_processing_cycle, 'MMYY'), 'YYYY'));
         OPEN c_select_folder;
         FETCH c_select_folder INTO v_folder_name;
         CLOSE c_select_folder;
    KILL_OLD_ZIP_PU_P('del \\Ebony\c$\FCSS\CYCLE_DATA\'||v_processing_cycle||'\receivables\'||v_folder_name||'\invoices.zip');
    SELECT zip_password
    INTO v_password
    FROM INVOICE_EMAIL
    WHERE UPPER(ORGANISATION) = UPPER(v_organisation);
    v_zipinvoices_bat := TEXT_IO.FOPEN('\\Ebony\c$\FCSS\DB_SCRIPTS\zipinvoices.bat', 'w');
    v_line_buffer := 'cd..';
    TEXT_IO.PUT_LINE (v_zipinvoices_bat, v_line_buffer);
    v_line_buffer := 'cd..';
    TEXT_IO.PUT_LINE (v_zipinvoices_bat, v_line_buffer);
    v_line_buffer := 'wzzip -s'||v_password||' -x*.zip -ybc \\Ebony\c$\FCSS\CYCLE_DATA\'||v_processing_cycle||'\receivables\'||v_folder_name||'\invoices \\Ebony\c$\FCSS\CYCLE_DATA\'||v_processing_cycle||'\receivables\'||v_folder_name||'\*.*';
    TEXT_IO.PUT_LINE (v_zipinvoices_bat, v_line_buffer);
    v_line_buffer := 'exit';
    TEXT_IO.PUT_LINE (v_zipinvoices_bat, v_line_buffer);
    TEXT_IO.FCLOSE (v_zipinvoices_bat);
    -- The following code executes the freshly edited \\Ebony\c$\FCSS\DB_SCRIPTS\zipinvoices.bat file to produce the zipped invoices file
    -- ready to be e-mailed out to the address specified in the INVOICE_EMAIL table for the relevant organisation.
    v_host_command := '\\Ebony\c$\FCSS\DB_SCRIPTS\zipinvoices.bat';
    v_stage := 1;
    HOST (v_host_command, NO_SCREEN);
    IF NOT Form_Success THEN
         IF v_stage = 1 THEN
         :CONTROL.WORKING := 'Error -- The .zip file for '||INITCAP(v_organisation)||' was not produced.';
              SYNCHRONIZE;     
         ELSIF v_STAGE = 2 THEN
         :CONTROL.WORKING := 'Error -- The zipped invoices file for '||INITCAP(v_organisation)||' was not emailed.';
              SYNCHRONIZE;               
              END IF;     
    ELSE NULL;
    END IF;
    :CONTROL.WORKING := 'All invoices for '||INITCAP(v_organisation)||' successfully zipped.'||CHR(10)||'Attempting to send via e-mail.'||CHR(10)||'Please wait..';
    SYNCHRONIZE;
    -- The following code e-mails the freshly created .zip file for the relevant organisation and e-mails it to the
    -- recipient specified in the relevant row in the INVOICE_EMAIL programme along with from address, subject and
    -- message if specified.
    OPEN c_select_email_elements;
    FETCH c_select_email_elements INTO
    v_to_name,
    v_from_name;
    CLOSE c_select_email_elements;
    v_stage := 2;
    v_mailinvoices_bat := TEXT_IO.FOPEN('\\Ebony\c$\FCSS\DB_SCRIPTS\mailinvoices.bat', 'w');
    v_line_buffer := 'cd..';
    TEXT_IO.PUT_LINE (v_mailinvoices_bat, v_line_buffer);
    v_line_buffer := 'cd..';
    TEXT_IO.PUT_LINE (v_mailinvoices_bat, v_line_buffer);
    v_line_buffer := 'clemail -quiet -smtpserver mailhost.0800dial.com -smtpport 25 -to '||v_to_name||' -from '||v_from_name||' -subject "'||v_month||' '||v_year||' Roaming Traffic Invoices from United Clearing Ltd" -bodyfile \\Ebony\c$\FCSS\DB_SCRIPTS\invoice_body.txt -attach \\Ebony\c$\FCSS\CYCLE_DATA\'||v_processing_cycle||'\receivables\'||v_folder_name||'\invoices.zip';
    TEXT_IO.PUT_LINE (v_mailinvoices_bat, v_line_buffer);
    v_line_buffer := 'exit';
    TEXT_IO.PUT_LINE (v_mailinvoices_bat, v_line_buffer);
    TEXT_IO.FCLOSE (v_mailinvoices_bat);
    v_host_command := '\\Ebony\c$\FCSS\DB_SCRIPTS\mailinvoices.bat';
    HOST (v_host_command, NO_SCREEN);
    IF NOT Form_Success THEN
         IF v_stage = 1 THEN
         :CONTROL.WORKING := 'Error -- The .zip file for '||INITCAP(v_organisation)||' was not produced.';
              SYNCHRONIZE;     
         ELSIF v_STAGE = 2 THEN
         :CONTROL.WORKING := 'Error -- The zipped invoices file for '||INITCAP(v_organisation)||' was not emailed.';
              SYNCHRONIZE;               
              END IF;     
    ELSE NULL;
    END IF;
    UPDATE INVOICE_EMAIL
         SET sent = 1
              WHERE UPPER(ORGANISATION) = UPPER(v_organisation);
    COMMIT;
    GO_BLOCK ('INVOICE_EMAIL');
    EXECUTE_QUERY;               
    :CONTROL.WORKING := 'Please press a button on the left to e-mail invoices to the organisations listed.';
    SYNCHRONIZE;
    EXCEPTION
         WHEN OTHERS THEN
              v_error_num := SQLCODE;
              v_error_txt := SUBSTR(SQLERRM, 1, 200);
              MESSAGE('The error was: '||v_error_txt||' and the code was: '||v_error_num);
              RAISE FORM_TRIGGER_FAILURE;
    END;

    As a suggestion I'd put the Text_io segments into their own begin - exception - end sub-blocks within the main code. This way if Text_io does raise an exception you can catch it earlier as it may be able to recover - That is if it is a text_io exception.
    Other than that you;ll have to step through in Debug.

  • Why force the update?!

    Now I really feel like I'm being forced by Nokia to switch to a competitor.
    For a good while I've been avoiding Ovi suite updates, actually ever since Ovi destroyed my PC and forced me to reinstall everything, and I've been quite happily using the old version and having no issues with it.
    But not anymore, ooohh noo! Somebody in Nokia decided that this time it's upgrade or die, Ovi suite doesn't want to start anymore, it's forcing me to upgrade. I can only imagine how that's going to work. Upgrade. Destroy PC. Can't reinstall because the old version forces the upgrade. Buy an iPhone or Android phone.
    68 megs of **bleep** to be downloaded, and then we'll see...
    Seriously, why are you forcing your remaining few customers to move away from your product?

    There must be a reason for Ovi Suite to work at SOME platforms obvioulsy.
    Otherwise they would never dare to release it.
    But the programming team of Nokia workin on this Ovi Suite is way too amateurish.
    I have spent 48 hours with some sleeptime now, trying to install and use this loads of **bleep** app.
    Beacuse I wanted to have syncing my 700 contacts.
    I made it almost.
    Now. A progerammers manager should tell the programmer that there is some demands in design.
    1. The app should be installed anywhere without problems.
    That means it should NOT be dependant on imaginary files of certian versions existinng in the imagined envronment. Because they never do.
    All files needed to make this app installed properly MUST be inside the installer app.
    2. The apps position in the environment should preferaly be in ONE directory. (folder)
    If you cannot do these simple things, you shoudl not pretend to be a programmer at all.
    Nokia seems to be full of these types of guys never understanding what they are dealing with, And the manager is spendig too much time att the Nokia owners golfclub, instead of MANAGING the work.
    How did I manage to make this work? 
    Well I called the support. "shut off your windows firewall..."  Well it is not active, and has never been. Not any other firewall either. Not any virus program either except for Superantispyware. And Windows Defender which is run in a weekly basis. I have Acronis backups, but never used them. I have Win7 Ultimate (legal copy!!!)
    Firewall I have in my modem... Why bother the traffic with more delays? Just because AVG and Norton wants my money?
    If the crackers manage to put in some strange thing I usually fix it myself. I have been around PC's since 1984-85 when they first showed up in this country, With 20 mbyte harddrives large as 5.25 inch!!!  =)
    So I packed up the OVI installer and ran the install app found in Packages folder. Worked better.
    But not wel. So I thought, "these guys had PC Suite installed before they invented this OVI **bleep**"  So I installed the PC Suite first. Okay, ut worked for my old Nokia prety well, but not for the N8..  (duh)   How difficult can it be?  Here I understood one thing: OVI is all about me BUYING stuff.  For the LATEST phone. OF COURSE!!!  Phone allmost went out the window.
    I do have made a near religious promise to meself that NEVER AGAIN BUY A FINNISH PRODUCT!!!
    It reminds me about the wifes PC EEE which runs under a finnish OS: Linux... Holy **bleep** **bleep**!!!
    Finnish that too. But like this: No management at all.
    During I written this I have run the installer inside the installer again an repaired the OVI suite as it is full of bugs, hangs an crasches. It has 5mm green bar and about 95% left to do, but it has never moved.  I wonder what the hell it is waitin for?  Some windows VC80 that is too old for som OODB or some database app that "the guys" didnt understand how to talk with.   It is NET4 now, you see.... NET3 is oooold...  
    Well I managed to sync the phone with my bluetooth app, so this "Nokias moneymaker" is now out the window. Bye bye!
    Werll if you want you can always find out what error 1603 is, that shows upp 2 seconds after you run the OVI original installer. Your support did not know it.  And a support tech that is not having a programs error reporting list is just a clown.  You better understand this, if you want to grow up from that sandbox, that is....

  • My recirculating pump in sub vi simulation link doesnt work in the second iteration .It opens for maybe half a second whereas i gave the time delay for 5 secs..plz help very urgent

    Hi,
         I have attached my simulation loop.In the model attached i hav eone main pump with constant rpm which drives the 5 smaller pumps and fills the tank at the same time.As soon as the tanks reach their 90% level,the valves of the five pumps close(SP1,SP2,SP3,Sp4,Sp5).After that the recirculating pumps opens for 5 secs of the first tank.As soon as the recirculation finishes,the drain valve(SV1) for tank 1 open and the volume goes to interim storage.This happens for all the remaining tanks.
    My simulation works the first time,but when the second time the loop starts,it skips the recirculation pump even though i gave a time delay for 5 secs.Plz help ..I have attached the simulation.
    Thanks,
    Rami
    Attachments:
    Spatial Logic_2_Final.vi ‏223 KB

    Rami,
    I suspect that you have a race condition. The widespread use of local variables frequently leads to race conditions. Your subVI (Spatial Logic Sub_2.vi was not included) so I cannot run the VI. You have no way of knowing whether the subVI or the inner case structure will execute first, because there is no data dependency between them.
    I think a shift register or a few and some dataflow thinking would allow you to eliminate the inner case structure, the local variables, and, probably, most of your problems.
    Some of the SPi are indicators and some are controls. How are they used?
    The last case of the inner loop retursn to Case 1. Would case 0 be better?
    As for the second time through issue, it may be related to the Elapsed time function Auto Reset. From the help file: "Resets the start time to the value in Present (s) when the Express VI reaches the Time Target (s)." If more than 5 seconds elapses between the first time you use this and the next, it will exit immediately on the subsequent calls.
    Lynn

  • Why does a standalone program created in Labview 8.5 try connecting to the internet when the program only reads data through the serial port? Firewalls object to progams that contact the internet without permission.

    why does a standalone program created in Labview 8.5 try connecting to the internet when the program only reads data through the serial port? Firewalls object to progams that contact the internet without permission.
    The created program is not performing a command I have written when it tries to connect to the internet, it must be Labview that is doing it. How do I stop this from happening? 
    Any help would be very appreciated.

    It looks that way..
    "When LabVIEW starts it contacts the service
    locator to removes all services for itself. This request is triggering
    the firewall.This is done in case there were services that were not
    unregistered the last time LabVIEW executed- for example from VIs that
    didn't clean up after themselves"
    This is not yet fixed in LV2009.
    Message Edited by Ray.R on 11-04-2009 12:25 PM

  • Why is the MacBook Pro Serial ATA transfer speed half that of the new iMac?

    I have a MacBook Pro 2.4 GHz 15.4 inch with a Seagate Momentus 160 GB, 7200 rpm, serial ATA, PRT hard drive. This hard drive has a serial ATA transfer speed rating of 3.0 Gigabits per second. The MBP logic board has an Intel 965 chip set that has a serial transfer speed rating of 3.0 Gigabits per second. I was at the Mac Store the other day and noticed that the new iMac 20 and 24 inch computers (that have the same intel 965 chip set) have an Intel ICH8-MAHCI speed rating of 3.0 Gigabits per second. My question is why does the MacBook and MacBook Pro's only have an Intel ICH8-M AHCI speed rating of 1.5 Gigabits per second? Attached is a copy of my Serial-ATA information:
    Intel ICH8-M AHCI:
    Vendor: Intel
    Product: ICH8-M AHCI
    Speed: 1.5 Gigabit
    Description: AHCI Version 1.10 Supported
    ST9160823AS:
    Capacity: 149.05 GB
    Model: ST9160823AS
    Revision: 3.DAE
    Serial Number: 5NK03DBN
    Native Command Queuing: Yes
    Queue Depth: 32
    Removable Media: No
    Detachable Drive: No
    BSD Name: disk0
    OS9 Drivers: No
    S.M.A.R.T. status: Verified
    Volumes:
    Macintosh HD:
    Capacity: 148.73 GB
    Available: 78.21 GB
    Writable: Yes
    File System: Journaled HFS+
    BSD Name: disk0s2
    Mount Point: /
    MacBook Pro 2.4 GHz (MA896LL) W/ 4GB RAM Mac OS X (10.4.10) Seagate ST9160823AS Hard Drive

    For several reason although the main one is that the vast majority of 2.5" drives have a 1.5Gbps interfacce. Drives with a 3Gbps interface in this size are rare where as they're very common in the 3.5" drive size which is used in the iMac.
    Additionally you'll find that few drives do in fact make use of this larger bandwidth. For instance, the fastest 3.5" SATA drive one can buy for an iMac/Mac Pro up to 500GB is in fact a Western Digital Raptor 150GB which has an SATA I 1.5Gbps interface. So the interface bandwidth isn't everything. Yes there are faster drives than this now but they are in the 750GB size and up.

  • HT1349 I can not run the scanner in my main user, but only the second user and the same thing with updating apps! Why is this happening???

    I can not run the scanner in my main user, but only the second user and the same thing with updating apps! Why is this happening???

    Welcome to the Apple Community.
    Enter the details of her second account at system preferences> mail, contacts & calendars.

Maybe you are looking for

  • How to print different copies in sap Script

    Hi experts, I am developing the excise Invoice. For this I copied standard print program as Zprogram and Standard Script also.So I can change the ITCPO structure with three copies. But how to check these copies to print each copi with different headi

  • Mac OS 10.4 Address Book Contacts

    Niether the Palm Data Transfer Agent nor the MissingSync program work under Mac OS 10.4, and I do not want to pay for 10.5 when 10.6 is coming out in September.  Here is how I have found to copy all of my Address Book contacts to the Pre.  It require

  • Deferred EL in dynamic attributes

    According to the Sun Java EE 5 tutorial, using deferred EL ( #{} syntax) is forbidden for usage in a tag's dynamic attributes. What's the exact use of making this illegal? (what problem does this rule solve?) Anyway, I'm asking since I have developed

  • When converting multiple word and excel docs to a combined PDF random pages have blue background in the finalized PDF.

    I have a user using Acrobat 10. It was installed two weeks ago and initially had no problems. Today she reported that when she tries to convert multiple word and excel docs by selecting them, and right clicking on them to select convert/combine to PD

  • SD TV screen does not "fill" entirely

    I just got another "HD-DVR" box and I cannot setup my SD tv with the HDMI cable with the new box.  I had the settings all set before, but I can't get them now.  It's either a black box around the picture, or above & below, or on the left & right.  Ca