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

Similar Messages

  • 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

  • Bus communications for 660x counter timer cards

    I believe I have a new application for 660x counter timer cards. I propose to build some additional circuitry on a blank PCI card to be installed in the same PC as the 660x card. If my sequence of pulses is generated on my home-built card, can this pulse sequence be fed via the PCI bus to the 660x card or must the 68 way connector be used. Can the PCI 6602 use the PCI bus for data receipt and transmission? Can the PXI 6602 use the PXI bus in a similar manner? Please note, my application will still be viable if the PCI/PXI bus cannot be used in this manner but it would give me more options and probably a 'cleaner' solution.
    Thanks and regards.

    Hello,
    This sounds like a really interesting project. I�m not exactly sure what the details of your application are, but I can tell you that the counter input and output signals are only available on the 68-pin connector of the 660x card.
    If there are any other questions you have about this card or how to interface to it, please let me know.
    Have a great day!
    Ken S.
    National Instruments

  • Mounting 3 pairs of omron sensor E3X-F21 at 25mm intervals to measure time taken by moving object breaking beams and connecting to 6601 counter/timer card

    System is Windows ME Labview 6.1 6601 Counter/timer card. 3 pairs of Omron Photoelectric sensors E3X-F21 are mounted on a flat surface and as the object passes the first pair of sensors it starts timer1 and timer2.
    As the object passes the second pair of sensors it stops timer1 and as the object passes the third pair of sensors it stops timer2
    We have a known distance between the sensors so we are able to calculate the objects speed and position.
    We need a wiring diagram to connect the sensors to the 6601 card.

    I think I can describe a method that'll probably be simpler than the previous answer because it won't require any external logic circuitry.
    1. Configure two counters for "Two-Edge Separation" measurement, let's say counters 0 and 1.
    2. Wire Sensor 1's signal to both AUX-0 and AUX-1.
    3. Wire Sensor 2's signal to GATE-0.
    4. Wire Sensor 3's signal to GATE-1.
    5. Wire each sensors' 'ground' to the appropriate ground pins on your terminal block.
    6. Software configure both counters to use "max internal timebase" for a source -- 20 MHz for the 6601.
    You can specify the polarity of the transition you care about for both the AUX and the GATE signal, but I'll explain in terms of rising edges for both.
    Counter 0 will count time from Sensor 1's rising e
    dge until Sensor 2's rising edge. Counter 1 will count time from Sensor 1's rising edge until Sensor 3's rising edge. The count values will be in units of "# of 20 MHz cycles elapsed."
    You can probably get a decent starting point on the software using one of the shipped examples.

  • 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.

  • 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

  • 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

  • What is the use of the auxiliary pins of 6602 counter card

    Hello,
              I want to know about the Behavior of the auxilliary pins in 6602 counter card.

    Hi Satish,
    Counter n Auxiliary Signal
    You can select any PFI or RTSI, as well as many other internal signals asthe Counter n Auxiliary (CtrnAux) signal. Much like this CtrnGate signal,the CtrnAux signal is configured in edge-detection or level-detection mode depending on the application performed by the counter. The aux signal can
    perform many different operations including starting and stopping the
    counter, generating interrupts, and saving the counter contents. You can
    also use this signal to control the counting direction in edge-counting
    applications.
    Regards,
    Santhosh M

  • Error while creating Time Card Using API

    Hello
    I have a requirement to run OTL Interface once day to create/update Time Card in OTL for those datea created on sysdate-1 in Service Module (data will get feeded from Service Module). For example this interface will run on sysdate to create time cards for those data created in the service module on sysdate-1.
    I have some sample data and code I am using but it is erroring out with different errors..Can anybody help me on this
    My Interface should run as expected below and my time card range will be Monday 24-Dec-2012 to Sunday 30-Dec-2012
    Interface Run Date Time Entry to process
    25-Dec-2012 24-Dec-2012 Data
    26-Dec-2012 25-Dec-2012 Data
    CREATE OR REPLACE PROCEDURE main_process (o_errbuf OUT VARCHAR2,
    o_ret_code OUT NUMBER,
    l_chr_from_date IN VARCHAR2,
    l_chr_to_date IN VARCHAR2)
    IS
    l_chr_skip VARCHAR2 (1);
    l_chr_task_exists VARCHAR2 (100);
    l_chr_error_msg VARCHAR2 (4000);
    l_num_tbb_id NUMBER;
    l_num_request_id NUMBER := fnd_global.conc_request_id;
    l_num_login_id NUMBER := fnd_global.login_id;
    l_num_user_id NUMBER := fnd_global.user_id;
    l_num_resp_id NUMBER := fnd_Profile.VALUE ('resp_ID');
    l_num_otl_appl_id CONSTANT NUMBER (3) := 809; -- This is the appl_id for OTL, do not change
    l_chr_proj_attr1 CONSTANT VARCHAR2 (7) := 'Task_Id';
    l_chr_proj_attr2 CONSTANT VARCHAR2 (10) := 'Project_Id';
    l_chr_proj_attr3 CONSTANT VARCHAR2 (16) := 'Expenditure_Type';
    l_chr_proj_attr4 CONSTANT VARCHAR2 (19) := 'Expenditure_Comment';
    l_chr_proj_attr5 CONSTANT VARCHAR2 (23) := 'SYSTEM_LINKAGE_FUNCTION';
    i_num_count NUMBER;
    i_num_rows_inserted NUMBER := NULL;
    l_chr_message fnd_new_messages.MESSAGE_TEXT%TYPE;
    l_chr_hdr_eligible VARCHAR2 (5);
    l_tbl_timecard_info hxc_self_service_time_deposit.timecard_info;
    l_tbl_attributes_info hxc_self_service_time_deposit.app_attributes_info;
    l_tbl_messages hxc_self_service_time_deposit.message_table;
    l_new_timecard_id NUMBER;
    l_new_timecard_ovn NUMBER;
    l_num_time_building_block_id hxc_time_building_blocks.time_building_block_id%TYPE;
    I NUMBER; --PENDING REMOVE
    l_message VARCHAR2 (2000); --PENDING REMOVE
    l_time_building_block_id NUMBER; --PENDING REMOVE
    CURSOR process_line
    IS
    SELECT ROWID ROW_ID, a.*
    FROM xxpowl.xxpowl_hxt_otl_intf a
    WHERE 1 = 1 --a.request_id = l_num_request_id
    AND a.status_flag = 'NEW' -- 'VALID'
    AND a.error_desc IS NULL
    AND a.service_activity_type IS NOT NULL;
    BEGIN
    FND_FILE.PUT_LINE (
    fnd_file.LOG,
    'Entered From Date:'
    || (TO_DATE ( (l_chr_from_date), 'YYYY/MM/DD HH24:MI:SS')));
    FND_FILE.PUT_LINE (
    fnd_file.LOG,
    'Entered To Date:'
    || (TO_DATE ( (l_chr_to_date), 'YYYY/MM/DD HH24:MI:SS')));
    FND_GLOBAL.APPS_INITIALIZE (user_id => l_num_user_id,
    resp_id => l_num_resp_id,
    resp_appl_id => l_num_otl_appl_id);
    BEGIN
    FND_FILE.PUT_LINE (
    fnd_file.LOG,
    'Inserting the data in the custom table XXPOWL_HXT_OTL_INTF');
    INSERT INTO xxpowl.XXPOWL_HXT_OTL_INTF (SR_NUMBER,
    PROJECT_TASK_OWNER,
    PROJECT_TASK_OWNER_PERSON_ID,
    PROJECT_ID,
    PROJECT_TASK_ID,
    ASSIGNEE,
    ASSIGNEE_ID,
    ASSIGNEE_PERSON_ID,
    ASSIGNEE_SUPERVISOR_PERSON_ID,
    TASK_NUMBER,
    PARENT_TASK_NUMBER,
    DEBRIEF_NUMBER,
    DEBRIEF_HEADER_ID,
    DEBRIEF_DATE,
    TASK_ASSIGNMENT_ID,
    DEBRIEF_OBJECT_VERSION_NUMBER,
    DEBRIEF_PER_COMPLETE,
    DEBRIEF_LINE_ID,
    DEBRIEF_PROCESS,
    SERVICE_ACTIVITY,
    SERVICE_ACTIVITY_TYPE,
    INVENTORY_ITEM_ID,
    ITEM,
    BUSINESS_PROCESS_ID,
    DEBRIEF_TRANSACTION_TYPE_ID,
    DEBRIEF_UOM_CODE,
    DEBRIEF_HOURS,
    CONV_DEBRIEF_IN_HOURS,
    DEBRIEF_START_TIME,
    DEBRIEF_END_TIME,
    DEBRIEF_SERVICE_DATE,
    NOTES,
    OTL_ELIGIBLE_FLAG,
    NOTIF_SENT_FLAG,
    NOTIF_ELIGIBLE_FLAG,
    ERROR_DESC,
    STATUS_FLAG,
    INITIAL_NOTIF_SENT_DATE,
    CREATION_DATE,
    CREATED_BY,
    LAST_UPDATE_DATE,
    LAST_UPDATED_BY,
    LAST_UPDATE_LOGIN,
    REQUEST_ID,
    INITIAL_REQUEST_ID)
    (SELECT b.incident_number sr_number,
    h.resource_name project_task_owner,
    h.source_id project_task_owner_person_id,
    b.external_attribute_1 project_id,
    b.external_attribute_2 project_task_id,
    jtf_task_utl.get_owner (d.resource_type_code, d.resource_id)
    assignee,
    d.resource_id assignee_id,
    jrre.source_id assignee_person_id,
    paa.supervisor_id assignee_supervisor_person_id,
    c.task_number task_number,
    (SELECT task_number
    FROM jtf_tasks_b z
    WHERE c.parent_task_id = z.task_id)
    parent_task_number,
    a.debrief_number,
    a.debrief_header_id debrief_header_id,
    a.debrief_date debrief_date,
    a.task_assignment_id task_assignment_id,
    a.object_version_number debrief_object_version_number,
    a.attribute1 debrief_per_complete,
    e.debrief_line_id debrief_line_id,
    cbp.name debrief_process,
    cttv.name service_activity,
    DECODE (cttv.attribute1,
    'Y', 'Service-Billable',
    'N', 'Service-Non Billable')
    service_activity_type,
    e.inventory_item_id inventory_item_id, --f.segment1 item,
    (SELECT segment1
    FROM mtl_system_items_b f
    WHERE e.inventory_item_id = f.inventory_item_id
    AND f.organization_id = b.inv_organization_id)
    item, --241 --Mater Org
    e.business_process_id business_process_id,
    e.transaction_type_id debrief_transaction_type_id,
    e.uom_code debrief_uom_code,
    e.quantity debrief_hours,
    (g.conversion_rate * e.quantity) conv_debrief_in_hours,
    e.labor_start_date debrief_start_time,
    e.labor_end_date debrief_end_time,
    e.service_date debrief_service_date,
    (SELECT note_tl.notes
    FROM JTF_NOTES_B NOTE, JTF_NOTES_TL NOTE_TL
    WHERE NOTE.JTF_NOTE_ID = NOTE_TL.JTF_NOTE_ID
    AND NOTE_TL.LANGUAGE = USERENV ('LANG')
    AND NOTE.SOURCE_OBJECT_ID = a.DEBRIEF_HEADER_ID
    AND note.jtf_note_id =
    (SELECT MAX (note1.jtf_note_id)
    FROM JTF_NOTES_B note1
    WHERE NOTE1.SOURCE_OBJECT_ID =
    a.DEBRIEF_HEADER_ID))
    notes,
    'Y',
    'N',
    'X',
    NULL,
    'NEW',
    NULL,
    SYSDATE,
    l_num_user_id,
    SYSDATE,
    l_num_user_id,
    l_num_login_id,
    l_num_request_id,
    l_num_request_id
    FROM csf_debrief_headers a,
    cs_incidents_all_b b,
    jtf_tasks_b c,
    jtf_task_assignments d,
    csf_debrief_lines e, --mtl_system_items_b f,
    mtl_uom_conversions g,
    jtf_rs_resource_extns_vl h,
    cs_business_processes cbp,
    cs_transaction_types_vl cttv --, cs_sr_task_debrief_notes_v notes
    jtf_rs_resource_extns_vl jrre,
    per_all_assignments_f paa
    WHERE a.task_assignment_id = d.task_assignment_id
    AND d.task_id = c.task_id
    AND c.source_object_id = b.incident_id
    AND c.source_object_type_code = 'SR'
    AND a.debrief_header_id = e.debrief_header_id
    AND e.uom_code = g.uom_code
    AND g.uom_class = 'Time'
    AND b.incident_owner_id = h.resource_id(+)
    AND e.business_process_id = cbp.business_process_id
    AND e.transaction_type_id = cttv.transaction_type_id
    AND d.resource_id = jrre.resource_id
    AND jrre.source_id = paa.person_id --= 181
    AND TRUNC (SYSDATE) BETWEEN paa.effective_start_date
    AND paa.effective_end_date
    AND TRUNC (e.last_update_date) BETWEEN TO_DATE (
    (l_chr_from_date),
    'YYYY/MM/DD HH24:MI:SS')
    AND TO_DATE (
    (NVL (
    l_chr_to_date,
    l_chr_from_date)),
    'YYYY/MM/DD HH24:MI:SS')
    AND NOT EXISTS
    (SELECT 1
    FROM xxpowl.XXPOWL_HXT_OTL_INTF old
    WHERE old.debrief_header_id =
    e.debrief_header_id
    AND old.task_number = c.task_number
    AND TRUNC (old.DEBRIEF_SERVICE_DATE) =
    TRUNC (e.SERVICE_DATE)
    AND old.DEBRIEF_TRANSACTION_TYPE_ID =
    e.TRANSACTION_TYPE_ID
    AND old.request_id <> l_num_request_id
    AND old.DEBRIEF_UOM_CODE = e.uom_code
    AND old.DEBRIEF_HOURS = e.quantity));
    i_num_rows_inserted := SQL%ROWCOUNT;
    fnd_file.put_line (fnd_file.LOG,
    'No of rows Inserted:' || i_num_rows_inserted);
    COMMIT;
    EXCEPTION
    WHEN OTHERS
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || 'Error while Inserting debrief lines data into custom table.Error: '
    || SQLERRM
    || '. Exiting the interface without processing further';
    fnd_file.put_line (fnd_file.LOG, l_chr_error_msg);
    ROLLBACK;
    RETURN;
    END;
    FOR process_line_rec IN process_line
    LOOP
    l_chr_error_msg := NULL;
    l_tbl_timecard_info.delete;
    l_tbl_attributes_info.delete;
    l_tbl_messages.delete;
    l_new_timecard_id := NULL;
    l_new_timecard_ovn := NULL;
    l_num_time_building_block_id := NULL;
    l_chr_message := NULL;
    i_num_count := 0;
    l_num_tbb_id := NULL;
    BEGIN
    hxc_timestore_deposit.create_time_entry (
    p_measure => process_line_rec.conv_debrief_in_hours,
    p_day => TO_DATE ( (process_line_rec.debrief_service_date),
    'DD/MM/RRRR'),
    p_resource_id => process_line_rec.assignee_person_id,
    p_comment_text => process_line_rec.notes
    || '....Remove this notes in the code logic....Request Id:'
    || l_num_request_id, --pending lokesh
    p_app_blocks => l_tbl_timecard_info,
    p_app_attributes => l_tbl_attributes_info,
    p_time_building_block_id => l_num_time_building_block_id);
    fnd_file.put_line (
    fnd_file.LOG,
    'Step#1 completed, TIME_BUILDING_BLOCK_ID:'
    || l_num_time_building_block_id);
    EXCEPTION
    WHEN OTHERS
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || '.Error in INSERT API CALL at Step#1 for the debrief line id: '
    || process_line_rec.debrief_line_id
    || '.Error:'
    || SQLERRM;
    END;
    BEGIN
    -- Classify Time
    -- Attribute1
    hxc_timestore_deposit.create_attribute (
    p_building_block_id => l_num_time_building_block_id,
    p_attribute_name => 'Task_Id',
    p_attribute_value => process_line_rec.project_task_id,
    p_app_attributes => l_tbl_attributes_info);
    EXCEPTION
    WHEN OTHERS
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || '.Error in INSERT API CALL at Step#2 for the debrief line id: '
    || process_line_rec.debrief_line_id
    || '.Error:'
    || SQLERRM;
    END;
    BEGIN
    -- Attribute2
    hxc_timestore_deposit.create_attribute (
    p_building_block_id => l_num_time_building_block_id,
    p_attribute_name => 'Project_Id',
    p_attribute_value => process_line_rec.project_id,
    p_app_attributes => l_tbl_attributes_info);
    EXCEPTION
    WHEN OTHERS
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || '.Error in INSERT API CALL at Step#3 for the debrief line id: '
    || process_line_rec.debrief_line_id
    || '.Error:'
    || SQLERRM;
    END;
    BEGIN
    -- Attribute3
    hxc_timestore_deposit.create_attribute (
    p_building_block_id => l_num_time_building_block_id,
    p_attribute_name => 'Expenditure_Type',
    p_attribute_value => 'Service-Billable',
    -- p_attribute_value=> 'Service-Non Billable',
    p_app_attributes => l_tbl_attributes_info);
    EXCEPTION
    WHEN OTHERS
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || '.Error in INSERT API CALL at Step#4 for the debrief line id: '
    || process_line_rec.debrief_line_id
    || '.Error:'
    || SQLERRM;
    END;
    BEGIN
    -- Attribute4
    hxc_timestore_deposit.create_attribute (
    p_building_block_id => l_num_time_building_block_id,
    p_attribute_name => 'Expenditure_Comment',
    p_attribute_value => 'Expenditure Comment created by API',
    p_app_attributes => l_tbl_attributes_info);
    EXCEPTION
    WHEN OTHERS
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || '.Error in INSERT API CALL at Step#5 for the debrief line id: '
    || process_line_rec.debrief_line_id
    || '.Error:'
    || SQLERRM;
    END;
    BEGIN
    -- Attribute5
    hxc_timestore_deposit.create_attribute (
    p_building_block_id => l_num_time_building_block_id,
    p_attribute_name => 'SYSTEM_LINKAGE_FUNCTION',
    p_attribute_value => 'ST',
    p_app_attributes => l_tbl_attributes_info);
    EXCEPTION
    WHEN OTHERS
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || '.Error in INSERT API CALL at Step#6 for the debrief line id: '
    || process_line_rec.debrief_line_id
    || '.Error:'
    || SQLERRM;
    END;
    BEGIN
    hxc_timestore_deposit.execute_deposit_process (
    p_validate => FALSE,
    p_app_blocks => l_tbl_timecard_info,
    p_app_attributes => l_tbl_attributes_info,
    p_messages => l_tbl_messages,
    p_mode => 'SAVE', -- p_mode-> 'SUBMIT', 'SAVE', 'MIGRATION', 'FORCE_SAVE' or 'FORCE_SUBMIT'
    p_deposit_process => 'OTL Deposit Process',
    p_timecard_id => l_new_timecard_id,
    p_timecard_ovn => l_new_timecard_ovn);
    COMMIT;
    hxc_timestore_deposit.log_messages (p_messages => l_tbl_messages);
    IF (l_tbl_messages.COUNT <> 0)
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || '.Error in INSERT API CALL at Step#7 for the debrief line id: '
    || process_line_rec.debrief_line_id
    || '.Error:'
    || SQLERRM
    || '.API Error messages are:';
    i_num_count := l_tbl_messages.FIRST;
    LOOP
    EXIT WHEN (NOT l_tbl_messages.EXISTS (i_num_count));
    l_chr_message :=
    fnd_message.get_string (
    appin => l_tbl_messages (i_num_count).application_short_name,
    namein => l_tbl_messages (i_num_count).message_name);
    fnd_file.put_line (
    fnd_file.LOG,
    (l_tbl_messages (i_num_count).message_name));
    l_chr_error_msg := l_chr_error_msg || l_chr_message || '.';
    i_num_count := l_tbl_messages.NEXT (i_num_count);
    END LOOP;
    END IF;
    EXCEPTION
    WHEN OTHERS
    THEN
    fnd_file.put_line (
    fnd_file.LOG,
    '**** Error.....Inside Exception Block in execute_deposit_process');
    BEGIN
    hxc_timestore_deposit.log_messages (
    p_messages => l_tbl_messages);
    EXCEPTION
    WHEN OTHERS
    THEN
    fnd_file.put_line (
    fnd_file.LOG,
    '*****Error....Inside Exception Block in hxc_timestore_deposit.log_messages.Error:'
    || SQLERRM);
    END;
    l_chr_error_msg :=
    l_chr_error_msg
    || 'Error in INSERT API CALL at Step#7 for the debrief line id: '
    || process_line_rec.debrief_line_id
    || '.Error:'
    || SQLERRM
    || '.API Error messages are:';
    IF (l_tbl_messages.COUNT <> 0)
    THEN
    i_num_count := l_tbl_messages.FIRST;
    LOOP
    EXIT WHEN (NOT l_tbl_messages.EXISTS (i_num_count));
    l_chr_message :=
    fnd_message.get_string (
    appin => l_tbl_messages (i_num_count).application_short_name,
    namein => l_tbl_messages (i_num_count).message_name);
    l_chr_error_msg := l_chr_error_msg || l_chr_message || '.';
    i_num_count := l_tbl_messages.NEXT (i_num_count);
    END LOOP;
    END IF;
    END;
    COMMIT;
    IF l_chr_error_msg IS NOT NULL OR l_new_timecard_id IS NULL
    THEN
    fnd_file.put_line (fnd_file.LOG,
    '***** Error *****' || l_chr_error_msg);
    o_ret_code := 1;
    END IF;
    BEGIN
    fnd_file.put_line (
    fnd_file.LOG,
    'Updating the status of the record in custom table for debrief_line_id:'
    || process_line_rec.debrief_line_id);
    UPDATE xxpowl.XXPOWL_HXT_OTL_INTF
    SET status_flag =
    DECODE (
    l_chr_error_msg,
    NULL, DECODE (
    l_new_timecard_id,
    NULL, 'FAILED',
    DECODE (SIGN (l_new_timecard_id),
    '1', 'SUCESS',
    'FAILED')),
    'FAILED'),
    time_building_block_id = l_new_timecard_id,
    last_update_date = SYSDATE,
    request_id = l_num_request_id,
    last_updated_by = l_num_user_id,
    error_desc = l_chr_error_msg
    WHERE ROWID = process_line_rec.row_id;
    COMMIT;
    EXCEPTION
    WHEN OTHERS
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || '.Error while updating the status to SUCCESS.Error: '
    || SQLERRM;
    END;
    END LOOP; --process_line
    EXCEPTION
    WHEN OTHERS
    THEN
    FND_FILE.PUT_LINE (
    fnd_file.LOG,
    'Unknown/Unhandlled Exception Error......' || SQLERRM);
    o_ret_code := 2;
    END main_process;
    SHOW ERR;
    Error Messages:
    1. Error in INSERT API CALL at Step#7 for the debrief line id: 41011.Error:ORA-00001: unique constraint (HXC.HXC_ROLLBACK_TIMECARDS_PK) violated.
    2. Error in INSERT API CALL at Step#7 for the debrief line id: 41011.Error:ORA-00001: unique constraint (HXC.HXC_LATEST_DETAILS_FK) violated
    Thanks a lot for the help!

    Hello
    We will get this error message when we run this from application other than "Time and Labor Engine". So try to run this concurrent program (if you registered as a conc. program) from Time and Labor Engine application.
    --Lokesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to use Counter/timer PWM Pulse as a trigger to aquire data??

    (1) I'm using the NI DAQpad 6015 multi-function card with the new DAQmx Driver. I'm using the counter/timer (counter 0, and counter 1) to generate 2 different PWM pulses to supply my sensor circuit. each pulse is a 1 second in duration. The pulse with 5m.sec duty cycle is the supply for my sensor. In addition to that, I'd like to use the 5 m.sec as a trigger to aquire the sensor reading. The DETECTIN POINT should be the middle of the HIGH State of the 5m.sec pulse (i.e just at the 2.5 m.sec point of the high state).  
    (2) another point is: how to display the counter/timer pwm output pulses on the front pannel?? 
    Attached is the VI i'm using (Complete PWM.vi)
    regards,
    Attachments:
    Complete PWM.vi ‏49 KB

    Hello alaali,
    It sounds like what you need is a trigger delay property node.  This property node specifies an amount of time to wait after the Start Trigger is received before acquiring or generating the first sample. This value is in the units you specify with Start.DelayUnits.  This way you can still acquire using the trigger, and you can specify the delay to be 2.5 ms so that the point that you actually acquire will be 2.5 ms after the trigger.
    Hope this helps.
    Regards,Message Edited by Raajit L on 04-23-2007 04:34 PM
    Raajit L
    National Instruments
    Attachments:
    DAQmx Trigger Delay.jpg ‏6 KB

  • Low profile counter/timer board

    Does NI (or anyone else) make a low-profile counter/timer board? Perhaps with specs similar to 6602? If not, are there some other options that I could look into (I think the sample rates may be too high to use USB)?
    Solved!
    Go to Solution.

    Hi greatgrandpadog,
    Unfortunately, NI does not have any counter/timer solutions that are low-profile on PCI.
    Our cDAQ-9171 single slot USB chassis has four 32-bit counter/timers that can use an onboard 80 MHz clock (detailed specifications).  For external signals, you would need to use one of our digital i/o module which have various specifications.  You can find a list of them here.  This will be the best way to go for a compact USB counter/timer.  If you have additional i/o, take a look at our CompactDAQ Advisor, where you can use a 4- or 8-slot chassis to expand your i/o in a single system.  For more sophisticated control, CompactRIO offers a similar platform but with FPGA and Real-Time for greater customization and reliability.  There is an online advisor for that as well, here.
    Regards,
    Chris E.
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • OTL Time Card

    Hi,
    Update Time Card API not working.. Can you please correct me where am I doing wrong.
    /* Formatted on 2011/07/20 16:11 (Formatter Plus v4.8.8) */
    DECLARE
    v_tbl_timecard_info hxc_self_service_time_deposit.timecard_info;
    v_tbl_attributes_info hxc_self_service_time_deposit.app_attributes_info;
    v_tbv_messages hxc_self_service_time_deposit.message_table;
    v_new_timecard_id NUMBER;
    v_new_timecard_ovn NUMBER;
    i PLS_INTEGER;
    v_message fnd_new_messages.MESSAGE_TEXT%TYPE;
    BEGIN
    fnd_global.apps_initialize (user_id => 1111,
    resp_id => 23818,
    resp_appl_id => 809
    hxc_timestore_deposit.update_building_block
    (p_building_block_id => 2355,
    p_start_time => TO_DATE
    ('18-Jul-2011 09:00:00',
    'DD-Mon-YYYY HH24:MI:SS'
    p_stop_time => TO_DATE
    ('18-Jul-2011 10:00:00',
    'DD-Mon-YYYY HH24:MI:SS'
    p_comment_text => 'Modification '
    || TO_CHAR (SYSDATE,
    'hh:mi:ss'
    p_app_blocks => v_tbl_timecard_info,
    p_app_attributes => v_tbl_attributes_info
    hxc_timestore_deposit.execute_deposit_process
    (p_validate => FALSE,
    p_app_blocks => v_tbl_timecard_info,
    p_app_attributes => v_tbl_attributes_info,
    p_messages => v_tbv_messages,
    p_mode => 'SAVE',
    p_deposit_process => 'OTL Deposit Process',
    p_timecard_id => v_new_timecard_id,
    p_timecard_ovn => v_new_timecard_ovn
    -- messages have been returned
    IF v_tbv_messages.COUNT != 0
    THEN
    i := v_tbv_messages.FIRST;
    LOOP
    EXIT WHEN (NOT v_tbv_messages.EXISTS (i));
    -- First translate the message as the messagetable returned does not give the actual
    -- message, only the message_name which doesn't mean anything to the user.
    v_message :=
    fnd_message.get_string
    (appin => v_tbv_messages (i).application_short_name,
    namein => v_tbv_messages (i).message_name
    -- returns 4: 4
    DBMS_OUTPUT.put_line ( v_tbv_messages (i).message_name
    || ': '
    || v_message
    i := v_tbv_messages.NEXT (i);
    END LOOP;
    END IF;
    END;
    Thanks,
    Anil

    Confusion reigns!
    The OTL Workflow for Employees (HXCEMP) does appear to have a number of processes... possibly for different functions.
    Is there any other reference of use other than the OTL Implementation and User guide?
    What does the HXCSAW workflow do? This is the seeded approval workflow that really doesnt appear to do anything...
    Thanks,
    Will

  • Counter/timer rate

    Hi,
    I am using the counter/timer input on a 6040E card for event counting.
    I am using CTR0 and have specified the 20MHz clock as my source and connected my event to the gate (PFI9). I am counting a finite number of pulses and I am configuring the buffer using the DAmx Timing vi (sample clock instance).
    My question is regarding the 'rate' input. As the counter source is set to the 20MHz is this not the rate? Can anyone advise as to how I choose a sensible rate value and what effect it has.
    I normally use the rate for analogue IO buffers in order to set the buffer rate - I just can't quite see it's use in this instance.
    Thanks
    David
    www.controlsoftwaresolutions.com
    Solved!
    Go to Solution.

    Usually you have 2 types of things you want to do with counters, Count edges or count a clock between edges.
    For edge counting you are incrementing (or decrementing) the count for each specified edge on a pfi line (you can select this) you can read this value periodically to see the current count.  For counter measurment you are counting the number of clock cycles (this is where the source is probably the 20MHz onboard clock) between specified edges at the at gate.  This is useful for frewuency or pulse duration measurments.  each measurment is buffered and you can read the buffer periodically.
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

Maybe you are looking for

  • TCP/IP instrumented debugging with Blackfin EZ-kit

    I have been evaluating the LabVIEW for Blackfin with a BF537 EZ-Kit the last few days...so far, I have been able to get all the example programs to run using the non-instrumented USB debugger interface. I have run the Web Server Buttons example, and

  • InDesign CS6 OSX linked fonts not recognized

    I am using InDesign CS6 on Mountain Lion and I received a document from a PC InDesign user with a linked AI image and document fonts folder included. When I launch the idd file the fonts are "missing". OSX does not seem to recognize the font files in

  • HT204053 if i changed my Apple ID in iTunes, how do I chnage it for iCloud?

    I just loaded mountain lion on my computer. At the time I had an apple id which I have subsequently changed in iTunes. How do I make the cnage in iCloud so they both use the same ID?

  • Access to PA20 - conflicts

    Hi I have just created a new role that gives display access to PA20, only for Infotypes 0001, 0002, 0024 and 0041 the role works fine for a user who has only ESS access This role gives access to all Empl Groups (e.g. EE) Another user needs this role

  • Read & Modify the table view data

    Dear Experts, CRM 7.0 I've added few extra custom fields to the table view through Workbench enhancment as AET does not work for my object type. Now, I would like to read the current table entries and accordingly i should fill the other columns. I am