Late between two signal ?

hey, sorry for this question i think that the answer ei very simple.
I generate a squared signal with labview Vi in a fpga and with a Compact RIO module.
I have two signal with the same frequency and with the same duty cycle time.
I want to create a late between my two signal.
I will have 120° between my signals.
If you have idea for me....( the code can be implement in fpga)
Best Regards
François

Hi,
To have information abourt this forum, refer to this link:
http://forums.ni.com/ni/board/message?board.id=4170&message.id=9244#M9244
.NIDays2008 {font-family:Arial, Helvetica, sans-serif; font-size:12px; color: #065fa3; font-weight: bold; text-decoration: none; text-align: right;} .NIDays2008 a, a:hover {text-decoration: none;} .NIDays2008 a img {height: 0; width: 0; border-width: 0;} .NIDays2008 a:hover img {position: absolute; height: 90px; width: 728px; margin-left: -728px; margin-top:-12px;}
>> Avez-vous entendu parler de NI Days ?

Similar Messages

  • Better estimation of phase difference between two signals with variable frequency!

    Hello LabView Gurus, 
    Being a power engineer and having just a little knowledge of signal processing and labview, I have been pulling my hair out for the last couple of days to get a better estimation of phase difference between two signals.
    We have two analog voltage signals; 1. sine wave (50Hz ± 1Hz) and 2. a square wave with exactly half of sine wave frequency at any time.
    At the starting point of operation (and simulation/acquisition) both signals will have no phase difference. However, the square wave's frequency changes unpredictably for a just a few millisecond but then it gets synchronized with sine wave's frequency again. This means that the square wave will be phased out from its original position. The task of the labview is to find the phase difference between the two signals continuously.
    My approach to determine the phase difference is to measure the time when sine wave crosses zero amplitude and the time when the very next square wave changes amplitude from zero volts to +ve voltage (I have a 0.5volts threshold just to avoid any dramas from small line noise). The difference between these times is then divided by the time period and multiplied by 360 to get this phase difference in angles. 
    As this part is just a small block of a big project, I can only allow 5000Hz sampling rate each for both signals. I read 500 samples (which means I read data from 5 cycles of sine wave and 2.5 cycles of square wave).
    Now the problem is, as long as the frequency of sine wave stays constant at exactly 50Hz, I get a good estimation of the phase difference but when the frequency changes even a little (and it will happen in the real scenario i.e 50Hz ± 1Hz  and the square wave's frequency is dependent of sine wave's frequency), the estimation error increases.
    I have attached my labview program. From front panel, you can set the phase of square wave (between -180 and 0) and you should see the labview's calculated phase in the indicator box named 'Phase'. Then you can press 'Real Frequency' switch that would cause the frequency to change like it would in real operation.
    You can observe that the estimation error increases after you push the button. 
    All I need to do is to reduce this estimation error and make it as close to the actual phase difference as possible. Any help would be greatly appreciated.
    I am using LabView 2009 for this task.
    The application is for electric machines and the stability/performance of machines under different faults.
    Thank you for reading this far!
    Regards,
    Awais
    Attachments:
    v603.png ‏320 KB
    v603.vi ‏186 KB

    Jeff Bohrer wrote:
    Basic math gives me a bit of pause on this approach.  You are sampling at 50 times the frequency of interest so you get 50 samples per cycle.  your phase resolution is 1/50th cycle or 7.2 degrees +/- noise.  You will need to samlpe faster to reduce phase resolution or average multiple readings (at a time cost that is signifigant)
    Jeff- (Hardly Working)
    I am sampling at 100 times the sine wave's frequency and 200 times the square wave's frequency.  Increasing the sampling rate completely solves my problem. But since I am acquiring several other inputs, I cannot afford a sampling rate higher than 5kHz.
    F. Schubert wrote:
    I'm not a signal processing expert, but here my basic understanding.
    If you simulate sampling with 5kHz and a frequency of 50 Hz (and both are 'sync' by design), you always get an exact 5 periods. Any variation of your signals frequency gives you a propability to get 4 or 6 'trigger' events. That's an up or down of 20%!
    The one measure to reduce such problems is using 'window functions'. They don't fit your current approach (counting instead of a DSP algorithm), so this needs to be reworked as well.
    My approach would be to use the concept of a Locki-In amplifier. You need to phaseshift your ref-signal by 90°. Then multiply your measurement signal with the ref signal and the phase shifted ref signal. The obtained values for x/y coordinates of a complex number. Calculate the theta of the complex number (with the LV prim). Feed this in a low pass filter.
    The trick on this is, that the square wave has harmonics in it, in this you are interested in the second harmonic which is the sine wave.
    To get rid of the effect that the sync between sampling rate and ref signal frequency gives an error, you then can use the window I mentioned above (place it before the lock-in).
    For a design that really plays well, use a producer-consumer design pattern to get the calculations done in parallel with the DAQ.
    I suggest you to check on wikipedia for some of the keywords I mentioned. Go also for the external links which lead to great tutorials and AppNotes on the signal processing basics.
    Sorry, it's not a simple solution I offer and we will have quite some conversation on this forum if you follow this path. Maybe someone else knows a simpler way.
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml
    An interesting view. the sine wave can indeed be looked as a second harmonic of the square wave. I will implement your idea and get back to you as soon as I get some results. But since I have very limited knowledge of signal processing, it might take me a while to get my hear around the solution you mentioned.

  • How to find the phase difference between two signals using Hilbert transform

    hi, 
        I am new to LabView.... I am trying to find phase difference between two signals. I sucessfuly found out the phase difference between two predefined waves using single tone measurement. .... But I really want to know how can I measure phase difference between two signals( not predefined... ie we don't know the initial conditions) using hilbert transform or any transformation techniques (without using zero cross detection).. I tried by using hilbert transform based on algorithm... bt I am getting error.... plz help me
    Attachments:
    phase_differece.vi ‏66 KB

    you could try something similar to this, for each table pair that you want to compare:
    SELECT 'TABLE_A has these columns that are not in TABLE_B', DIFF.*
      FROM (
            SELECT  COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_A'
             MINUS
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_B'
          ) DIFF
    UNION
    SELECT 'TABLE_B has these columns that are not in TABLE_A', DIFF.*
      FROM (
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_B'
             MINUS
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_A'
          ) DIFF;that's assuming, column_name, data_type and data_length are all you want to compare on.

  • Can counter measure pulse width difference between two signals

    I am interested in determining the high pulse width time that two signals have when they are in various phases between eachother.

    Why don't you try one of the pulse width examples. I don't know what ADE you are using, but you can search for examples (http://www.ni.com/devzone/dev_exchange/ex_search.htm) with the key words "+pulse +width" and find several examples in different languages. This will measure the pulse width of one signal, but you can program most of the counters to do multiple tasks at the same time. Just copy the code twice and change the counter number to program counter 2 as well. If you want the ORed pulse width time, I would recommend adding a OR gate to your circuit and then feeding that into a counter.
    I hope this helps.
    Joshua

  • Measure separation between two signals that may be coincident

    Hi
    I need to determine the time period between two pulse signals. I'm going to assume for now that I can get these pulses as TTL.
    I was initially drawn to the 'Two-Signal Edge-Separation' method using two counter inputs. However, it's quite possible that the signals would be coincident some of the time. Could anyone please answer the following questions:
    If my signals were coincident, would the 'two-signal edge-separation' measurement be armed on the edge of signal 1 (= same time as edge of signal 2) and continue counting until the next edge of signal 2 as shown below? Or is it re-armed on the next edge of signal 1?
    Is there any other method I could use to log the time between my two pulses? Either as simultaneous counter outputs or something completely different (non-counter method maybe)?
    (Probably not relevant at this stage, but I will be using Measurement Studio to implement this - hardware as yet unselected).
    Thanks in advnace for any help.
    CAS
    Solved!
    Go to Solution.

    Hi CAS,
    The count is not re-armed on the next edge of signal 1 using the two-edge separation mode.  Once the counter is armed the first time, it will continue counting until signal 2 is detected.  
    Alternate Approach 1:
    If you want the count to reset on every edge of signal 1, you could configure an edge count task (counting the internal timebase) using signal 1 as the count reset terminal and signal 2 as the sample clock.  You still would have uncertainty of which signal is detected first if they occur at precisely the same time, so your measured result might be close to 0, or it might be close to 1 full period of the signal in the case that signal 1 and signal 2 are identical.
    If you wanted to remove this uncertainty, you can actually delay signal 2 by enabling the PFI filter for the signal 2 terminal.  The original intent of this feature was to be able to add a debounce filter to avoid picking up multiple edges on transitions, but a result of the implementation is that the signal is delayed by some amount of time (between the pulse width guaranteed to pass and the pulse width guaranteed to not pass).  The best case scenario would be X Series using the 100 MHz timebase, you would add 10 ns of jitter but you could delay the signal by an arbitrary amount.  So, you can add the delay and account for it in your reported values, but you would run into problems if the delay caused signal 2 to occur after the 2nd edge of signal 1 (i.e. if the signals were already close to 1 full period apart).  You'd have to have an idea of the maximum frequency of the signals as well as the maximum delay between them to determine if this would work or not.
    Alternate Approach 2:
    You could use two counters configured as edge count tasks.  Count the fastest internal timebase.  Sample the first counter off of signal 1, and the second counter off of signal 2.  If you arm the counters together and ensure that signal 1 and signal 2 start at the same time, then you can simply subtract your buffered samples of counter 1 from your buffered samples of counter 2 to get an array of differences.
    There are a number of other ways you could get similar results, but I think the above 2 suggestions are probably the easiest to implement.  Alternate Approach 1 has the advantage of still only requiring 1 counter and you don't have to worry as much with arming the counters and starting the sampling together (which could be a problem with Alternate Approach 2 if signal 1 and signal 2 are free-running).
    I would recommend X Series DAQ for this task for the following reasons:
    The count reset feature mentioned in Alternate Approach 1 is only currently available on X Series and 2nd Generation cDAQ.  It will hopefully be added in the somewhat near future to M Series with a driver update but I can't make any guarantees.
    The 100 MHz timebase on X Series gives a 10 ns resolution to your measurement.  M Series and cDAQ use an 80 MHz timebase (12.5 ns resolution), and E Series uses a 20 MHz timebase (50 ns resolution).
    X Series have the most flexible digital filters on their PFI lines and the PFI filters introduce the lowest jitter (compared to M Series and 660x that is--E Series devices do not have digital filters at all).
    You didn't mention what frequency you would be using, but X Series have on-board FIFOs which will help you avoid errors from samples being overwritten if your external frequency is relatively fast.
    X Series are priced similarly to their M Series equivalents.  All X Series have the same counter features with the lowest cost X Series being the PCIe-6320.
    Best Regards,
    John Passiak

  • How can i compute the time elapsed between two pulses or the period of an encoder signal if I dont have a constant rpm?

    I need to compute the rpm of an engine using information from an optical encoder attached to it. the engine is running in transient mode so the encoder pulse doesnt have a constant frequency. I need to get the period betwwen two rising or falling edges using DAQmx.
    Any ideas?

    Using an M Series or TIO device you can measure the period between two edges (on two different signals) using the two edge separation measurement.  I'm assuming that you don't want to use position measurement because the frequency is varying so much?  If not, you may be able to set the sample clock period short enough that you get a decent average RPM measurement.
    gus....

  • Measuring propagatio​n delay of a signal between two measuremen​t points!

    Hello,
    I am measuring propagation of an acceleration signal (ACC) between 2 measuring points (sensors).With 51.2 [kS/s] sampling rate the resolution is 19.5 [us]. I can count delay's samples "manually", but can this be automated with sufficient certainty?
    Thanks in advance,

    golubovski,
    with that few information bits you provided Gerd,johnsold and craig already provided a lot of information
    Here are some more hints:
    Of course you can filter the signals! If you apply the same (linear) filter on both signals the phase delay will be the same, so the delay you will measure between the two signals.
    And there are filter with zero phase shift (FIR)  or you can apply a filter with phase shift , inverse the data array and apply the same filter again.. -> no phase shift
    You can increase the resolution to subsample by fitting a peak on the autocorrelation or
    Do an phase delay measurement in the frequency domain...  I just did that to measure the dispersion of sound in a titan rod ...
    BUT all of that involves a basic understanding of signal theory or to stay with your example: All parts for your (software) Ferrari are there and some hints on how to put it together are given. However without understanding what you do you will crash.
    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 ǝɥʇ'

  • Signalling between two Windows

    I am not sure how to signal between two Windows created in the same Thread.
    Suppose I have two Windows, WindowA and WindowB (either is a descendent from the Window hierarchy - ie. JFrame, JDialog, etc.).
    WindowB can be instantiated with different parameters that cause it to look different.
    I want to do something like this in a method in my WindowA class: (pseudo-code)
    for int 1 to n
    hide this window; (i.e. WindowA)
    instantiate and display a new WindowB object (with xxxxx parameters)
    wait for WindowB to signal this WindowA object that it should
    now create a new WindowB object and display that new object
    somewhere in Class code for WindowB
    signal WindowA;
    How do I set up a "wait and signal" between the two Windows? Without it, WindowA will keep going through the for loop creating new Windows immediately -> I would like it to wait until WindowB signals that it is ok to do so.
    Thanks for any help.
    -TJW

    Here's an example:
    class CreateWindows {
         int count = 0;
         int limit = 5;
         public CreateWindows(int limit) {
              this.limit = limit;
              create();
         void create() {
              if (++count < limit) {
                   new WindowA(new SignalListener() {
                        public void signal() {
                             create();
    interface SignalListener {
         void signal();
    class WindowA {
         public WindowA(SignalListener listener) {
              // do things
              listener.signal();

  • Dist between two lat/long's in USA

    Hello,
    Can anyone please give me the function(Oracle or some other function) to find the distance between two points(Both of them are in lat/longs). Both the points are within the boundary of US.
    Thanks,

    Hi,
    In Oracle 8.1.6, we have Beta support
    for Coordinate Systems. There is
    Beta users guide available under PRODUCTS/SPATIAL.
    With this functionality, you can calculate
    the distance between two points
    very accuratly.
    Here is an example. I will go into details
    below. Hope this helps. Thanks.
    Dan
    ======
    SAMPLE SQL: (sorry about the formatting)
    select
    mdsys.sdo_geom.sdo_length (
    mdsys.sdo_cs.transform (
    mdsys.sdo_geometry (2002, 8307, null,
    mdsys.sdo_elem_info_array (1,2,1),
    mdsys.sdo_ordinate_array (
    -73.983014309,
    40.749544981,
    a.geometry.sdo_point.x,
    a.geometry.sdo_point.y)),
    MDSYS.SDO_DIM_ARRAY(
    MDSYS.SDO_DIM_ELEMENT(
    'X', -180, 180, .00000005),
    MDSYS.SDO_DIM_ELEMENT(
    'Y', -90, 90, .00000005)),
    41004),
    .00000005) * 6.213712e-04 DISTANCE_IN_MILES
    from test_abi a
    where
    mdsys.sdo_nn (
    a.geometry,
    mdsys.sdo_geometry (
    1, 8307,
    mdsys.sdo_point_type (-73.983014309,
    40.749544981,
    null),
    null, null),
    'SDO_NUM_RES = 1') = 'TRUE';
    DESCRIPTION:
    ============
    1) The above query is returning the
    nearest point to
    (-73.983014309, 40.749544981)
    and also returning the distance in miles.
    TEST_ABI.geometry is stored in
    longitude/latitude with 8307
    as the SRID.
    Note, if you set the SRID in the
    SDO_GEOMETRY object, you must also
    set the SRID in USER_SDO_GEOM_METADATA.
    To find out more info on SRID 8307,
    you can execute the following:
    select wktext
    from mdsys.cs_srs
    where srid = 8307;
    SDO_NN is the operator used to find
    the nearest neighbor.
    For nearest neighbor queries, you
    may want to try using RTREE indexes,
    also Beta in 8.1.6.
    To create an RTREE index, omit
    SDO_LEVEL and SDO_NUMTILES from
    the create index statement of your
    spatial index.
    We plan to fully profile RTREE indexes
    in 8.1.7 and recommend them when
    appropriate. Nearest neighbor is an
    excellent candidate for an RTREE index.
    2) In the SELECT clause, we are calling
    two functions:
    SDO_LENGTH
    SDO_CS.TRANSFORM
    The first argument passed into SDO_LENGTH
    is the return value from
    CS_TRANSFORM (which will be a
    projected SDO_GEOMETRY object).
    The second argument to SDO_LENGTH
    is an SDO_TOLERANCE.
    3) The first argument to CS_TRANSFORM
    is an SDO_GEOMETRY constructor for a
    line string, where the first point of
    the linestring is
    (-73.983014309, 40.749544981),
    and the second point is the nearest
    neighbor resulting from SDO_NN.
    This goal here is to project the
    linestring so we can get an accurate
    result from SDO_LENGTH.
    The second argument to CS_TRANSFORM
    a dim_array.
    The third argument to CS_TRANSFORM
    is the target SRID. In this example,
    SRID 41004 is used. This will be
    fairly accurate for the continental US.
    The geometry constructor for the
    linestring will be projected to
    SRID 41004.
    If more accurate results are desired,
    you should use an SRID that corresponds
    to a specific state plane projection.
    Query the WKTEXT column in MDSYS.CS_SRS
    to pick appropriate SRID's for projection.
    i.e. If I knew my nearest neighbor result
    is going to be in Georgia, I might
    use SRID 1001 instead of 41004.
    4) In the result of the select list, I am
    multiplying by 6.213712e-04,
    the conversion factor from meters to
    miles.
    Hope this helps. Thanks.
    Dan

  • The measurement of the phase between two sine signals with NI 6251

    Hi, I am working with NI 6251. I need to measure the phase between two sine signals. I used "Tone Measurements" on each signal and then substracted there phases, but the result was  incorrected. Please, help me to solve this problem.

    You should have a look at the Signal Processing VIs
    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!

  • Unable to find line break between two lines in attachment file.

    Dear all I will be very great full if someone help me out,
    I am trying to send mail through SMTP server with an attachment of oracle report, but I am unable to find line break between two lines, when I down load the attachment from mail and open attach.txt file by double click on it. Next line starts right after previous line ends, it should starts with new line.
    In order to send an attachment file, I am reading source file line by line and put MIME protocol’s attachment instance, contain of source file is being properly written into target file if I open that attachment on cmd prompt.
    Following code may help you to understand the case.
    Thanks in advance.
    My code is as follows:-
    create or replace procedure bec_file_test
    v_subject varchar2, -- Subject of the email
    v_body varchar2, -- Body of the email
    v_from VARCHAR2 default 'XYZ.com', -- sender mail id
    v_to varchar2 default 'XYZ.com', -- Field To of the email
    v_cc varchar2 default 'XYZ.com' -- cc address
    ) is
    -- variable to hold the smtp server connection
    v_smtp_connection utl_smtp.connection;
    -- variable to hold the smtp host name
    v_smtp_host varchar2(100) default 'mail.bec-group.com';
    -- variable to hold the smtp port
    v_smtp_port number default 25;
    -- composite of {CR}{LF} caridge return and line feed.
    CRLF varchar2(2):=CHR(13)||CHR(10);
    cursor pr_rec is
    select requisition_no,line_no,release_no,a.contract,
    a.project_id,substr(a.activity_seq,1,11)ACT_SEQ,
    substr(a.part_no,1,12)PART_NO,
    substr(a.description,1,32)DESCRIPTION,
    substr(a.Bal_qty,1,8) BAL_QTY,
    substr(a.unit_meas,1,5)UOM,
    a.wanted_receipt_date WAN_REC_DT,
    a.latest_order_date LAT_ORD_DT
    from bec_pr_line_rep a
    where a.Bal_qty>0 and a.header_state not in 'Closed'
    and upper(a.state1) like 'RELEASED' and a.contract not in ('U1ENG','ULENG','U1FND','U2FND')
    and a.buyer_code='70306'
    order by a.part_no;
    begin
    declare
    fHandle UTL_FILE.FILE_TYPE;
    v_msg_line varchar2(2000);
    -- v_buffer varchar2(20000);
    --ALTER SYSTEM SET utl_file_dir = 'D:\Database\temp'
    --COMMENT='Temporary change on Dec 14'
    --SCOPE=SPFILE;
    SELECT name, value
    FROM gv$parameter
    WHERE name = 'utl_file_dir';
    --drop directory my_directory
    --CREATE or replace DIRECTORY my_directory AS 'D:\database\temp';
    --GRANT read,write ON DIRECTORY my_directory TO PUBLIC;
    begin ---writing data into a file.
    fHandle := UTL_FILE.FOPEN('MY_DIRECTORY', 'pending_pr_summry.txt', 'w');
    UTL_FILE.put_line(fHandle, ' Pending PR to process (detail report)');
    UTL_FILE.put_line(fHandle,TO_CHAR(SYSDATE,'MM-DD-YY HH:MI:SS AM'));
    UTL_FILE.put_line(fHandle, '--------------------------------------------------------------------------------------------------------------------------------------------------');
    UTL_FILE.put_line(fHandle, 'Req.no. li Re Site Prj Id Act seq Part no Description Qty UOM want rec dt lat ord dt' );
    UTL_FILE.put_line(fHandle, '--------------------------------------------------------------------------------------------------------------------------------------------------');
    for pr_temp in pr_rec loop
    begin
    v_msg_line:=to_char(rpad(pr_temp.requisition_no,12,' ')||'|'||
    lpad(pr_temp.line_no,3,' ')||'|'||
    lpad(pr_temp.release_no,3,' ')||'|'||
    rpad(pr_temp.contract,7,' ')||'|'||
    lpad(nvl(pr_temp.project_id,' '),7,' ')||'|'||
    lpad(nvl(pr_temp.act_seq,' '),12,' ')||'|'||
    lpad(pr_temp.part_no,12,' ')||'|'||
    rpad(pr_temp.description,35,' ')||'|'||
    lpad(pr_temp.bal_qty,10,' ')||'|'||
    rpad(pr_temp.uom,6,' ')||'|'||
    lpad(pr_temp.wan_rec_dt,14,' ')||'|'||
    lpad(pr_temp.lat_ord_dt,14,' '));
    UTL_FILE.put_line(fHandle,v_msg_line);
    end;
    end loop;
    UTL_FILE.put_line(fHandle, '--------------------------------------------------------------------------------------------------------------------------------------------------');
    UTL_FILE.put_line(fHandle, ' Regards : IFSAPP ( Application owner ) ');
    UTL_FILE.FCLOSE(fHandle); ------------writing into file is successfuly done here!
    --Reading of file starts here containt will be added in attchment file
    fHandle :=UTL_FILE.FOPEN('MY_DIRECTORY','pending_pr_summry.txt','R' );
    -- establish the connection to the smtp server
    v_smtp_connection := utl_smtp.open_connection(v_smtp_host, v_smtp_port); /** OPEN CONNECTION ON THE SERVER **/
    -- perform a handshake with the smtp server
    utl_smtp.helo(v_smtp_connection, v_smtp_host); /** DO THE INITIAL HAND SHAKE **/
    -- set the 'from' address of the message
    utl_smtp.mail(v_smtp_connection, v_from);
    -- add the recipient to the message
    utl_smtp.rcpt(v_smtp_connection, v_to);
    -- send the email
    utl_smtp.open_data(v_smtp_connection);
    v_msg_line:='Date: ' || TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' ) || CRLF ||
    'From: ' || v_from || CRLF ||
    'Subject: ' || v_subject || CRLF ||
    'To: ' || v_to || CRLF ||
    'Cc: ' || v_cc || CRLF ||
    'MIME-Version: 1.0'|| CRLF || -- Use MIME mail standard
    'Content-Type: multipart/mixed;'||CRLF ||
    ' boundary="-----SECBOUND"'||CRLF||
    CRLF ||'-------SECBOUND'|| CRLF ||
    'Content-Type: text/plain;'|| CRLF ||
    'Content-Transfer_Encoding: 7bit'|| CRLF ||
    CRLF ||v_body|| CRLF;     -- Message body
    utl_smtp.write_data(v_smtp_connection,v_msg_line);
    v_msg_line:='-------SECBOUND'|| CRLF ||
    'Content-Type: application/octet-stream;'|| CRLF ||
    'Content-Type: text/plain;'|| CRLF ||
    'name="pending_pr_summry.txt"'|| CRLF ||
    'Content-Transfer_Encoding: 8bit'|| CRLF ||
    'Content-Disposition: attachment;'|| CRLF ||
    ' filename="pending_pr_summry.txt"'|| CRLF || CRLF;     -- Content of attachment
    utl_smtp.write_data(v_smtp_connection,v_msg_line);
    -- check file is opened
    IF utl_file.is_open(fHandle) THEN
    -- loop lines in the file
    LOOP
    BEGIN -- Content of attachment
    utl_file.get_line(fHandle,v_msg_line);
    v_msg_line:=concat(v_msg_line,CRLF);
    utl_smtp.write_data(v_smtp_connection,v_msg_line);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    EXIT;
    END;
    END LOOP;
    END IF;
    --end of attachment containt     
    utl_smtp.write_data(v_smtp_connection,v_msg_line);
    UTL_FILE.FCLOSE(fHandle);
    utl_smtp.close_data(v_smtp_connection);
    utl_smtp.quit(v_smtp_connection);
    exception
    when utl_smtp.invalid_operation then
    dbms_output.put_line(' Invalid Operation in Mail attempt using UTL_SMTP.');
    when utl_smtp.transient_error then
    dbms_output.put_line(' Temporary e-mail issue - try again');
    when utl_smtp.permanent_error then
    dbms_output.put_line(' Permanent Error Encountered.');
    when others then
    dbms_output.put_line('Exception: SQLCODE=' || SQLCODE || ' SQLERRM=' || SQLERRM);
    RAISE;
    end;
    end bec_file_test;

    Pending PR to process (detail report)01-17-13 12:43:19 PM--------------------------------------------------------------------------------------------------------------------------------------------------Req.no. li Re Site Prj Id Act seq Part no Description Qty UOM want rec dt lat ord dt--------------------------------------------------------------------------------------------------------------------------------------------------MAT/250370 | 2| 1|ISCSP | 4977| 100004207| 0104000016|Angle 50 X 50 X 6 IS:2062 Grade |500|kg |30-NOV-2012| 20-nov-2012MAT/250370 | 3| 1|ISCSP | 4977| 100004207| 0105000002|Channel 100 X 50 IS:2062 Grade A | 1000|kg | 30-NOV-2012| 20-nov-2012MAT/250579 | 2| 1|NMDCJ | 6001| 100005580| 0109020002|TMT Bar 10 mm Fe 415 IS:1786 | 2991|kg | 13-DEC-2012| 03-dec-2012MAT/250606 | 2| |NMDCJ | 6002| 100005860| 0109020002|TMT Bar 10 mm Fe 415 IS:1786 | 4500|kg | 29-DEC-2012| 19-dec-2012MAT/250607 | |1|NMDCJ|6001|100005580| 0109020002|TMT Bar 10 mm Fe 415 IS:1786 | 1500|kg | 29-DEC-2012| 19-dec-2012MAT/250194 | 3| 1|NMDCJ | 6002| 100005818| 0109020002|TMT Bar 10 mm Fe 415 IS:1786 | 3939|kg | 29-DEC-2012| 19-dec-2012MAT/250606 | 4| 1|NMDCJ | 6002| 100005860| 0109020004|TMT Bar 16 mm Fe 415 IS:1786 | 39000|kg | 29-DEC-2012| 19-dec-2012MAT/250607 | 4| 1|NMDCJ | 6001| 100005580| 0109020004|TMT Bar 16 mm Fe 415 IS:1786 | 17500|kg | 29-DEC-2012| 19-dec-2012MAT/250194 | 2| 1|NMDCJ | 6002| 100005818| 0109020004|TMT Bar 16 mm Fe 415 IS:1786 | 12183|kg | 29-DEC-2012| 19-dec-2012MAT/250606 | 6| 1|NMDCJ | 6002| 100005860| 0109020006|TMT Bar 25 mm Fe 415 IS:1786 | 9500|kg | 29-DEC-2012| 19-dec-2012MAT/250607 | 6| 1|NMDCJ | 6001| 100005580| 0109020006|TMT Bar 25 mm Fe 415 IS:1786 | 4500|kg | 29-DEC-2012| 19-dec-2012MAT/250194 | 6| 1|NMDCJ | 6002| 100005818| 0109020006|TMT Bar 25 mm Fe 415 IS:1786 | 17500|kg | 29-DEC-2012| 19-dec-2012MAT/250607 | 7| 1|NMDCJ | 6001| 100005580| 0109020008|TMT Bar 32 mm Fe 415 IS:1786 | 22000|kg | 29-DEC-2012| 19-dec-2012MAT/250194 | 7| 1|NMDCJ | 6002| 100005818| 0109020008|TMT Bar 32 mm Fe 415 IS:1786 | 27060|kg | 29-DEC-2012| 19-dec-2012MAT/251138 | 1| 1|NMDCJ | 6002| 100005825| 3501000001|Cement 50 kg | 1|pkt | 25-DEC-2013| 14-dec-2013--------------------------------------------------------------------------------------------------------------------------------------------------
    where as source file is like that:-
    Pending PR to process (detail report)
    01-17-13 12:43:19 PM
    Req.no. li Re Site Prj Id Act seq Part no Description Qty UOM want rec dt lat ord dt
    MAT/250370 | 2| 1|ISCSP | 4977| 100004207| 0104000016|Angle 50 X 50 X 6 IS:2062 Grade | 5500|kg | 30-NOV-2012| 20-nov-2012
    MAT/250370 | 3| 1|ISCSP | 4977| 100004207| 0105000002|Channel 100 X 50 IS:2062 Grade A | 1000|kg | 30-NOV-2012| 20-nov-2012
    MAT/250579 | 2| 1|NMDCJ | 6001| 100005580| 0109020002|TMT Bar 10 mm Fe 415 IS:1786 | 2991|kg | 13-DEC-2012| 03-dec-2012
    MAT/250606 | 2| 1|NMDCJ | 6002| 100005860| 0109020002|TMT Bar 10 mm Fe 415 IS:1786 | 4500|kg | 29-DEC-2012| 19-dec-2012
    MAT/250607 | 2| 1|NMDCJ | 6001| 100005580| 0109020002|TMT Bar 10 mm Fe 415 IS:1786 | 1500|kg | 29-DEC-2012| 19-dec-2012
    MAT/250194 | 3| 1|NMDCJ | 6002| 100005818| 0109020002|TMT Bar 10 mm Fe 415 IS:1786 | 3939|kg | 29-DEC-2012| 19-dec-2012
    MAT/250606 | 4| 1|NMDCJ | 6002| 100005860| 0109020004|TMT Bar 16 mm Fe 415 IS:1786 | 39000|kg | 29-DEC-2012| 19-dec-2012
    MAT/250607 | 4| 1|NMDCJ | 6001| 100005580| 0109020004|TMT Bar 16 mm Fe 415 IS:1786 | 17500|kg | 29-DEC-2012| 19-dec-2012
    MAT/250194 | 2| 1|NMDCJ | 6002| 100005818| 0109020004|TMT Bar 16 mm Fe 415 IS:1786 | 12183|kg | 29-DEC-2012| 19-dec-2012
    MAT/250606 | 6| 1|NMDCJ | 6002| 100005860| 0109020006|TMT Bar 25 mm Fe 415 IS:1786 | 9500|kg | 29-DEC-2012| 19-dec-2012
    MAT/250607 | 6| 1|NMDCJ | 6001| 100005580| 0109020006|TMT Bar 25 mm Fe 415 IS:1786 | 4500|kg | 29-DEC-2012| 19-dec-2012
    MAT/250194 | 6| 1|NMDCJ | 6002| 100005818| 0109020006|TMT Bar 25 mm Fe 415 IS:1786 | 17500|kg | 29-DEC-2012| 19-dec-2012
    MAT/250607 | 7| 1|NMDCJ | 6001| 100005580| 0109020008|TMT Bar 32 mm Fe 415 IS:1786 | 22000|kg | 29-DEC-2012| 19-dec-2012
    MAT/250194 | 7| 1|NMDCJ | 6002| 100005818| 0109020008|TMT Bar 32 mm Fe 415 IS:1786 | 27060|kg | 29-DEC-2012| 19-dec-2012
    MAT/251138 | 1| 1|NMDCJ | 6002| 100005825| 3501000001|Cement 50 kg | 1 |pkt | 25-DEC-2013| 14-dec-2013
    Ignore alignment. It is well formatted in source file.

  • Sharing One iPhoto Database Between Two Accounts

    Below is a reply to a question I have regarding sharing photos with my wife on the same Mac. I would like for us both to able to upload, edit, and use photos from the same iPhoto database. Do all of the buggaboos listed in the reply below still apply?
    Thanks,
    Jim
    Re: Sharing Photo's on the same iMac between two user accounts
    Posted: Jun 2, 2009 8:27 AM in response to: Thomas Harrigan Solved
    Tom
    For iPhoto 09 (version 8.0.2) and later:
    What you mean by 'share'.
    If you want the other user to be able to see the pics, but not add to, change or alter your library, then enable Sharing in your iPhoto (Preferences -> Sharing), leave iPhoto running and use Fast User Switching to open the other account. In that account, enable 'Look For Shared Libraries'. Your Library will appear in the other source pane.
    Any user can drag a pic from the Shared Library to their own in the iPhoto Window.
    Remember iPhoto must be running in both accounts for this to work.
    If you want the other user to have the same access to the library as you: to be able to add, edit, organise, keyword etc.
    Quit iPhoto in both accounts. Move the Library to the Users / Shared Folder
    (You can also use an external HD set to ignore permissions, a Disk Image or even partition your Hard Disk.)
    In each account in turn: Double click on the Library to open it. (You may be asked to repair the Library Permissions.) From that point on, this will be the default library location. Both accounts will have full access to the library, in fact, both accounts will 'own' it.
    However, there is a catch with this system and it is a significant one. iPhoto is not a multi-user app., it does not have the code to negotiate two users simultaneously writing to the database, and trying will cause db corruption. So only one user at a time, and back up, back up back up.
    Regards
    TD

    No. All the folks who post here are just Users, like you.
    Regards
    TD

  • How do i share iPhoto library between two user accounts

    I need to share my iphoto pictures between two accounts on the same computer

    For iPhoto 09 (version 8.0.2) and later:
    What you mean by 'share'.
    If you want the other user to be able to see the pics, but not add to, change or alter your library, then enable Sharing in your iPhoto (Preferences -> Sharing), leave iPhoto running and use Fast User Switching to open the other account. In that account, enable 'Look For Shared Libraries'. Your Library will appear in the other source pane.
    Any user can drag a pic from the Shared Library to their own in the iPhoto Window.
    Remember iPhoto must be running in both accounts for this to work.
    If you want the other user to have the same access to the library as you: to be able to add, edit, organise, keyword etc.
    Quit iPhoto in both accounts. Move the Library to the Users / Shared Folder
    (You can also use an external HD set to ignore permissions, a Disk Image or even partition your Hard Disk.)
    In each account in turn: Double click on the Library to open it. (You may be asked to repair the Library Permissions.) From that point on, this will be the default library location. Both accounts will have full access to the library, in fact, both accounts will 'own' it.
    However, there is a catch with this system and it is a significant one. iPhoto is not a multi-user app., it does not have the code to negotiate two users simultaneously writing to the database, and trying will cause db corruption. So only one user at a time, and back up, back up back up.

  • OBIEE 11G - Issue passing parameters between two reports

    Hi folks,
    I am struggling to pass parameters between two reports in OBIEE 11G.
    My first report contains the following columns: Rolling Year Type (VCHAR), Year(VCHAR), Month(VCHAR), Cost(Double).
    My second report contains the following columns: Rolling Year Type(VCHAR), Year(VCHAR), Month(VCHAR), Category(VCHAR), Cost(Double).
    My requirement is to pass the Rolling Year Type, Year and Month values from report 1 to report 2.
    On the Month column properties of report 1, I have created an Action Link called 'Drill to Category'. I have clicked on 'Navigate to BI Content' and selected Report 2.
    Then on Report 2, I have included three filters: Rolling Year Type is prompted, Year is prompted, Month is promted.
    When I run the report I always get the following error:
    The specified criteria didn't result in any data. This is often caused by applying filters and/or selections that are too restrictive or that contain incorrect values. Please check your Analysis Filters and try again. The filters currently being applied are shown below.
    When I check the cursor cache, the filter values are correct. Does anybody have any idea why Report 2 does not display?
    When I remove the Month filter, the report works correctly.
    I have since changed the third filter to be Month No and although Report 2 does display, it does not pick up the filter on the Month No.
    I initially thought this may have been a caching issue and so I have disabled BI Server Cache but this does not fix my problem.
    This was never an issue on OBIEE 10G as I found it very easy to navigate between two requests.
    Has anyone else experienced problems with passing parameters between two request in 11G?
    Any help appreciated.
    Thanks
    Gavin

    Hi,
    I once tried this kind of requirement(with dashboard prompts though) and hit at similar issue. I later found out that the problem is with the space in the parameter values. Can you please let me know, if the same is the case with you?
    Suppose the parameter passed is "Jan 2010", but the report on the destination takes the value as "Jan" & "2010". Yes, it kind of split the parameter value to two based on space. I think we can notice the filters the destination report got, by enabling filter view.
    In this case, since you pass only value at a time, could you try placing the parameter value anyway in double quotes? I think the Server then will understand it as one value.
    Thank you,
    Dhar

  • Trying to understand problems that occur when redistributing between two OSPF processes

    Hi all, I'm currently brushing up on my OSPF and trying to understand the problems that can occur when redistributing between two OSPF processes. I have read and understand (I think!) the issues caused by the fact that the same route submitted by two different OSPF processes may not necessarily follow the OSPF rules that one would expect - for example, OSPF preferring intra-area routes to inter-area routes to external routes, but only within the same process. So, if the same route is submitted from two different processes, that rule goes out the window.
    But I'm having some difficulty getting my head around the idea of setting the administrative distance lower in one OSPF process to prefer one domain over the other. I just can't quite follow the example described in this document:
    http://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/4170-ospfprocesses.html#twored
    Specifically, in figure 4 where two external networks - external network "N" originating in OSPF domain 1, and external network "M" originating in OSPF domain 2 - are redistributed via two ASBRs. The explanation states:
    This sequence of events could occur occur:
    Router A (Router B) redistributes M into Domain 1, and external M will reach Router B (Router A).
    Because the administrative distance of Domain 1 is lower than Domain 2, Router A (Router B) will install M through Domain 1 and will set to maxage its previous originated LSA (event 1) into Domain 1.
    Because M has been set to maxage in Domain 2, Router A (Router B) will install M though Domain 2 and, therefore, will redistribute M into Domain 2.
    Same as event 1.
    I can't quite work my way through this. I guess it must have something to do with the redistribution of "M" from domain 2 into domain 1 being learned by both ASBRs due to the lower administrative distance assigned to external routes in domain 1, and the original routes through domain 2 being deleted, but then I can't follow the rest of the description. And I can't understand why this would be a problem for network "M" in OSPF domain 2, but NOT for network "N" in OSPF domain 1.
    Any explanation gratefully received!
    Thanks, Graham

    Hello.
    You are right - whenever A and B learns about "M" from Domain 2, they craft LSA for domain 1 and inject it simultaneously. They learn each other's LSAs simultaneously and withdraw (set timer to 3600) for previous LSAs. And it might flap infinitely.
    If they don't learn LSA simultaneously (let's say that A is much faster then B), then there will be no flaps, but B would learn all Domain 2 routes (not just redistributed) via Domain 1.
    And later you will observe routing loop (when you stop advertising M from D): A knows "M" from Domain 2 and injects into Domain 1, B knows from A via Domain 1 and injects into Domain 2... so "M" stays in the routing tables due to mutual redistribution.
    You don't have similar (flap) issue with network "N", because admin distance is lower for Domain 1, so both routers would never prefer OSPF via Domain 2! But having no issue with route flaps, you still will observe routing loop if you stop advertising "N" from C.

Maybe you are looking for

  • Can we automate importing certificate using keytool

    Hi, One of my application's requirement is to have a digital certificate at client side. Client performs the following tasks during the deployment of the application. 1.Takes certificate from authorized CA 2. Exports digital certificate as a cer file

  • Centering a Flash website?

    Hello all, I am very new to Flash, but I have created a new webpage using Adobe Flash CS5.5, and there are a few things I am unsure about, one of them being centering the flash document on a webpage. My project is 1000x563 pixels big, and when I hit

  • Recently bought an LG 3D tv and an LG 3d Blue Ray player but am having problems with my setup

    I bought a 47LA6200 TV and a BP530 blue ray player. I have my cable box hooked up to HDMI 1, I have my blue ray hooked up to HDMI 2, and my XBox 360 to HDMI 3. I have my cable box hooked up to my older JVC RX880V stereo digital optical to digital opt

  • Struts Page Flow Diagram

    I am using JDeveloper 10.1.2. When I drag and drop a component onto the Struts Page Flow diagram, nothing is placed on the diagram. I've checked the thumbnail and there are no components on it. I followed some instructions I found in a previous post

  • RE: ST06 display

    Hi all, When i execute ST06 transaction code, it's not showing any enteries under 'cpu utilization'. saposcol is running. We have upgraded SAP from ECC 5.0 to ECC 6.0 and the version of saposcol is 700 with patch level 113. How do i solve this proble