How to Solve Routed Output based on certain field.

Hi,
Please help me with this routing development...
We have an input strucutre something like this
<b><File>
     <Customer>
          <Name>John</Name>
          <Company Info>
               <Number>101</Number>
               <Company>Coka Cola</Company>
          </Company Info>
     </Customer>
     <Customer>
          <Name>Ron</Name>
          <Company Info>
               <Number>102</Number>
               <Company>Nestle</Company>
          </Company Info>
     </Customer>
     <Customer>
          <Name>Harry</Name>
          <Company Info>
               <Number>103</Number>
               <Company>Pepsi</Company>
          </Company Info>
     </Customer>
     <Customer>
          <Name>Shrek</Name>
          <Company Info>
               <Number>104</Number>
               <Company>Nestle</Company>
          </Company Info>
     </Customer>
</File></b>
And the Output has to be something like this...
<b><File>
     <Customer>     
          <Name>John</Name>
          <Number>101</Number>
          <Company>Coka Cola</Company>
     </Customer>
</File>
<File>
     <Customer>
          <Name>Ron</Name>
          <Number>102</Number>
          <Company>Nestle</Company>
     </Customer>
     <Customer>
          <Name>Shrek</Name>
          <Number>104</Number>
          <Company>Nestle</Company>
     </Customer>
</File>
<File>
     <Customer>
          <Name>Harry</Name>
          <Number>103</Number>
          <Company>Pepsi</Company>
     </Customer>
</File></b>
The file has to be routed based on the Company Code and different file should have different file name again based on the company code.

<b>>>>The file has to be routed based on the Company Code</b>
check with xpaths.
/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
/people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers
<b>>>>different file should have different file name again based on the company code.</b>
/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii

Similar Messages

  • How to group the output based on DAYS field

    Hi
    I am modifying the predefined ALV report "RFTMBL01" .I had added the days field to that report output and I have to group the output based on the DAYS field
    Records within 0-10 days in one group
    Records within 10-30 days in one group
    Records above 30 days should be  one group
    No of days may repeat that means with no of days 10 .many records will be there
    There is also a field by name "AMOUNT" in my output.
    I have to calculate SUBTOTALs at the end of every group and at the end of the report i should caluculate GRAND TOTAL.
    Please remember that i should not use any any BLOCKED ALVs and for Totals i should not use the SYMBOLS provided in the application toolbar of the report
    Thanks in Advance

    <b>>>>The file has to be routed based on the Company Code</b>
    check with xpaths.
    /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
    /people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers
    <b>>>>different file should have different file name again based on the company code.</b>
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii

  • How can i assign value to the certain field in dynmic table ?

    i have created a dynmic table .now i want to assign value to the certain field,how can i do that?
    for eg,
    <dyn_table> contains fields of  name age ,now i want assign 'jack' to this internal talbe's field name ,

    Hi,
    try this:
    FIELD-SYMBOLS: <GT_ITAB>      TYPE TABLE,
                   <GS_ITAB>,
                   <FS>, <FS1>.
    DATA: GT_DATA   TYPE REF TO DATA.
    DATA: GS_DATA   TYPE REF TO DATA.
    START-OF-SELECTION.
      CREATE DATA GT_DATA TYPE TABLE OF PA0002.
      ASSIGN GT_DATA->*   TO <GT_ITAB>.
      CREATE DATA GS_DATA    LIKE LINE OF <GT_ITAB>.
      ASSIGN GS_DATA->*      TO <GS_ITAB>.
      ASSIGN COMPONENT 'NACHN' OF STRUCTURE <GS_ITAB> TO <FS>.
      <FS> = 'Smith'.
      ASSIGN COMPONENT 'VORNA' OF STRUCTURE <GS_ITAB> TO <FS>.
      <FS> = 'Paul'.
      APPEND <GS_ITAB> TO <GT_ITAB>.
      ASSIGN COMPONENT 'NACHN' OF STRUCTURE <GS_ITAB> TO <FS>.
      <FS> = 'Jones'.
      ASSIGN COMPONENT 'VORNA' OF STRUCTURE <GS_ITAB> TO <FS>.
      <FS> = 'Martin'.
      APPEND <GS_ITAB> TO <GT_ITAB>.
      LOOP AT <GT_ITAB> INTO <GS_ITAB>.
        ASSIGN COMPONENT 'NACHN' OF STRUCTURE <GS_ITAB> TO <FS>.
        ASSIGN COMPONENT 'VORNA' OF STRUCTURE <GS_ITAB> TO <FS1>.
        WRITE: / <FS>, <FS1>.
      ENDLOOP.
    Regards, Dieter

  • How do I generate output with a certain conditional build expression?

    Hi,
    I am learning how to use conditional tags in RoboHelp 9.  I see how to create and apply the tags.  How do I apply the conditions in the output?  And can I apply the conditions to the Web output  and printed output?
    I am going to be working on a project with variations to suit each customer, so I am wondering if RH 9 is a good tool to use for this.  (I have access to XMetaL 5 also.)
    Thanks,
    Erin

    You pick them in your Single Source Layout recipe

  • How to select few columns based on certain conditions

    i have a table with n columns, of which in 2 columns each may have similar values for certain number of rows
    i want to find if one of the entries in a column has same value in the next few rows
    For example the two columns are
    supplier_name supplier_code
    hll 013
    hll 013
    hll 013
    hll 013
    if i first encounter hll with 013 i have to check whether hll with 013 record is further available
    if it is so i have to display the columns for which multiple entries is available
    can anyone send the query

    Duplicate thread?
    selecting certain columns in oracle

  • How to fix the output length of a field

    Hi!
    I want to 'allocate' the full length of the field while smartform printing even if it is initial.
    How can I do this? I tried the &field(*)& &field(F<' '>)& output format, but nothing.
    Thanks

    Hi!
    I have only one text element, and in that I have two variables separated only with one space. In the printed form the starting place of the second variable depends on the length of value in the first variable.
    like this:
    The first variable has the dictionay type 'VBELN', despite this fact, the &FIELD(*)& does not work.
    The template doesn't work here too. because I have only one text element.
    Or can I print two text element in one row? It could be a solution probably.

  • How to save a form based on a field name

    Hi I am new to this form so please bear with me.
    I would like to set up a form and based on the employee name field use that as the recomended file name under the save as function.
    Also how can I stop a user from saving the form ontop of the template. IE saving the file with confidential information on the original file name.
    Thanking you in advance for you help.

    Hi I am new to this form so please bear with me.
    I would like to set up a form and based on the employee name field use that as the recomended file name under the save as function.
    Also how can I stop a user from saving the form ontop of the template. IE saving the file with confidential information on the original file name.
    Thanking you in advance for you help.

  • How not show duplicate rows based on one field

    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0
    Hello
    I have a query that looks for certain scripts that did not run on a particular day compared to what ran the same day a week ago. We want to include the start_datetime and end_datetime but when I add it to the select statement it brings up all instances of the jobs that run multiple times during the day. Is there a way to exclude the extra rows based on the script_name field?
    SELECT instances.script_name,
                             instances.instance_name,
                             REGEXP_REPLACE(master.description,
                                            chr(49814),  -- em-dash
                                            '-') description
                                            --instances.start_datetime
                      FROM   xxcar.xxcar_abat_instances Instances,
                             xxcar.xxcar_abatch_master  Master
                      WHERE  1 = 1
                      AND    TRUNC(start_datetime) = TRUNC(TO_DATE(:p_StartDate, 'YYYY/MM/DD HH24:MI:SS')) - (:p_NumOfWeeks * 7)
                      AND    Instances.SCRIPT_NAME = Master.SCRIPT_NAME (+)
                      MINUS
                      SELECT script_name,
                             instance_name,
                             NULL
                             --NULL
                      FROM   xxcar.xxcar_abat_instances
                      WHERE  1 = 1
                      AND    TRUNC(start_datetime) = TRUNC(TO_DATE(:p_StartDate, 'YYYY/MM/DD HH24:MI:SS'))

    MINUS does a set operation - removing rows from the first set that exactly match the second set.
    When you add columns to the first set, you want a more restricted filtering - try a multi-column NOT IN:
    To remove multiple runs, group and get min/max
    SELECT instances.script_name,
                             instances.instance_name,
                             REGEXP_REPLACE(master.description,
                                            chr(49814),  -- em-dash
                                            '-') description,
                             min(instances.start_datetime) start_datetime,
                             min(instances.end_datetime) end_datetime
                      FROM   xxcar.xxcar_abat_instances Instances,
                             xxcar.xxcar_abatch_master  Master
                      WHERE  1 = 1
                      AND    TRUNC(start_datetime) = TRUNC(TO_DATE(:p_StartDate, 'YYYY/MM/DD HH24:MI:SS')) - (:p_NumOfWeeks * 7)
                      AND    Instances.SCRIPT_NAME = Master.SCRIPT_NAME (+)
                      AND (script_name, instance_name) NOT IN
                    ( SELECT script_name,
                             instance_name
                      FROM   xxcar.xxcar_abat_instances
                      WHERE  1 = 1
                      AND    TRUNC(start_datetime) = TRUNC(TO_DATE(:p_StartDate, 'YYYY/MM/DD HH24:MI:SS'))
    group by instances.script_name, instances.instance_name, master.descriptionYou didn't give table definitions, and the query has schemas in it, so I didn't test it.
    regards,
    David

  • Spotlight and finder cannot find files as of a certain date. What can be the problem and how to solve?

    Spotlight and search field in Outlook on MacBoon cannot find files as of a certain date. What can be the problem and how to solve?

    Reinstall on both.
    Reinstall Lion, Mountain Lion, or Mavericks without erasing drive
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported then click on the Repair Permissions button. When the process is completed, then quit DU and return to the main menu.
    Reinstall Mountain Lion or Mavericks
    OS X Mavericks- Reinstall OS X
    OS X Mountain Lion- Reinstall OS X
    OS X Lion- Reinstall Mac OS X
         Note: You will need an active Internet connection. I suggest using Ethernet
                     if possible because it isthree times faster than wireless.
    Restore your iPhone to reinstall iOS. Be sure to do this while connected to your computer and iTunes.
         Tap Settings > General > Reset > Erase all content and settings.

  • How to Override Cost Center in IT 1 based on certain conditions

    Hi,
    I have a pretty good understanding on how Cost Center gets defaulted based on Org Structure.  The standard SAP solution for Cost Center will not work for my client and I need to determine the cost center based on certain conditions. I understand that I have to write custom code in some user exit or badi. I tried user exit EXIT_SAPFP50M_001, but it did not work.
    Here is my code:
    DATA: I0001 LIKE P0001.
    CASE INNNN-INFTY.
        WHEN '0001'.
          CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
            EXPORTING
              PRELP = INNNN
            IMPORTING
              PNNNN = I0001.
    This is just an example to test the concept
    I0001-kostl = 'COST_CENTER'.
         CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
            EXPORTING
              pnnnn = i0001
            IMPORTING
              prelp = innnn.
    endcase.
    When I change IT 1 record and hit enter, I can see that my code is being executed. I can see cost center being updated on the screen, but when I save it, its not able to retain that new cost center value. This might be because cost center is not an open field.
    How can I change my code so it retains its value after saving?.
    Thanks!

    Contd to manoj
    Cost Center will be a Open feild when the value of   the  switch PLOGI ORGA  should be balnk if it is haveing 1 than it will not default the value kindly check

  • How to gray out certain fields on the selection screen based on the radio b

    HI All,
      I have an ALV report. On the selection screen I have 2 radio buttons ..for eg..A and B.
    When radio button A(its on by default) is on..certain fields not relevant to this should be grayed out. Similarly when radio button B is on, certain fields should be grayed out.
    I did the AT SELECTION SCREEN OUTPUT and also did the
    LOOP AT SCREEN....ENDLOOP logic. The logic works but when I click the radio button B...the screen fields automatically does not gray out. I have to press ENTER and then its grays out.
    I know a USER_COMMAND needs to be attached.
    Can anyone give me a step by step details of how to do this. I truly appreciate it. if a screen painter thing is required..please give me the tcode and step by step detail to do this.
    Thanks

    Try this one too:
    REPORT ztest.
    TABLES: mara,
            bkpf.
    CONSTANTS:
                  c_pos(3) TYPE c VALUE 'POS',
                  c_acc(3) TYPE c VALUE 'ACC',
                  c_all(3) TYPE c VALUE 'ALL',
                  c_x TYPE c VALUE 'X'.
    The Selection Screen Definition
    SELECTION-SCREEN BEGIN OF BLOCK b_0 WITH FRAME TITLE text-000.
    SELECT-OPTIONS: s_mara FOR mara-matnr.
    SELECTION-SCREEN END OF BLOCK b_0.
    SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-037.
    PARAMETER: rb_all RADIOBUTTON GROUP rb1 USER-COMMAND rad default 'X',
               rb_acc RADIOBUTTON GROUP rb1.
    SELECTION-SCREEN END OF BLOCK b_1.
    SELECTION-SCREEN BEGIN OF BLOCK b_2 WITH FRAME TITLE text-011. "Acct
    SELECT-OPTIONS:   s_blrtc1 FOR bkpf-blart MODIF ID acc,
                      s_blrti1 FOR bkpf-blart MODIF ID acc.
    SELECTION-SCREEN END OF BLOCK b_2.
    SELECTION-SCREEN BEGIN OF BLOCK b_3 WITH FRAME TITLE text-011. "Acct
    SELECT-OPTIONS:   s_blrtc2 FOR bkpf-blart MODIF ID all,
                      s_blrti2 FOR bkpf-blart MODIF ID all,
                      s_blrtv2 FOR bkpf-blart MODIF ID all.
    SELECTION-SCREEN END OF BLOCK b_3.
    AT SELECTION-SCREEN OUTPUT
    AT SELECTION-SCREEN OUTPUT.
      PERFORM f0200_screenfield_hide_logic.
    initialization.
      PERFORM f0200_screenfield_hide_logic.
          FORM f0200_screenfield_hide_logic                             *
    FORM f0200_screenfield_hide_logic.
      LOOP AT SCREEN.
        IF rb_acc = c_x.
          IF screen-group1 = c_all.
            screen-active = 0.
          ELSE.
            screen-active = 1.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
        IF rb_all = c_x.
          IF screen-group1 = c_acc.
            screen-active = 0.
          ELSE.
            screen-active = 1.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    ENDFORM.                    " F0200_SCREENFIELD_HIDE_LOGIC

  • How to generate multiple copies of a label based on a field?

    Post Author: lgayosso
    CA Forum: Crystal Reports
    Hello all,
    I have a report that prints labels where each label is contained in a detail line. I have a field on such label (Number Of Copies), on the same detail line, that specifies the number of copies to generate of such label, how can I generate such multiple copies of the label?
    I have tried adding multiple detail lines (all identical so that they reproduce the label) but I do not know in advance how many copies will be needed; that is, some detail lines include a Number Of Copies = 3, therefore I would need details A, B, and C sections to print the three copies but other labels might have a value of Number Of Copies = 10 therefore I would need detail sections A, B, through J to generate the 10 labels.
    How can I solve this issue?
    Any help is appreciated,
    Lucio Gayosso
    [email protected]

    There is a sample report I retrieved from Business Objects website several months ago.  It's called "Creating Duplicate Labels".  I must confess that I couldn't implement it as I failed to make the counter work.  I can e-mail you the report.  You might make better use of it.
    This is the general description of the report: "This report will demonstrate how to create a report to print duplicate mailing labels depending on a parameter.
    Two methods will be shown to output the number of labels created. The first method is shown in this sample report. Please see the @Label Suppression formula for details.
    In the first method, the user determines how many labels to print depending on a number parameter where by the user controls the number of labels printed.
    The second method uses conditional if-then-else statements. This way, the report writer can determine pre-hand how many labels to print depending if certain conditions are met.
    The report is set up using a main report and a sub report.
    Create a group; you can group by a common id field. This group will be suppressed and is used to run though each record.
    The customer's address and pertinent information are setup in the group header with the formula @Label Values.
    The @Label Suppression formula outputs how many labels to print. Both methods outlined in the preceding paragraph are shown in the @Label Suppression formula.
    The labels are then printed down then across.  The steps are: Format | section | click Details | Under the Common Tab | check "Format with Multiple Columns" | the "Layout" tab appears | Set the appropriate detail size for the label width | Printing direction = "Down then Across"| click "OK"
    If you're using the first method, create a parameter: Insert | Field Object | Parameter Fields | click the New icon | Name the parameter | Enter in prompting text | Value = Number | check the discrete value radio button | Click "OK".
    Create a sub report, and insert a field into the details section.  In this sample report, {Customer.id} is entered. This field will be suppressed and is used to run though each record.
    Create a @reset counter formula and place it in the report header."

  • Quickly!Quickly!Quickly!What is the error code mean? And how to solve it ?Please give your answer. Thanks

    What is the error code mean? Why is there an error?And how to solve it ?Please give your answer. Thanks!                                               
    ——1110340026
    Attachments:
    QQ图片20140403140655.jpg ‏108 KB

    Sannieboyyyy wrote:
    Could be me, but your VI is not working properly on the english version of LV. Can I suggest you to try programming in English in the future?
    Yes, it's you. The VI is working just fine, except for some cosmetic issues with the labeling. I don't think is is a valid suggestion to force somebody to program in a specific language, especially since LabVIEW supports all these languages.
    Here are the problems with the VI:
    If you don't want an amplitude of zero, you need to set the amplitude control to a nonzero value before running. Simple as that!. (You could also set the input range for the amplitude control to exclude zero or use a case structure to skip certain code if the amplitude is zero).
    You could also wire the error output to an indicator so it simply displays the errors, but keeps running.
    Your while loop is currently useless. You can delete it and the program function will not change. Use a stop button at the loop condition.
    Your while loop needs some timing so it runs at a reasonable rate. Either add a small wait or configure the signal generation to "simulate acquisition timing" instead of "run as fast as possible".
    LabVIEW Champion . Do more with less code and in less time .

  • How to implement route cipher using java?

    Hi guys,,,
    I really got a headache solving how to implement route cipher using java lang,,i already got the concept but i really dont get how to implement it using java actually i want to make a presentation of how route cipher works using "adobe flash" but first i will implement it using java coz flash actionscripts are closer to java lang.
    Hope you could post some examples or ideas...i would really appreciate it!
    thank you so much...

    just add an action listener (either keypressed or keytyped) to the frame that you want to record. I did this in NetBeans in about 2 seconds. I can simplify it if you need. As for loging it just write the characters to a file output stream.
    public class test extends javax.swing.JFrame {
        /** Creates new form test */
        public test() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
        private void initComponents() {
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            addKeyListener(new java.awt.event.KeyAdapter() {
                public void keyTyped(java.awt.event.KeyEvent evt) {
                    formKeyTyped(evt);
            pack();
        // </editor-fold>
        private void formKeyTyped(java.awt.event.KeyEvent evt) {
            System.out.println(evt.getKeyChar());
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new test().setVisible(true);
        // Variables declaration - do not modify
        // End of variables declaration
    }

  • How to re-route source & gate for Buffered Period in DAmx

    I am trying to write a DAQmx program that does the follow :
    (1) creates 1 PulseTrain task; this task routes is output to a requested pin with will be used as a SOURCE for a Buffered Period task.
    (2) if requested creates a second PulseTrain who's output will be used as the Buffered Period GATE.
    (3) the Buffered period task needs to assign ANY SOURCE,GATE and run till its stopped by the user.
    Note that this task needs to "sample/read" its data and show it to the user.
    My questions are :
    (a) is the PulseTrain "output" re-route done OK ?
    (b) how to re-route the Period source/gate - I used DAQmxSetChanAttribute, but I an not sure it is right
    ©) how to make the Period task write the data into "my program buffer" so I do not have to read it when "stop" is pressed.
    I try to run with simulated devices on a P4 3.2GHZ running XP :
    First TrainPulse - ctr0, out->RSTI0
    Second TrainPulse - ctr1, out->RSTI1
    Period - ctr2, source=RSTI1, gate=RSTI0
    Running this program with a SIMULATED device - OK (data = 0). with the real device - I get error -200141
    I included my code.
    Attachments:
    DaQmx test.zip ‏147 KB

    I have a new question
    I need to create an event buffered task when the source=80mhz internal card timebase, gate=source of other counter (e.q for counter 1 use 0, for 3 use 2)
    I know that with Traditional-DAQ it will look like )see attch file):
    Now the convertion to DAQmx :
    ++++++++++++++++++++++++++++++
    void SetupEvent(void)
    if ( Internal.P6602_ID == -1 ) return;
    sprintf(Chan,"Dev%d/ctr1",Internal.P6602_ID); // channel 1
    DAQmxErrChk (DAQmxCreateTask("EventChan1",&DaqmxTasks.PCI_6602[1]));
    DAQmxErrChk (DAQmxCreateCICountEdgesChan(DaqmxTasks.PCI_6602[1],Chan,"EventChan1",DAQmx_Val_Rising,0,
    DAQmx_Val_CountUp));
    DAQmxErrChk (DAQmxSetTimingAttribute (DaqmxTasks.PCI_6602[1], DAQmx_SampTimingType, DAQmx_Val_SampClk) );
    DAQmxErrChk (DAQmxSetTimingAttribute (DaqmxTasks.PCI_6602[1], DAQmx_SampQuant_SampMode,DAQmx_Val_ContSamps) );
    DAQmxErrChk(DAQmxSetTimingAttribute (DaqmxTasks.PCI_6602[1],DAQmx_SampQuant_SampPerChan, BUF_MAX));
    // set source
    DAQmxErrChk (DAQmxSetTimingAttribute (DaqmxTasks.PCI_6602[1], DAQmx_SampClk_Src, "/Dev1/80MHzTimebase"));
    // and gate
    sprintf(msg,"/Dev%d/ctr0Source",Internal.P6602_ID);
    DAQmxErrChk(DAQmxSetChanAttribute (DaqmxTasks.PCI_6602[1], Chan, DAQmx_CI_CountEdges_Term, msg,0));
    sprintf(Chan,"Dev%d/ctr3",Internal.P6602_ID); // channel 3
    DAQmxErrChk (DAQmxCreateTask("EventChan3",&DaqmxTasks.PCI_6602[3]));
    DAQmxErrChk (DAQmxCreateCICountEdgesChan(DaqmxTasks.PCI_6602[3],Chan,"EventChan3",DAQmx_Val_Rising,0,
    DAQmx_Val_CountUp));
    DAQmxErrChk (DAQmxSetTimingAttribute (DaqmxTasks.PCI_6602[3], DAQmx_SampTimingType, DAQmx_Val_SampClk) );
    DAQmxErrChk (DAQmxSetTimingAttribute (DaqmxTasks.PCI_6602[3], DAQmx_SampQuant_SampMode,DAQmx_Val_ContSamps) );
    DAQmxErrChk(DAQmxSetTimingAttribute (DaqmxTasks.PCI_6602[3],DAQmx_SampQuant_SampPerChan, BUF_MAX));
    DAQmxErrChk (DAQmxSetTimingAttribute (DaqmxTasks.PCI_6602[1], DAQmx_SampClk_Src, "/Dev1/80MHzTimebase"));
    sprintf(msg,"/Dev%d/ctr2Source",Internal.P6602_ID);
    DAQmxErrChk(DAQmxSetChanAttribute (DaqmxTasks.PCI_6602[3], Chan, DAQmx_CI_CountEdges_Term, msg,0));
    return;
    Error:
    Internal.StartStop = OFF;
    if ( DAQmxFailed(error) ) DAQmxGetExtendedErrorInfo(errBuff,1024);
    StopCallBack();
    MessagePopup ("SetupEvent Error", errBuff);
    return;
    I am not sure this is the way to do it .
    Can samebody help ?
    Thanks, Galia
    Attachments:
    AutoScannerDAQCards.c ‏20 KB

Maybe you are looking for