I need tips on programming a 6602 counter/timer

I am new to Labview but have been a command line programmer for some time.  I have a 6602 card in a PXI system.  I would like to use the internal clock of the 6602 to control the delivery of triggers to various instruments.  These triggers need to be both user inputted and optionally scanned in time.  Eventually, I will trigger the 5112 NI scope board to recieve signal and plot to the screen. 

Darrin,
There are a lot of terrific LabVIEW examples that ship with the
NI-DAQmx driver that are compatible with the PXI-6602.  These
include counter examples as well as pulse train generation
examples.  For example, some of these that would be great to looks
at can be found by opening the NI Example Finder (Help >> NI
Example Finder).  Under the Browse tab, navigate to Hardware Input
and Output >> DAQmx >> Generate Digital Pulses.
There are also shipping examples that show how to use a common signal
between boards.  Most of these examples share clocks, but you
could also apply this to triggering.  These are found in: Hardware
Input and Output >> DAQmx >> Synchronization >>
Multi-Device and Hardware Input and Output >> DAQmx >>
Synchronization >> Multi-Function
There are also a lot of great examples, DevZone posts, and tutoirals
that you can find on our website by searching for various keywords like
6602, synchronization, triggering. etc.
One example that shows how to export a digital signal from one board
and use it on another board via the RTSI lines that are built into the
backplane of the PXI chassis can be seen here.
Hopefully this gives you a good place to start!
Regards,
Doug Mumford
Applications Engineer
National Instruments
Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me

Similar Messages

  • NI 6602 counter/timer card

    Hi,
    following question:
    i am using the x4 encoder application on an ni 6602 card.
    and also i am using a gated signal generation on it.
    both things are working without any problem.
    My intention is to read the counter value of the encoder on every rising
    edge of the signal and write the value into an array in the pcmemory.
    Is this possible, how?
    Is it possible to create an interupt on rising edge, and signal the
    programm, >read the encoder reader value
    I'm using the 6602 card with the HDDK in Linux, well i also have the
    register level manual.
    Thanks a lot
    Mario
    Mario Behn
    345 Lincoln Avenue Apt. 1025
    Amherst, MA, USA
    Tel.: +1-413-546-6656

    Hello,
    thanks for your answer, well my problem is slightly different, so let me
    explain:
    I got from NI the following the files for the NI 6602 Counter/Timer Card to
    work with Linux:
    http://sine.ni.com/apps/we/nioc.vp?cid=11737⟨=US
    one is the common driver.
    The other are the sample programms.
    However, every programm except the one which uses the
    interupt/dma works(gpct_ex8.cpp).
    Here is the errormessages:
    [root@proto OSinterface]# ls
    gpct_ex1.cpp gpct_ex4.cpp gpct_ex7.cpp osiBus.cpp osiUserCode.cpp
    tTIO.cpp
    gpct_ex2.cpp gpct_ex5.cpp gpct_ex8.cpp osiBus.h trace.h
    tTIO.h
    gpct_ex3.cpp gpct_ex6.cpp gpct_ex9.cpp osiTypes.h tStatus2.h
    tTIO.ipp
    [root@proto OSinterface]# g++ gpct_ex8.cpp osiBus.cpp osiUserCode.cpp
    tTIO.cpp
    In file included from osiBus.h:9,
    from gpct_ex8.cpp:15:
    osiTypes.h:39:1: warning: "NULL" redefined
    In file included from /usr/include/_G_config.h:14,
    from /usr/include/libio.h:32,
    from /usr/include/stdio.h:72,
    from gpct_ex8.cpp:14:
    /usr/lib/gcc-lib/i386-redhat-linux/3.2/include/stddef.h:366:1: warning: this
    is
    the location of the previous definition
    gpct_ex8.cpp: In function `void test(iBus*)':
    gpct_ex8.cpp:112: `class tTIO' has no member named `G0_DMA_Control_Register'
    gpct_ex8.cpp:113: `class tTIO' has no member named `G0_DMA_Control_Register'
    gpct_ex8.cpp:136: `class tTIO' has no member named `G0_DMA_Status_Register'
    gpct_ex8.cpp: In function `void gpct_ISR(tTIO*)':
    gpct_ex8.cpp:154: `class tTIO' has no member named `G0_DMA_Status_Register'
    [root@proto OSinterface]#
    So the question is, when there is a general driver system and example
    programms, than they should work?
    Who can help my with this ?
    If you can't, could you forward my question at NI to someone, who is
    responsible for the Measurement Hardware Driver Development Kit (DDK) and
    can help me?
    I have Redhat-Linux 8.0 and kernel 2.4.18.
    Thank you
    Mario Behn
    ----- Original Message -----
    From: "Sastry V."
    Newsgroups: natinst.public.daq.general
    Sent: Friday, January 10, 2003 16:44
    Subject: Re: NI 6602 counter/timer card
    > Hi Mario,
    >
    > I would like to tell first that interrupts do not work with PCI-6602.
    >
    > I would also suggest you to take a look at the examples on Encoder
    > Measurements:
    >
    > >
    http://zone.ni.com/devzone/devzone.nsf/webcategories/75CA12ECD25F39A78625679
    000743752?opendocument&...
    >
    > The Quadrature Encoder with DAQ-STC cards example shows the property
    > that you can use to count.
    >
    > Please do let me know if you need more help.
    >
    > Sincerely,
    > Sastry Vadlamani
    > Applications Engineer
    > National Instruments

  • WANTED: NI PXI-6602 counter/timer

    I'm looking to buy a used NI PXI-6602 counter/timer board. Got one?

    "Zvezdana S." wrote in message
    news:[email protected]..
    > Hugh,
    > To possibly obtain an used board from National Instruments, you should
    > contact your regional Internal Sales Representative (ISR) for possible
    > used boards. If you are not sure who your ISR is, generate a service
    > request at:
    I never knew NI had an SRQ line we could pull.
    Craig Graham
    Physicist/Labview Programmer
    Lancaster University, UK

  • Configuring the NI 6602 Counter/Timer ?

    Is there a way to configure a NI 6602 Counter/Timer to generate a LabVIEW occurrence ever time it counts?

    Hello;
    Occurrences can be generated at every time the output of the 6602 counter change state. That operation is not supported for counting operations.
    One thing you can try to do to overcome that is to combine two counters, the first one will have the pulse train to be counted connected to its source and it will be configured as retriggerable pulse train generator. You can configure the pulses to be generated by this counter to have the minimun delay of 2 timebase clocks, and the same width of the pulses that are being counted.
    The second counter will receive the output of the first counter on its source and will be configure as simple event counter.
    You will catch the occurence generated by the first counter and the value read by the second counter.
    There is a drawbacks with this implementation, which is:
    There will be a 2 timebase clock pulses delay in between the generation of the occurrence and the event of the pulse on the first counter.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments

  • DMA transfer rate for PCI-6602 counter/timer

    I'm strongly interested in raising the DMA transfer rate between the PCI-6602 counter and computer. At the moment, I've got a Pen-4 2.4GHz operating under Win98. I have to move an 80 Megaword array at an ~5 MHz speed. So far, I've been able to reach just 2 MHz. Would it be possible? What is the battleneck here - the soft- or hardware?

    Hello,
    I think the bottleneck you are seeing here is a limitation of the dma transfer capabilities that is dependant on the bus of your PC and not your 6602 card. Here is a link of a knowledgebase that you could try to use to see if that would improve your transfer rates. I still doubt you will be able to achieve approximately 5MHz.
    http://ae.natinst.com/operations/ae/public.nsf/fca7838c4500dc10862567a100753500/1b64310fae9007c086256a1d006d9bbf?OpenDocument
    Regards,
    Steven B.

  • RPM Measurement using Quadrature Encoder and PXI 6602 counter

    Hi,
    I am on a project at work where I need to verify the speed (in RPM) of an unloaded motor which can operate up to 1400 rpm.  After doing some research, i determined that a quadrature encoder could be used to make the measurement.  I am looking at this encoder  http://sine.ni.com/nips/cds/view/p/lang/en/nid/205321.
    I have a PXI 6602 counter/timer module in which I would like to interface to the quadrature encoder.  I would like to create a VI that allows me to calculate the speed using the encoder.  Can someone provide me with details of what needs to be in the VI or an example which can do this?  At the most basic level, i want to calculate the speed on demand.  After doing this, i would like to figure out how to quickly calculate the speed so that i can determine response time of the speed changing within sub-millisecond resolution (1 ms resolution max).
    Further, i created a VI that allows me to change the pulse width of a 100 Hz pulse train at run-time which tells the motor controller the desired speed.  I would like to be able to use this VI to change the speed of the motor and the first VI (that I am seeking help about) to calculate the response time (time between the initial speed and settling at the new setpoint).
    I am familiar with the NI example finder, but have not been able to find an example that I can use.
    Thanks,
    Gary

    Hey Gary,
    I think for you setup, you should try using the Meas Dig Frequency - Low Freq 1 ctr. You can find it by searching example finder with 'low freq'. This vi tells you the frequency of a digital signal by sampling between two pulses and inverting the time between pulses. If you hook up your encoder to a counter and have that counter specified in the vi, it will be able to give you on demand readings of frequency (you can do some multiplication to get the rpm value, freq*60/pulses per revolution of encoder). A simple way to take continuous readings is to put a while loop around the daqmx read and the data output of the read. You can also replace the numeric indicator to a waveform chart to graphically display the change of frequency or rpm readings over time.
    You should be able to integrate this as two separate tasks with the pulse train vi you created earlier.
    Hope this helps
    Luke W

  • I need a 2 channel 100MHz frequency counter

    I need this counter to measure the resonant frequency of the delay lines on a SAW sensor. I am hoping I can come up with a device and a software package that can measure the change in frequency at a high rate of speed (no specific speed, just needs to work). As mentioed above, I am working on ST cut quartz, so the resonance is close to 100MHz. There will be sinusoidal signals entering the counter.

    Hi ,
    Please take a look at our PCI-6602 counter/timer card. I am providing a link below.
    PCI-6602
    Please let me know if you have further questions.
    Sincerely,
    Sastry V.
    Applications Engineer
    National Instruments.

  • Can I use Intel 815EP AGP 4X Pentium and plug in 5 Nos NI 6002 PCI counter Timer cards, instead of going for expensive PXI based solution? Hope there will be no degradation in performance - when used for constructing an Energy Meter test Bench.

    I was recommended to buy NI 6002 with PXI series, 5 Nos cards($875x 5 nos), and additionally a PXI rack costing about $ 2195 + some min--- card to interface with the computer costing another $ 875. Compare this with $ 675 x 5 Nos for 5 Nos PCI based NI 6002 + some cablesa nd connectors for synchronisation.
    First option is extremely expensive. But NI marketin manager will be glad that he sold more harware. But I want the truth. Why can't Intel 815 Pentium board be used?

    I am addressing the question if using PCI-6602s instead of using PXI-6602s will affect the performance, and the answer is NO. 6602 counter/timer devices comes in two different form factors, PXI/Compac PCI and PCI. The accuracy and performance is the same for both the PXI and PCI 6602s. However, using PXI solution will allow users an easier time with synchronization since that is the provided in the backplane of the PXI chassis. Additionally, if you ever need a higher accuracy solution you can add the 6608 device which has 75 parts per billion ppb vs 50 ppm of the 6602 devices. With 6608 plugged in the second slot of the PXI chassis (the one next to the controller), the high accuracy timebase is automatically shared acrossed the backplane of the PXI chassis which mean
    s that other 6602 devices in the chassis will share the same accuracy of the 6608. If the difference in the accuracy is not a concern and you are currently not ready to invest in the PXI platform, then you can go with the PCI 6602 devices.
    Best Regards,
    June Zhu
    National Instruments
    Digital and Timing Product Support Engineer

  • Need script or Program to count lines of source code

    Hello, I need a script or a program that can count how many lines are there in a directory contains source code as well as other directories(contain code as well), there are .java files in these directories, the script or program should count number of lines with/without comments(starts with // or surrounded by /**/)
    Thanks a lot!!!

    I wrote a quick python program to count the lines in a file, you could just adapt it to your needs, or use the second program I have in this post that condenses all the .java files in a directory into a single text file, which you can then use a line-count on (useful if you need to print it as well - I wrote it for my IB dossier java project), if you'd like a proper script for your needs, otherwise check the other suggestions.
    Run it by copying the code into a text file and saying it as script.py (change script to whatever you want) and running it with python /path/to/script.py
    #!/usr/bin/env python
    #Program to tally the lines in a file
    #Author: lswest
    import os
    home=os.path.expanduser("~")
    endPath=raw_input("Path to file relative to your home directory (include file name and extension): ")
    count=0
    ff=open(os.path.join(home, endPath))
    for x in ff:
    count+=1
    values={'name': os.path.join(home,endPath), 'count' : count}
    print "The file %(name)s contains %(count)s lines." % values
    #!/usr/bin/env python
    #Script to condense the multiple files of a project into one for easy printing/copying
    #Author: lswest
    import os
    home=os.path.expanduser("~")
    endPath=raw_input("Path relative to your home directory to the project folder: ")
    extension=raw_input("Extension of files you want to condense: ")
    outPath=raw_input("Path to output file relative to home directory: ")
    outFile=raw_input("Output file name (including extension): ")
    ff=open(os.path.join(home+outPath,outFile), "wt")
    for root, dirs, files in os.walk(os.path.join(home,endPath), "true", "none", "true"):
    for infile in [f for f in files if f.endswith(extension)]:
    fh=open(os.path.abspath(os.path.join(root,infile)))
    for line in fh:
    ff.write(line,)
    fh.close()
    ff.close()
    Last edited by lswest (2009-03-10 16:23:52)

  • 6602 counter multi channel

    hello,
    is it possible to read multi- channels from 6602 counter card.
    i try to read with the daqmx but i can only measure one channel.
    there's no array for the channel input.
    please send me an example or picture.
    markus

    Afraid not. You can run several counter channels simultaneously, but each one needs to be programmed as a unique task.
    In certain cases (especially when the counters are performing the same function on different signals), you can reduce the block diagram clutter by putting the config, read, and clear functions in a for loop. You still end up with an array of several unique tasks, but the block diagram isn't much more complicated than it would be for a single task.
    -Kevin P.

  • Need help incorporat​ing the second counter into a current data acquisitio​n routine (continuou​s retriggera​ble AI).

    My current application acquires data when it sees a TTL trigger line.  Then it wait until the next TTL pulse and continues taking data until the user stop the data acquisition process.  I use "counter 0" as counter source.  The program works well.  However I need to read digital data everytime I take AI data.  I plan to use "counter 1" to read the digital data.  The trick is that I need to synchronize both AI and counter 1 readings. Therefore the counter 2 will acquire data when AI acquires data.
    Here is the code I implemented and would like to know if it is correct.  The new code (implementation of second counter) is in the bottom part of the code.  I will really appreciate your help. 
    Yajai
    Attachments:
    code.txt ‏6 KB

    Hi DrObb,
    What is sounds like you want to do is to specify an external sample clock for your analog acquisition and a digital acquisition. Is there a reason in particular that you're using a counter? What hardware are you using? If you simply want to sample a digital and analog channel on the same clock edge, this won't be very difficult (provided your hardware supports hardware-timed digital IO). You can find an example of this being done in C by going to: 
    Start » All Programs » National Instruments » NI-DAQ » Text-Based Code Support » ANSI C Examples and then navigating to  Synchronization\Multi-Function\ContAI-Read Dig Chan
    Regards,
    Sean
    Sean Ferguson
    Application Engineering Specialist | RF and Reconfigurable Test

  • Need example report program using PNPCE LDB in SAP HR

    Need example report program using PNPCE LDB in SAP HR.
    and how to create a report category in sap hr for using it as cutomised selection screen.

    Hi,
    Go through the following links, i hope it will help you.....
    /people/alvaro.tejadagalindo/blog/2006/02/19/how-to-deal-with-hr-payroll-reports
    http://sap.ittoolbox.com/groups/technical-functional/sap-r3-dev/893908#
    A sample prog with LDB PNP
    *& Report ZH_REPT_PAYMENT *
    report zh_rept_payment line-size 80 no standard page
    heading.
    tables: pernr, " Standard Selections for HR Master Data Reporting
    pcl1, " HR Cluster 1
    pcl2, " HR Cluster 2
    pa0009,
    PA9001,
    PA9006,
    pa0002,
    pc260 , " Cluster Directory for Payroll Results
    bnka .
    Infotypes
    infotypes: 0001. " Organizational Assignment
    Declaration of Internal Tables
    data : bnka1 like bnka occurs 0 with header line .
    data: begin of t_int_rep occurs 100,
    bankl like pc209-bankl, " Bank Number
    zlsch like pc209-zlsch, " Payment method
    pernr like pernr-pernr, " Employee Number
    ename like pernr-ename, " Employee Name
    bankn like pc209-bankn, " Bank Account Number
    betrg like pc209-betrg, " Amount to be transfered
    zweck like pa0009-zweck, " Purpose
    end of t_int_rep.
    data: begin of int_rep occurs 100,
    bankl like pc209-bankl, " Bank Number
    zlsch like pc209-zlsch, " Payment method
    pernr like pernr-pernr, " Employee Number
    ename like pernr-ename, " Employee Name
    bankn like pc209-bankn, " Bank Account Number
    betrg like pc209-betrg, " Amount to be transfered
    zweck like pa0009-zweck, " Purpose
    begda like pa0009-begda, "Begin date
    end of int_rep.
    Declaration of Data Variables
    data: ws_betrg like pc209-betrg, " BT Amount
    w_val like spell occurs 0 with header line,
    int_rep1(6), " TYPE I, " Employee Number
    cnt type i value 0, " Counter
    calcmolga like t500l-molga value '40', " Country Grouping
    v_id(15),
    calc_currency like t001-waers value 'INR'. " Currency
    data : ctr type i,
    dt_merge like pa0009-begda.
    data: ws_totemp(6) type c,
    ws_totamt(20) type c,
    r_mth(9) type c,
    ws_fpbeg(6) type c,
    ws_fpend(6) type c,
    ws_mthyr(6) type c,
    ws_mthyr_r(14) type c,
    r_mth_t(3) type c,
    ws_amt(8) type c,
    ws_bankl(14) type c,
    ws_date(6) type c,
    amount_word(500),
    total_page type i,
    pages type i,
    remain type i.
    data begin of i_spell.
    include structure spell .
    data end of i_spell .
    data : c_molga type t500l-molga value '40',
    c_banks type bnka-banks value 'IN'.
    Standard Includes
    include rpc2cd09. "Cluster CD data definition
    include pc2rxin0.
    include rpc2rx09.
    include rpppxd00. " Data Definition buffer PCL1/PCL2
    include rpppxd10. " Common Part buffer PCL1/PCL2
    include rpppxm00. " Buffer Handling RoutinePCL1/PCL2
    include zrpc2rox2. " Data Definition POCLSTERS (not J,K,U)
    Selection Screen
    selection-screen begin of block b1 with frame title text-001.
    parameter: pa_mth(2) type c default sy-datum+4(2) obligatory,
    pa_year(4) type c default sy-datum(4) obligatory,
    p_bankl like pc209-bankl, " Bank Number
    p_zlsch like pc209-zlsch. " Payment method
    selection-screen end of block b1.
    save_calc_currency = calc_currency.
    count_top = 0.
    get_pernr_flag = 0.
    Top-Of-Page
    top-of-page.
    perform convert_month using pa_mth(2) r_mth.
    ws_mthyr_r = r_mth.
    concatenate ws_mthyr_r pa_year into ws_mthyr_r separated by space.
    SKIP 5.
    skip 1.
    skip 4.
    if int_rep-bankl eq ' '.
    if int_rep-zlsch eq 'C' or int_rep-zlsch eq 'E' or
    int_rep-zlsch eq ' '.
    write: /1(85) 'CHEQUE PAYMENT STATEMENT'(047) centered.
    elseif int_rep-zlsch eq 'L'.
    write: /1(85) 'DEMAND DRAFT STATEMENT'(047) centered.
    endif.
    else.
    write: /1(85) 'BANK TRANSFER STATEMENT'(002) centered.
    endif.
    skip.
    write: /34 ws_mthyr_r,
    62 'Page :'(008),69(2) sy-pagno intensified off,
    ' Of ',78(2) pages intensified off.
    clear pages.
    read table bnka1 with key bankl = int_rep-bankl .
    if sy-subrc = 0.
    if int_rep-zlsch eq 'T'.
    write:/03(10) 'Bank Name : ', bnka1-banka.
    write:/03(10) 'Branch : ', bnka1-brnch.
    write:/03(10) 'Address : ', bnka1-stras.
    endif.
    endif.
    skip.
    write:/1(80) sy-uline.
    write: /1 sy-vline, 2(5) 'Sl.No'(002),
    7 sy-vline, 8(8) 'Emp.No.'(003),
    16 sy-vline,17(35) 'Employee Name'(004).
    *--added for Demand Draft
    if ( int_rep-zlsch = 'l' or int_rep-zlsch = 'L' ).
    write : 47 sy-vline, 48(15) 'Payable at'(005).
    else.
    write : 47 sy-vline,48(15) 'Account No.'(005).
    endif.
    write: 63 sy-vline,64(16) 'Amount'(006),
    80 sy-vline.
    write:/1(80) sy-uline.
    end-of-page.
    write:/1(80) sy-uline.
    write:/2 'Printed on ', sy-datum.
    Start-of-selection.
    start-of-selection.
    *perform h_headr.
    ctr = 0.
    set margin 5.
    call function 'RP_GET_CURRENCY'
    exporting
    molga = calcmolga
    importing
    waers = calc_currency
    exceptions
    others.
    if sy-subrc ne 0.
    calc_currency = 'DEM'.
    calc_currency = save_calc_currency.
    endif.
    get pernr.
    cd-key-pernr = pernr-pernr.
    perform import_cluster.
    get_pernr_flag = 1.
    check : ocd-version-molga eq calcmolga.
    The table 'tabpernr' is filled with the personnel numbers
    and is used after selection is finished.
    move-corresponding pernr to tabpernr.
    append tabpernr.
    The table 'tab_rgdir' is filled
    loop at rgdir.
    rx-key-pernr = pernr-pernr.
    unpack rgdir-seqnr to rx-key-seqno.
    perform int_tab. "fill tab_rgdir
    perform import_bt.
    perform validate.
    endloop.
    End of Selection
    end-of-selection.
    *perform h_headr.
    perform convert_date_a using pa_mth r_mth_t.
    sort int_rep by bankl zlsch pernr betrg descending.
    delete adjacent duplicates from int_rep
    comparing bankl zlsch pernr .
    sort int_rep by bankl zlsch bankn . "PERNR.
    loop at int_rep.
    at new bankl.
    select single * into bnka1 from bnka
    where banks = c_banks and
    bankl = int_rep-bankl .
    append bnka1.
    clear bnka1.
    endat.
    endloop.
    for Demand Draft - purpose added
    loop at int_rep.
    concatenate pa_year(4) pa_mth(2) '01' into dt_merge.
    select single * "zweck into int_rep-zweck
    from pa0009 where
    pernr = int_rep-pernr and
    bankl = int_rep-bankl and
    zlsch = int_rep-zlsch
    and begda <= dt_merge and
    endda >= dt_merge .
    if sy-subrc = 0.
    int_rep-zweck = pa0009-zweck.
    modify int_rep.
    endif.
    endloop.
    *-for DD and Chq sorted by PAyable at and EMPNO wise
    if p_zlsch = 'T' .
    sort int_rep by bankl zlsch bankn . "PERNR.
    else. "added for "payable at" for DD/Chq
    else.
    sort int_rep by zweck pernr . "PERNR.
    endif.
    *delete adjacent duplicates from int_rep.
    t_int_rep] = int_rep[.
    loop at int_rep.
    *-for page of page no.
    total_page = 0.
    loop at t_int_rep where bankl = int_rep-bankl
    and zlsch = int_rep-zlsch.
    total_page = total_page + 1.
    endloop.
    pages = total_page div 25.
    remain = total_page mod 25.
    comment bcoz its adding one extra page no.
    done as on 29/11/2004
    if remain > 0.
    pages = pages + 1.
    endif.
    **-end
    at new bankl.
    ctr = 0 .
    new-page.
    endat.
    at new zlsch.
    ctr = 0 .
    new-page.
    endat.
    clear v_id.
    select single natio
    into pa0002-natio
    from pa0002
    where pernr eq int_rep-pernr.
    *-testing......for soma
    if ctr > 24.
    ctr = 0 .
    write:/1(80) sy-uline.
    new-page .
    endif.
    ctr = ctr + 1 .
    cnt = cnt + 1.
    pack int_rep-pernr to int_rep1.
    write:/1 sy-vline, 2(3) cnt intensified off,
    7 sy-vline, 9(6) int_rep1 intensified off,
    16 sy-vline,17(35) int_rep-ename intensified off .
    if ( int_rep-zlsch = 'l' or int_rep-zlsch = 'L' ).
    write : 47 sy-vline,48(15) int_rep-zweck intensified off.
    else.
    write:
    47 sy-vline,48(15) int_rep-bankn intensified off .
    endif.
    write: 63 sy-vline,64(16) int_rep-betrg
    intensified off currency 'INR',
    80 sy-vline.
    ws_betrg = ws_betrg + int_rep-betrg.
    *-testing......for soma
    skip.
    write :
    /1 sy-vline, 7 sy-vline ,16 sy-vline ,47 sy-vline,63 sy-vline,80
    sy-vline .
    *-end testing......for soma
    at end of zlsch.
    if int_rep-bankl = ' '.
    call function 'HR_IN_CHG_INR_WRDS'
    exporting
    amt_in_num = ws_betrg
    importing
    amt_in_words = amount_word
    EXCEPTIONS
    DATA_TYPE_MISMATCH = 1
    OTHERS = 2
    w_val-word = amount_word.
    concatenate 'INR.' w_val-word into w_val-word
    separated by space.
    write:/1(80) sy-uline.
    write: /1 sy-vline, 7 'Total transfer:'(009),
    64(16) ws_betrg intensified off currency 'INR',
    80 sy-vline.
    write:/1(80) sy-uline.
    write: /1 sy-vline, 3 w_val-word+0(76) intensified off,
    80 sy-vline.
    write :/1 sy-vline, 10 w_val-word+76(70) intensified off,
    80 sy-vline.
    write:/1(80) sy-uline.
    clear: ws_betrg,cnt.
    skip 2.
    write: /2 'Prepared by :'(010), '_______________'(013),
    45 'Checked by :'(011),'_______________'(013).
    skip 2.
    write: /2 'Printed On ', sy-datum,
    45 'Approved by :'(012),'_______________'(013).
    clear sy-pagno.
    endif.
    endat.
    at end of bankl.
    if int_rep-bankl ' '.
    call function 'HR_IN_CHG_INR_WRDS'
    exporting
    amt_in_num = ws_betrg
    importing
    amt_in_words = amount_word
    EXCEPTIONS
    DATA_TYPE_MISMATCH = 1
    OTHERS = 2
    w_val-word = amount_word.
    concatenate 'INR.' w_val-word into w_val-word
    separated by space.
    write:/1(80) sy-uline.
    write: /1 sy-vline, 7 'Total transfer:'(009),
    64(16) ws_betrg intensified off currency 'INR',
    80 sy-vline.
    write:/1(80) sy-uline.
    write: /1 sy-vline, 3 w_val-word+0(76) intensified off,
    80 sy-vline.
    write :/1 sy-vline, 10 w_val-word+76(70) intensified off,
    80 sy-vline.
    write:/1(80) sy-uline.
    clear: ws_betrg,cnt.
    skip 2.
    write: /2 'Prepared by :'(010), '_______________'(013),
    45 'Checked by :'(011),'_______________'(013).
    skip 2.
    write: /2 'Printed on ', sy-datum,
    45 'Approved by :'(012),'_______________'(013).
    clear sy-pagno.
    NEW-PAGE.
    endif.
    endat.
    endloop.
    End of Page
    end-of-page.
    write: /2 'Prepared by :'(010), '_______________',
    45 'Checked by :'(011),'_______________'.
    *& Form IMPORT_CLUSTER
    Importing Data from Cluster *
    form import_cluster.
    sy-subrc = 0.
    rp-imp-c2-cd.
    if sy-subrc eq 0.
    if cd-version-number ne ocd-version-number.
    endif.
    endif. " SY-SUBRC EQ 0
    endform. " IMPORT_CLUSTER
    *& Form INT_TAB
    Filling internal table tab_rgdir form int_tab.
    *Fill internal table tab_rgdir.
    move-corresponding rgdir to tab_rgdir.
    tab_rgdir-pernr = pernr-pernr.
    append tab_rgdir.
    endform. " INT_TAB
    *& Form IMPORT_bt
    Import Values from Bank Transactions Table (BT) form import_bt.
    rp-init-buffer.
    RP-IMP-C2-RX.
    rp-imp-c2-in.
    if rp-imp-in-subrc eq 0.
    if in-version-number ne oin-version-number.
    write: / 'Schlüssel des Clusters RX:'(015),
    rx-key-pernr, rx-key-seqno.
    write: / 'The imported version of the cluster'(016), 'RX',
    'is not current'(017).
    write: / 'Imported version :'(018),
    oin-version-number.
    write: / 'Current version of cluster :'(019),
    in-version-number.
    stop.
    else.
    sy-subrc = 0.
    endif.
    else.
    sy-subrc = 8.
    write: /
    'Inconsistencies between cluster directory and directory for'(020).
    write: /
    'No payroll results found for data in cluster directory'(021).
    write : /
    'Please contact hotline to solve the current problem'(022).
    endif.
    ws_fpbeg(2) = versc-fpbeg+4(2).
    ws_fpbeg+2(4) = versc-fpbeg(4).
    ws_fpend(2) = versc-fpend+4(2).
    ws_fpend+2(4) = versc-fpend(4).
    ws_mthyr(2) = pa_mth.
    ws_mthyr+2(4) = pa_year.
    check ws_mthyr = ws_fpbeg.
    check ws_mthyr = ws_fpend.
    loop at bt. "from pc209
    int_rep-pernr = pernr-pernr.
    int_rep-ename = pernr-ename.
    int_rep-bankl = bt-bankl.
    int_rep-bankn = bt-bankn.
    int_rep-betrg = bt-betrg.
    int_rep-zlsch = bt-zlsch.
    append int_rep.
    endloop.
    IF P_BANKL ' ' AND P_ZLSCH ' '.
    DELETE INT_REP WHERE BANKL P_BANKL.
    ELSEIF P_BANKL = ' ' AND P_ZLSCH ' '.
    DELETE INT_REP WHERE ZLSCH P_ZLSCH.
    ELSEIF P_BANKL ' ' AND P_ZLSCH = ' '.
    DELETE INT_REP WHERE BANKL P_BANKL.
    ENDIF.
    endform. " IMPORT_BT
    *& Form CONVERT_MONTH
    Fetching Month Text form convert_month using mth t_mth.
    case mth.
    when '01'.
    t_mth = 'January'(023).
    when '02'.
    t_mth = 'February'(024).
    when '03'.
    t_mth = 'March'(025).
    when '04'.
    t_mth = 'April'(026).
    when '05'.
    t_mth = 'May'(027).
    when '06'.
    t_mth = 'June'(028).
    when '07'.
    t_mth = 'July'(029).
    when '08'.
    t_mth = 'August'(030).
    when '09'.
    t_mth = 'September'(031).
    when '10'.
    t_mth = 'October'(032).
    when '11'.
    t_mth = 'November'(033).
    when '12'.
    t_mth = 'December'(034).
    endcase.
    endform. " CONVERT_MONTH
    *& Form CONVERT_DATE_A
    Fetching Month Text * form convert_date_a using mth_t t_mth_t.
    case mth_t.
    when '01'.
    t_mth_t = 'Jan.'(035).
    when '02'.
    t_mth_t = 'Feb.'(036).
    when '03'.
    t_mth_t = 'Mar.'(037).
    when '04'.
    t_mth_t = 'Apr.'(038).
    when '05'.
    t_mth_t = 'May.'(039).
    when '06'.
    t_mth_t = 'Jun.'(040).
    when '07'.
    t_mth_t = 'Jul.'(041).
    when '08'.
    t_mth_t = 'Aug.'(042).
    when '09'.
    t_mth_t = 'Sep.'(043).
    when '10'.
    t_mth_t = 'Oct.'(044).
    when '11'.
    t_mth_t = 'Nov.'(045).
    when '12'.
    t_mth_t = 'Dec.'(046).
    endcase.
    endform. " CONVERT_DATE_A
    *& Form VALIDATE
    text
    --> p1 text
    <-- p2 text form validate .
    if p_bankl <> ' ' and p_zlsch ' '.
    delete int_rep where bankl p_bankl.
    elseif p_bankl = ' ' and p_zlsch ' '.
    delete int_rep where zlsch p_zlsch.
    elseif p_bankl ' ' and p_zlsch = ' '.
    delete int_rep where bankl p_bankl.
    endif.
    endform. " VALIDATE
    check this weblog.....
    /people/dj.adams/blog/2003/11/13/food-for-thought-ldbs-and-abap-objects
    Also , check the following link too.
    http://www.datamanagementgroup.com/Resources/Articles/Article_1005_2.asp
    Regards,
    Harish

  • Please help: I need a "sleep" program

    Hi!
    I need an ABAP program which will start, then 'sleep' (i.e.do nothing) for
    5 minutes, and eventually exit with a message like 'I wake up' on the screen.
    Please help. Points guaranteed. Thanks!

    Check this out.  This uses the gui timer, so it will not hold up your dialog process, it will count till the timer runs out and give a message.
    REPORT  zrich_0001.
    DATA: gui_timer TYPE REF TO cl_gui_timer.
    DATA: timeout TYPE i VALUE '3'.
    CLASS lcl_event_handler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS: on_finished FOR EVENT finished OF cl_gui_timer.
    ENDCLASS.                   
    CLASS lcl_event_handler IMPLEMENTATION.
      METHOD on_finished.
        MESSAGE i001(00) WITH 'Hey, its been 3 seconds, im done'.
      ENDMETHOD.                  
    ENDCLASS.                  
    PARAMETERS : p_check TYPE c.
    AT SELECTION-SCREEN OUTPUT.
      CREATE OBJECT gui_timer.
      SET HANDLER lcl_event_handler=>on_finished FOR gui_timer.
      gui_timer->interval = timeout.
      CALL METHOD gui_timer->run.
    To increase the time, simply change the value of the TIMEOUT variable to the desire number of seconds.
    Regards,
    Rich Heilman

  • Need one abap program.....pls help

    Hi all,
    i have need one ABAP program , which can dispaly how many same number of charecter are there.
    ex : my input is  suresh.
    output is,,,
    2 - s
    1 - u
    1 - r
    just like that..
    pls help me..
    thanks in advance.
    indu

    Hello
    Try this:
    data: string(100),
          length type i.
    data: begin of itab occurs 0,
          chart,
          count type i,
          end of itab.
    string = 'suresh'.
    length = strlen( string ).
    do length times.
      length = length - 1.
      clear itab.
      itab-chart = string+length(1).
      itab-count = 1.
      collect itab.
    enddo.
    loop at itab.
      write: itab-chart, itab-count. new-line.
    endloop.

  • 6602 counting pulses on all 8 counters

    I need to count the number of pulses on 8 lines simultaneously.
    Each line will have a burst of 2MHz pulses.
    Can I do this on a PCI-6602 or will this need to be a buffered operation that will be limited by the available DMA channels.
    Also how many of the 32 digital I/O lines are used by the counters, if I use all 8 counters how many inputs will be left over for digital i/o use.
    Any help appreciated
    Nick

    Nick,
    Good news -- if you only need a total count for each of the 8 channels, you could perform unbuffered edge counting without requiring any DMA. When the bursts of activity have finished, you simply read the count stored in each counter.
    Counters 2-7 share their i/o pins with DIO 8-31. Counters 0 and 1 do not share and DIO 0-7 do not share, so you always have at least 8 DIO lines available for use.
    I recall that under traditional NI-DAQ, there were ways to operate DIO on some of the counter lines that weren't needed in their tasks. It took a little care to setup properly, but you may be able to free up a few more DIO that way. Counters 2-7 need their Source pins for their counting tasks, but their Gate and Aux pins should be available though possibly only as inputs. Output pins may also be available, but I'm less sure about that, and they may be restricted to output.
    I haven't tried this under DAQmx, but I kinda suspect it might wind up being a bit simpler to setup.
    -Kevin P.

Maybe you are looking for

  • Snow leopard dvd doesn't work

    I bought snow leopard DVD but it seems corrupted. I put inside the Mac and it spit it out immediately. (I tried both sides ... :-) ... many times). Other CDs and DVDs works fine. My question is: since I have an original version and a serial number pr

  • Initialize record type constant in package header

    I am creating a package to hold application constants in Oracle 8.1.7.4. I want one of my constants to be a programmer-defined record type. A constant table type of that record type will then hold multiple records. I'm new to using record data types

  • Premiere Pro CC keeps crashing in the middle of work, how do I prevent this?

    Whenever I am in middle of editing, my premeire pro always crashes. I have installed the latest updates. Even when I open premeire pro and leave it without using it, after a few minutes it crashes. I checked my event viewer and this is what it showed

  • Newbie - broken query - no values returned

    I have 2 queries, 1 works and the other one doesn't. Here is the one that works: SELECT DEPOSIT.bike_num, DEPOSIT.kart_num, DEPOSIT.other_num, DEPOSIT.customer_name, DEPOSIT.customer_surname, (total_amt-deposit_amt) AS bal, deposit_date, id FROM DEPO

  • Printing different photos on same page in PSE 8

    Is there a way to print 2 or more different photos on the same page?  If you know of a way please respond.  This is in Photoshop elements 8. Thank you, Ed Dunlap