Losing counts using asynchronous reads

Hi guys, I have been working on an application to allow me to do imaging on a microscope. Using an external clock source I need to "bin" photons coming from my sample for a set period of time. To do these measurements I devised an APD object in C#. The code to this opject is attached. When I want to measure I call the following code to instantiate the APDs I need; Identifier (Not Daq related, used by my code elsewhere), Channel number (Not Daq related, used by my code elsewhere), Device (a 6601 or 6602), The counter delimiting bintime, Timebase (20 or 80), The line taking in triggers, The counter counting photons, The line taking in the actual photon TTLs  this.m_apdAPD1 = new KUL.MDS.Hardware.APD("APD1", 0, "Dev1", "Ctr2", "80MHzTimebase", "PFI27", "Ctr1", "PFI39");
 this.m_apdAPD2 = new KUL.MDS.Hardware.APD("APD2", 1, "Dev1", "Ctr4", "80MHzTimebase", "PFI31", "Ctr3", "PFI35");  Where "this" is the form that hosts my APDs. I start actual measurement like so:  this.m_apdAPD1.StartAPDAcquisition(2, 128*128, 128);  Meaning that I will bin photons for a 2 ms period, that my image consists of 128*128 pixels and that I will read those pixels line per line. Once this method is called on the APDs they will sit around and wait until triggers come in on PFI27 or PFI31 (indicating a new position of the sample reached) and then they will count photon TTLs coming in from either PFI39 or 35...  Internally the APD object uses BeginRead and EndRead sets to read the actual photon counts. TheStartAPDAcquisition is called on the UI thread and for the Reader I set SynchronizeCallbacks = true; Therefore, also the CallBack is fired on the UI thread, which means all measured variables are updated on the UI thread (not that I think it matters here, but still). All this works fine most of the time, however, in a seemingly random fashion it will happen that APD1 does not register all triggers coming in on PFI27 and thus never collects all 128*128 pixels (and thus times out). What is strange is that if I switch around PFI27 and PFI31 like so:  this.m_apdAPD1 = new KUL.MDS.Hardware.APD("APD1", 0, "Dev1", "Ctr2", "80MHzTimebase", "PFI31", "Ctr1", "PFI39");
 this.m_apdAPD2 = new KUL.MDS.Hardware.APD("APD2", 1, "Dev1", "Ctr4", "80MHzTimebase", "PFI27", "Ctr3", "PFI35");  it is  still the first APD that will time out. Furthermore, I am 100% certain the triggers are indeed coming in on these lines from my external source. Also, when I was using my APD objects synchronously in a previous version of the code (or rather, when they relied on Synchronous Reads internally), all counts also registered perfectly. Sadly enough I cannot keep working synchronously for various reasons. The randomness of the issue makes me suspect I might be suffering from a bug related to threading/async operations where things happen in the expected order most of the time, yet not always. This issue is a big showstopper for me so any help would be greatly appreciated! Message Edited by KrisJa on 09-21-2009 05:01 AM

Hi Dan, Thanks already for the interest. First off, I tweaked the code for my APD class just a little bit (commented out some stuff I think was superfluous and explicitly start one of my tasks). The new version is attached, together with the source to PhotoDiode, another detector class that also suffers from the problem.  I attached a scheme for the triggering/timing as well, I hope it is somewhat clear, if not I can provide more detailed info. The APDs are instantiated on a form like so; // Board, Binpulsegen, Timebase, Triggerline, TTLCounter, Inputline
this.m_apdAPD1 = new KUL.MDS.Hardware.APD("APD1", 0, "Dev1", "Ctr6", "80MHzTimebase", "PFI31", "Ctr5", "PFI39");
this.m_apdAPD2 = new KUL.MDS.Hardware.APD("APD2", 1, "Dev1", "Ctr4", "80MHzTimebase", "PFI27", "Ctr3", "PFI35");  Subsequently, their events are hooked up and they are started; this.m_apdAPD1.StartAPDAcquisition(
                    _docDocument.TimePPixel,                                             // For example 2, indicating 2 ms
                    _docDocument.PixelCount,                                             // For example 128 * 128                                       _docDocument.PixelCount / _docDocument.ImageWidthPx); // Mostly 128, to read in 128 value chunks but can be -1 also this.m_apdAPD2.StartAPDAcquisition(
                    _docDocument.TimePPixel,
                    _docDocument.PixelCount,
                    _docDocument.PixelCount / _docDocument.ImageWidthPx);  When they are started they will sit and wait for triggers coming in from an external Piezo controller (see attached scheme). They will timeout after 5 second. The eventhandler for the BufferUpdated event is;  private void det_BufferUpdated(object __oSender, EventArgs __evargsE)
            KUL.MDS.Hardware.IDetector _idetDetector = (KUL.MDS.Hardware.IDetector)__oSender;    // Get to props/methods of the sender
            ScanDocument _docDocument = this.Document as ScanDocument;                                 // Class that holds data
            if (_idetDetector.Type == DetectorType.APD)
                //_docDocument.StoreChannelData(1, this.m_apdAPD2.APDBuffer);
                _docDocument.StoreChannelData(_idetDetector.Channel, ((APD)_idetDetector).APDBuffer);
            if (_idetDetector.Type == DetectorType.PD)
               // PhotoDiodes get treated differently, this eventhandler is used by all IDetectors...
        } The AcquisitionDone event is currently not used...  Finally, my form also holds a Forms.Timer that ticks every 800ms, the Tick handler is as follows; private void m_tmrUITimer_Tick(object __oSender, EventArgs __evargsE)
            PaintToScreen();                                                       // Paint the recorded images from both APDs to screen            UpdateUI();
             if (this.m_apdAPD2.IsDone & this.m_apdAPD1.IsDone)
                if (this.m_Stage.IsScanning)
                    this.m_Stage.Stop();
                this.m_tmrUITimer.Stop();
                this.m_Stage.Home();
                // Handle auto-save, omitted for clarity.              
                // Enable all controls again.
                EnableCtrls();
                UpdateUI();
                // Unhook some events here... deleted for clarity.
        }  I attached the code for the form where all this happens for completeness, it is more messy than my other source files though, because I am constantly tinkering it.  Finally, what I mean by missed counts is that in 8 out of ten cases, when I set out to record a 128*128 image both APDs actually accumulate 128*128 pulsewidth measurements (=photon counts for every pixel) as expected. However, every so often APD1 (the one that is started first in code) fails to accumulate the full amount of points. After 5 seconds it obviously times out. I did a number of tests; I disabled each of the APD's one at a time in code and used Measurement and Automation to check if the piezo controller was actually feeding the correct amount of triggers to the terminals used by the disabled APD. As far as I could tell (I tried 10 times for each APD) this was always the case, so the problem is not with actual missing HW triggersI changed the counters and PFI's used by each instance of my APD class. This also had no effect. 8 out of 10 measurements were ok butevery so often APD1 failed ( so again the instance that was started first ) even though it was now hooked up to collect the signals that were previously going to the APD2 instance (I hope this makes sense).I set the APD's up to do -1 reads (all samples available) and the amount of lost pixels is way less than 128 and appears random.So in conclusion, the bug is quite random. Mostly my app works fine, but sometimes it does not. AFAIK the HW is fine. The randomness of it all makes my suspect something to do with concurrency (in the async calls???) but I do not see how... This is a really frustrating issue!! Anyway, I hope my ramblings make sense to you! If you need info, please let me know!  

Similar Messages

  • Losing counts using asynchrono​us reads

    Hi guys,
    I have been working on an application to allow me to do imaging on a microscope. Using an external clock source I need to "bin" photons coming from my sample for a set period of time.
    To do these measurements I devised an APD object in C#. The code to this opject is attached.
    When I want to measure I call the following code to instantiate the APDs I need;
    Identifier (Not Daq related, used by my code elsewhere),
    Channel number (Not Daq related, used by my code elsewhere),
    Device (a 6601 or 6602),
    The counter delimiting bintime,
    Timebase (20 or 80),
    The line taking in triggers,
    The counter counting photons,
    The line taking in the actual photon TTLs
     this.m_apdAPD1 = new KUL.MDS.Hardware.APD("APD1", 0, "Dev1", "Ctr2", "80MHzTimebase", "PFI27", "Ctr1", "PFI39");
     this.m_apdAPD2 = new KUL.MDS.Hardware.APD("APD2", 1, "Dev1", "Ctr4", "80MHzTimebase", "PFI31", "Ctr3", "PFI35");
    Where "this" is the form that hosts my APDs.
    I start actual measurement like so: 
    this.m_apdAPD1.StartAPDAcquisition(2, 128*128, 128);
    Meaning that I will bin photons for a 2 ms period, that my image consists of 128*128 pixels and that I will read those pixels line per line. Once this method is called on the APDs they will sit around and wait until triggers come in on PFI27 or PFI31 (indicating a new position of the sample reached) and then they will count photon TTLs coming in from either PFI39 or 35...
    Internally the APD object uses BeginRead and EndRead sets to read the actual photon counts. TheStartAPDAcquisition is called on the UI thread and for the Reader I set SynchronizeCallbacks = true; Therefore, also the CallBack is fired on the UI thread, which means all measured variables are updated on the UI thread (not that I think it matters here, but still).
    All this works fine most of the time, however, in a seemingly random fashion it will happen that APD1 does not register all triggers coming in on PFI27 and thus never collects all 128*128 pixels (and thus times out). What is strange is that if I switch around PFI27 and PFI31 like so:
     this.m_apdAPD1 = new KUL.MDS.Hardware.APD("APD1", 0, "Dev1", "Ctr2", "80MHzTimebase", "PFI31", "Ctr1", "PFI39");
     this.m_apdAPD2 = new KUL.MDS.Hardware.APD("APD2", 1, "Dev1", "Ctr4", "80MHzTimebase", "PFI27", "Ctr3", "PFI35");
    it is  still the first APD that will time out.
    Furthermore, I am 100% certain the triggers are indeed coming in on these lines from my external source. Also, when I was using my APD objects synchronously in a previous version of the code (or rather, when they relied on Synchronous Reads internally), all counts also registered perfectly. Sadly enough I cannot keep working synchronously for various reasons.
    The randomness of the issue makes me suspect I might be suffering from a bug related to threading/async operations where things happen in the expected order most of the time, yet not always.
    This issue is a big showstopper for me so any help would be greatly appreciated!
    Message Edited by KrisJa on 09-21-2009 05:01 AM
    Attachments:
    APD.cs ‏17 KB

    Hi Dan,
    Thanks already for the interest. First off, I tweaked the code for my APD class just a little bit (commented out some stuff I think was superfluous and explicitly start one of my tasks). The new version is attached, together with the source to PhotoDiode, another detector class that also suffers from the problem.
    I attached a scheme for the triggering/timing as well, I hope it is somewhat clear, if not I can provide more detailed info.
    The APDs are instantiated on a form like so;
    // Board, Binpulsegen, Timebase, Triggerline, TTLCounter, Inputline
    this.m_apdAPD1 = new KUL.MDS.Hardware.APD("APD1", 0, "Dev1", "Ctr6", "80MHzTimebase", "PFI31", "Ctr5", "PFI39");
    this.m_apdAPD2 = new KUL.MDS.Hardware.APD("APD2", 1, "Dev1", "Ctr4", "80MHzTimebase", "PFI27", "Ctr3", "PFI35");
    Subsequently, their events are hooked up and they are started;
    this.m_apdAPD1.StartAPDAcquisition(
                        _docDocument.TimePPixel,                          ​                   // For example 2, indicating 2 ms
                        _docDocument.PixelCount,                          ​                   // For example 128 * 128                   
                        _docDocument.PixelCount / _docDocument.ImageWidthPx); // Mostly 128, to read in 128 value chunks but can be -1 also this.m_apdAPD2.StartAPDAcquisition(
                        _docDocument.TimePPixel,
                        _docDocument.PixelCount,
                        _docDocument.PixelCount / _docDocument.ImageWidthPx);
    When they are started they will sit and wait for triggers coming in from an external Piezo controller (see attached scheme). They will timeout after 5 second.
    The eventhandler for the BufferUpdated event is;
     private void det_BufferUpdated(object __oSender, EventArgs __evargsE)
                KUL.MDS.Hardware.IDetector _idetDetector = (KUL.MDS.Hardware.IDetector)__oSender;    // Get to props/methods of the sender
                ScanDocument _docDocument = this.Document as ScanDocument;                                 // Class that holds data
                if (_idetDetector.Type == DetectorType.APD)
                    //_docDocument.StoreChannelData(1, this.m_apdAPD2.APDBuffer);
                    _docDocument.StoreChannelData(_idetDetector.Channe​l, ((APD)_idetDetector).APDBuffer);
                if (_idetDetector.Type == DetectorType.PD)
                   // PhotoDiodes get treated differently, this eventhandler is used by all IDetectors...
    The AcquisitionDone event is currently not used...
     Finally, my form also holds a Forms.Timer that ticks every 800ms, the Tick handler is as follows;
    private void m_tmrUITimer_Tick(object __oSender, EventArgs __evargsE)
                PaintToScreen();                                  ​                     // Paint the recorded images from both APDs to screen
                UpdateUI();
                if (this.m_apdAPD2.IsDone & this.m_apdAPD1.IsDone)
                    if (this.m_Stage.IsScanning)
                        this.m_Stage.Stop();
                    this.m_tmrUITimer.Stop();
                    this.m_Stage.Home();
                    // Handle auto-save, omitted for clarity.              
                    // Enable all controls again.
                    EnableCtrls();
                    UpdateUI();
                    // Unhook some events here... deleted for clarity.
    I attached the code for the form where all this happens for completeness, it is more messy than my other source files though, because I am constantly tinkering it.
    Finally, what I mean by missed counts is that in 8 out of ten cases, when I set out to record a 128*128 image both APDs actually accumulate 128*128 pulsewidth measurements (=photon counts for every pixel) as expected. However, every so often APD1 (the one that is started first in code) fails to accumulate the full amount of points. After 5 seconds it obviously times out.
    I did a number of tests;
    I disabled each of the APD's one at a time in code and used Measurement and Automation to check if the piezo controller was actually feeding the correct amount of triggers to the terminals used by the disabled APD. As far as I could tell (I tried 10 times for each APD) this was always the case, so the problem is not with actual missing HW triggers
    I changed the counters and PFI's used by each instance of my APD class. This also had no effect. 8 out of 10 measurements were ok butevery so often APD1 failed ( so again the instance that was started first ) even though it was now hooked up to collect the signals that were previously going to the APD2 instance (I hope this makes sense).
    I set the APD's up to do -1 reads (all samples available) and the amount of lost pixels is way less than 128 and appears random.
    So in conclusion, the bug is quite random. Mostly my app works fine, but sometimes it does not. AFAIK the HW is fine. The randomness of it all makes my suspect something to do with concurrency (in the async calls???) but I do not see how... This is a really frustrating issue!!
    Anyway, I hope my ramblings make sense to you! If you need info, please let me know!
    Attachments:
    Imaging Timing Implementation.pdf ‏66 KB
    APD.cs ‏17 KB
    PhotoDiode.cs ‏16 KB

  • Asynchronous read & write by using Asynchronous api provided in nio-java 7

    HI,
    I am trying to write a small program to implement **asynchronous read & write by using Asynchronous api provided in nio in java 1.7** in windows machine.
    i tried the following code to write a small string to a file asynchronously.file is getting created but the contents are not dispalying.
         static long startTime = System.currentTimeMillis();
         static long endTime;
         static long execTime;
         public static void main(String[] args) {
              String path = "C:\\AsynchWrite.txt";
              Path file = Paths.get(path);
              final AsynchronousFileChannel channel;
              long pos = 1;
              try {
                   OpenOption[] options = { StandardOpenOption.CREATE,
                             StandardOpenOption.WRITE, StandardOpenOption.SYNC };
                   channel = AsynchronousFileChannel.open(file, options);
                   ByteBuffer buffer = ByteBuffer.allocate(1000);
                   String writeThis = "Testing by writing a line";
                   byte[] src = writeThis.getBytes();
                   buffer.put(src);
                   channel.write(buffer, pos, null,
                             new CompletionHandler<Integer, Object>() {
                                  @Override
                                  public void completed(Integer result, Object attachment) {
                                       System.out.println("completed successfully");
                                       System.out.println("start time :" + startTime);
                                       endTime = System.currentTimeMillis();
                                       System.out.println("end time : " + endTime);
                                       execTime = endTime - startTime;
                                       System.out.println("Execution Time :" + execTime);
                                       System.out.println("Execution Time(ms) :"
                                                 + execTime);
                                       try {
                                            channel.force(true);
                                            channel.close();
                                       } catch (IOException e) {
                                            // TODO Auto-generated catch block
                                            e.printStackTrace();
                                  @Override
                                  public void failed(Throwable exc, Object attachment) {
                                       // TODO Auto-generated method stub
                                       System.out.println("failed!!");
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         }Please help me out
    Thanks in advance,
    Ravi

    It looks like you are missing buffer.flip() after your put as otherwise the buffer position will be at 25 (not 0 as you expect).

  • Using asynchronous timer for data flow control

    Hi all,
      I am using system sleep to control the data flow (some digital lines and analog output). The pseudo code is something like this
    Sleep(150);
    // the following sections are exectuted in parallel
      #pragma omp parallel sections
        #pragma omp section
          DAQmxWriteDigitalLines(...); // output TTL to one digitla line
        #pragma omp section
          DAQmxWriteDigitalLines(...); // output TTL to another digitla line     
        #pragma omp section
          Sleep(2); // sleep 2ms
    // the following sections are exectuted in parallel
      #pragma omp parallel sections
        #pragma omp section
          DAQmxWriteDigitalLines(...); // output TTL to one digitla line
        #pragma omp section
          DAQmxWriteAnalogScalarF64(...); // analog output to one channel
        #pragma omp section
          Sleep(1); // delay 1ms
    // the following sections are exectuted in parallel
      #pragma omp parallel sections
        #pragma omp section
          DAQmxWriteDigitalLines(...); // output TTL to one digitla line
        #pragma omp section
          DAQmxWriteAnalogScalarF64(...); // analog output to one channel
    #pragma omp section
          DAQmxWriteAnalogScalarF64(...); // analog output to another channel
        #pragma omp section
          Sleep(11); // delay 11ms
    // ... other stuffs
    I am running windows XP and I know it is not possible to get realtime control but  I want a as precise timing as possible. Above code is not perfect but it works 95% of times. I just read an article about using the asynchronous timer to control the time delay. I try that idea with the following code frame
    int CVICALLBACK ATCallback(int reserved, int timerId, int event, void *callbackData, int eventData1, int eventData2)
    if (event==EVENT_TIMER_TICK)
    int *nextdelay = (int *)callbackData;
    SuspendAsyncTimerCallbacks();
    if (timerId>=0)
    double time;
    if (*nextdelay==0) time=2.0;
    else if (*nextdelay==1) time=1.0;
    else time=12.0;
    SetAsyncTimerAttribute(timerId, ASYNC_ATTR_INTERVAL, time);
    if (*nextdelay==0)
    #pragma omp parallel sections
    #pragma omp section
    DAQmxWriteDigitalLines(...); // output TTL to one digitla line
    #pragma omp section
    DAQmxWriteDigitalLines(...); // output TTL to another digitla line
    *nextdelay++;
    else if (*nextdelay==2)
    #pragma omp parallel sections
    #pragma omp section
    DAQmxWriteDigitalLines(...); // output TTL to one digitla line
    #pragma omp section
    DAQmxWriteAnalogScalarF64(...); // analog output to one channel
    *nextdelay++;
    else if (*nextdelay==3)
    #pragma omp parallel sections
    #pragma omp section
    DAQmxWriteDigitalLines(...); // output TTL to one digitla line
    #pragma omp section
    DAQmxWriteAnalogScalarF64(...); // analog output to one channel
    #pragma omp section
    DAQmxWriteAnalogScalarF64(...); // analog output to another channel
    *nextdelay++;
    ResumeAsyncTimerCallbacks();
    return 0;
    void main(void)
    int n = 0;
    int timeid;
    timeid = NewAsyncTimer(120.0/1000.0, 3, 1, ATCallback, &n);
    But it doesn't work. There is no compilation and runtime error but the timing just not right. I wonder do I have to suspend the timer in the callback function when I reset the delay for next call? If I do so, I am worry if it will apply too much delay (since I suspend and resume the timer in the delay) so it will cause even worse timing. But if I don't suspend the timer before I reset the time, what happen if the code running in the callback function not finished before the next callback arrive. It is quite confusing how to use asynchronous timer in this case. Thanks.

    Yeah, unfortunately the 6711 doesn't have clocked digital I/O.  There are only two counters anyway so even if you could use them to generate your signals you wouldn't have enough (*maybe* something with the 4 AO channels and a counter depending on what your output signals need to look like?  The AO channels can output "digital" as well if you write 0V or 5V only).
    A PCI DAQ card which does support clocked digital I/O and has 2 analog outputs is the 6221 (or if you could use PCIe the 6321 is a more updated version with two extra counters and some additional functionality).
    If there isn't a way to implement clocked outputs afterall, one thing you could do to make your code a little more efficient is to consolidate the writes.  You can put your digital lines into a single task and write them at ocne, and you can put your analog channels into a single task and write them at once as well.
    I'm not sure about the callback issue, you might find some more help in the CVI forum.  I don't think it's going to solve your underlying problem though as ultimately the execution timing of your software calls is at the mercy of your OS.
    Best Regards,
    John Passiak

  • How to create a counter using Oracle SQL Developer?

    Is there any way to create a counter using Oracle SQL Developer to create the below scenario. Meaning it will recorded down the name of user and ID and time and the date they login.
    Library portal home statistics shows how many users (outside and within the campus) visit the library portal.
    Page Access statistics is recorded on an hourly basis. Users may select the statistics by
    yearly (statistics displayed by all months in the selected year)
    monthly (statistics displayed by all days in the selected month)
    daily (statistics displayed by all hours in the selected day)

    I'm giving here one basic post - hope this will solve your problem --
    SQL>
    SQL>
    SQL> create table audit_info
      2   (
      3     usr        varchar2(50),
      4     log_time   timestamp(6)
      5    );
    Table created.
    SQL>
    SQL>
    SQL>  create table err_log
      2     (
      3       log_cd      varchar2(20),
      4       log_desc    varchar2(500)
      5     );
    Table created.
    SQL>
    SQL>
    SQL>   create or replace procedure ins_err(errcd   in  varchar2,
      2                                        errnm   in  varchar2)
      3    is
      4      pragma autonomous_transaction;
      5    begin
      6      insert into err_log values(errcd,errnm);
      7      commit;
      8    end;
      9  /
    Procedure created.
    SQL>
    SQL>
    SQL>   create or replace procedure ins_aud(ud   in varchar2,
      2                                        unm  in varchar2)
      3    is
      4      pragma autonomous_transaction;
      5    begin
      6      insert into audit_info values(ud,unm);
      7      commit;
      8    exception
      9      when others then
    10        ins_err(sqlcode,sqlerrm);
    11    end;
    12  /
    Procedure created.
    SQL>
    SQL>
    SQL>
    SQL> create or replace trigger log_odsuser1
      2   after logon on odsuser1.schema
      3   begin
      4     ins_aud('ODSUSER1',sysdate);
      5   exception
      6     when others then
      7       ins_err(sqlcode,sqlerrm);
      8   end;
      9  /
    Trigger created.
    SQL>
    SQL*Plus: Release 9.2.0.1.0 - Production on Tue Jun 12 12:21:09 2007
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - Production
    SQL>
    SQL>
    SQL>
    SQL> set serveroutput on
    SQL>
    SQL>
    SQL> select * from audit_info;
    USR
    LOG_TIME
    ODSUSER1
    12-JUN-07 12.00.00.00000000 AMHope this will solve your purpose.
    Regards.
    Satyaki De.

  • Error while creating PDF using asynchronous

    Hi,
    I was using Asynchronous call to generate PDF. It was
    working for some time. Now it is showing error.
    We are not able to able to create PDF reports at that time.
    When we are checking the exception log of the CF Server, we can
    find the following error.
    "Error","Thread-16","12/05/07","10:58:51",,"Error invoking
    CFC for gateway CreatePDF: An exception occurred when performing
    document processing. The cause of this exception was that:
    java.lang.IllegalArgumentException."
    coldfusion.tagext.lang.DocumentTagException: An exception
    occurred when performing document processing.
    at
    coldfusion.tagext.lang.DocumentTag.doAfterBody(DocumentTag.java:1209)
    at
    cfGeneratePDF2ecfc1106407227$funcONINCOMINGMESSAGE.runFunction(C:\Inetpub\wwwroot\mycfsit e\reports\CF\model\GeneratePDF.cfc:343)
    at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344)
    at
    coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
    at
    coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:254)
    at
    coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56)
    at
    coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207)
    at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:169)
    at
    coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:194)
    at
    coldfusion.filter.EventComponentFilter.invoke(EventComponentFilter.java:67)
    at
    coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:225)
    at
    coldfusion.filter.EventRequestMonitorFilter.invoke(EventRequestMonitorFilter.java:46)
    at
    coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
    at
    coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at
    coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at
    coldfusion.eventgateway.EventProxy.invokeComponent(EventProxy.java:52)
    at
    coldfusion.eventgateway.EventRequestHandler.invokeCFC(EventRequestHandler.java:165)
    at
    coldfusion.eventgateway.EventRequestHandler.processRequest(EventRequestHandler.java:102)
    at
    coldfusion.eventgateway.EventRequestDispatcher$Task.run(EventRequestDispatcher.java:121)
    at
    coldfusion.util.SimpleWorkerThread.run(SimpleThreadPool.java:214)
    Anyone having idea about this error?
    Please help to track this.
    Thanks in advance

    If the report didn't change, then perhaps the data did. Check
    to make sure the data being supplied to the report is as expected.
    I have run into mysterious errors where an expected value was of
    the wrong type or a required value was now blank. It is also
    possible to have existing logical errors in an iif() or other
    dynamic evaluation expression that was not previously examined;
    until now. So, is there any unexpected or exceptional data the
    report cannot handle?

  • Need  file adapter polling with read operation to be triggered by a BPEL without using synchronous read

    The scenario is:-
    Web Service Client -->input-->BPEL-->if input valid-->trigger file adapter with read operation--> receive file
    i am not able to stop the polling until it is required to trigger the polling.
    As soon as i deploy the composite the file adapter starts polling without waiting for input.
    Since i am using two receive activities, the second one which is suppose to receive file from file adapter is always showing pending state. (asynchronous callback)

    Hi there,
    IMHO the traditional read is used only as inbound operation, that means
    that it starts polling the input folder as soon as the composite gets
    deployed - which is the same you are experiencing.
    In your case you need an outbound operation that needs to be invoked at
    a certain moment. I don't know what are the reasons not to use sync
    read, but this is the only outbound read operation supported by the
    adapter. If you can not use the sync read, then you would have to design
    some custom solution where you call a web service or EJB for instance
    that reads the desired files.
    Another option I can think of, though have not use personally is using
    the adapters programatically in Java - take a look at this blog post as
    it seems related to this topic -
    https://technology.amis.nl/2012/01/22/using-the-oracle-weblogic-technology-adapters-with-custom-java-message-driven-bean-mdb-triggered-by-file-adapter-part-of-the-story/.
    Hope this helps,
    A.

  • How to use counter using PCI 6259

    Hello, users,
    I have a PCI 6259 board and use Labview 7.1.
    I'd like to repetitively count the photon signals at 10ms integration time. I want cumulative counts in every 1 sec (1000ms) (or 1 min (60000ms)) And I want to save counts into txt.file which is open in excel program.
    I am a beginner to use counter using PCI 6259 board.
    1. Could you explain default NI-DAQmx counter terminals, i.e., CTR 0 SRC, CTR 0 GATE, CTR 0 AUX, and CTR 0 OUT?
    2. How do I use them or how can I connect to count TTL pulse using PCI 6259?
    3. As I mention my purpose above, which example is the first step to start working my purpose?
    4. If you know good example, could you tell me about that?
    5. If anyone has labview example which is similar to my aim, could you give me some tips or your examples?
    Any hint, comment or advice would be appreciated.
    Thank you so much for your response.
    Leek2

    I have never used the PCI 6259 but have used counters many times with labview, the coding should be the same independent of the board.  What you want to do is finite buffered edge counting using a internal clock.  The best way to do this is to look at the examples programs and use the express vi to get started, then you can use this code to customize your program exactly as you need.
    To address your questions:
    1. CTR0 means "counter 0" the name of the physical resource sometimes listed at GPCTR0.  Each counter has 4 connections to the outside world:
    source "src"(for counting input TTL signals),
    gate (for synchronizing to external clocks and edges),
    out (for pulse-train out operations)
    and aux (specialty operations such as up/down counting and encoding)
    2.For event counting with internal clocking you will only use the src this is the input from the signal you wish to count (ie PMT discriminator for photon counting).
    3,4,5. Look at the count edge examples, there isn't one that does exactly what you want but I have done this with a 6602 (it has e counters) where I use one set of counters to set up a finite pulse train in your case 1000Hz with 1000 pulses, and another counter to edge count on an external pulse, with the source of this pulse routed from the out of the other counter.  Then you can start the task and read when 1000 samples are in the buffer (about 1 second later).
    Hope this helps,
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • What function is used to read Angular Position form a Task?

    I have created a DAQmx task in MAX. This task configures a counter on a PCI-6259 to take the A and B counts from an encoder and give the Angular Position. What function do I use to read the value since I am no longer reading counts I am reading the position?
    Thank you in advance for any advice!
    John O'C
    Staff Test Systems Engineer
    Woodward, Inc.
    Skokie, Illinois, USA
    "Life is not a journey to the grave with the intention of arriving safely
    in a pretty and well preserved body, but rather to skid in broadside,
    thoroughly used up, totally worn out, and loudly proclaiming...
    Wow...What a Ride!"
    Solved!
    Go to Solution.

    Hi Izzy,
    I have Created the task in MAX. The task takes input into the counter from an encoder and converts it to angular position. Do I still use the DAQmxReadCounterF64 function to read the counter? I am guessing that I do and that the function returns the angular position rather than the raw counts. Not sure though.
    Thanks for taking the time to respond.
    Regards-
    John O'C
    John O'C
    Staff Test Systems Engineer
    Woodward, Inc.
    Skokie, Illinois, USA
    "Life is not a journey to the grave with the intention of arriving safely
    in a pretty and well preserved body, but rather to skid in broadside,
    thoroughly used up, totally worn out, and loudly proclaiming...
    Wow...What a Ride!"

  • Telnet library: asynchronous read and write

    I need control a device using the telnet protocol. It sends its logging messages asynchronous and I need to send commands to to setup it for measurements. There is no prompt, where it is waiting for commands. Therefore I can't use "Telnet Read Until".
    My idea is now to start a thread with a loop calling   "Telnet Read" and sending the commands from the main thread. Is multithreading in that way supported by CVIs telnet library ?

    Hi mkossmann,
    you can use multithreading in CVI as in native C.
    When your target does not send any starting comment, I guess your idea could be a good way to implement the communication in CVI.
    Regards,
    Melanie

  • STATISTICS IO: Scan Count vs Logical reads

    Hello
    I'm doing som performance research, I have a index with following priority: ClientId, Active, ProductId. Active is a bit field telling whether the Product is active or not, it can be inactive products than active, but always at least one active product.
    When I'm executing
    SELECT * FROM [table] WHERE ClientId = [id] AND ProductId IN (1,2,3,5,7,9,20)
    I'm getting following result: Scan count 1, logical reads 490
    When I'm leading SQL Server to the right paths by including the to possible values in Active by executing the following SQL:
    SELECT * FROM [table] WHERE ClientId = [id] AND ProductId IN (1,2,3,5,7,9,20) AND Active IN (0,1)
    I'm getting following results: Scan count 14, logical reads 123
    With this information, which version would you say is fastest and why?
    When I was running this query 1000 times with different ClientId I got a average time of 172 ms for the first query, and 155 ms for the second one. I have been told that scan count is very expensive... out of this example it seems that the cost of 1 scan count is like 20 logical reads?

    When I was running this query 1000 times with different ClientId I got a average time of 172 ms for the first query, and 155 ms for the second one. I have been told that scan count is very expensive... out of this example
    it seems that the cost of 1 scan count is like 20 logical reads?
    Typically the pages are forced out of buffer (DBCC DROPCLEANBUFFERS) when doing such a measurement:
    http://www.sqlusa.com/bestpractices2005/executioninms/
    BOL: "Use DBCC DROPCLEANBUFFERS to test queries with a cold buffer cache without shutting down and restarting the server."
    LINK: http://technet.microsoft.com/en-us/library/ms187762.aspx
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Counter over flow reading

    What is the utilization of counter over flow reading and annual estimate in counters? Is there any report or any application where it helps us in tracking?
    Regards,
    VM
    Edited by: V M on Jun 1, 2008 9:35 AM

    hi
    counter overflow reading is used wherein your counter reading overflows
    for example your milometer will only show 9999 miles ,once this counter has reached overflow  occurs ,i.e. the counter starts to count upwards from 0000 again
    Annual estimate is used for scheduling purpose for performance based scheduling and for multiple counter plan ,
    Multiple counter plan
    The system uses the current date as the start date and automatically calculates the planned dates based on the maintenance cycles, the scheduling parameters, the estimated annual performance and the last counter readings
    Performance based
    The system automatically calculates the planned date and call date based on the maintenance packages, the scheduling parameters, the estimated annual performance and the counter reading at the start of the cycle
    regards
    thyagarajan

  • Sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loop

    sir i have given lot of effort but i am not able to solve my problem either with notifiers or with occurence fn,probably i do not know how to use these synchronisation tools.

    sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loopHi Sam,
    I want to pass along a couple of tips that will get you more and better response on this list.
    1) There is an un-written rule that says more "stars" is better than just one star. Giving a one star rating will probably eliminate that responder from individuals that are willing to anser your question.
    2) If someone gives you an answer that meets your needs, reply to that answer and say that it worked.
    3) If someone suggests that you look at an example, DO IT! LV comes with a wonderful set of examples that demonstate almost all of the core functionality of LV. Familiarity with all of the LV examples will get you through about 80% of the Certified LabVIEW Developer exam.
    4) If you have a question first search the examples for something tha
    t may help you. If you can not find an example that is exactly what you want, find one that is close and post a question along the lines of "I want to do something similar to example X, how can I modify it to do Y".
    5) Some of the greatest LabVIEW minds offer there services and advice for free on this exchange. If you treat them good, they can get you through almost every challenge that can be encountered in LV.
    6) If English is not your native language, post your question in the language you favor. There is probably someone around that can help. "We're big, we're bad, we're international!"
    Trying to help,
    Welcome to the forum!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • I am having issues with printing using Adobe Reader

    I am currently using adobe reader and have not been able to print with my HP DeskJet 3050, I have both reinstalled my drivers and Reader, yet they both will not work.  Every time I click print it brings up the printing options screen, from there I have tried the following:  I have tried printing the document as an image, changing the language to see if the printer itself could not handle the printing language and I have also tried to save the document as a preprint and printing it from there yet it is still not working.  Here are all of the notes from Reader showing the build and features:
    System Parameters:
    Account Detail:
       User Rights: Admin
       User Account Control: Default
       Process Integrity: Undefined
       Profile Type: None
    Acrobat Detail:
       Sandboxing: On
       Captive Reader: No
       Multi-Reader on Desktop Support: Off
    Available Physical Memory: 1808376 KB
    Available Virtual Memory: 3937960 KB
    BIOS Version: ACRSYS - 6040000
    Default Browser: C:\Program Files (x86)\Internet Explorer\iexplore.exe
        Version: 9.00.8112.16421 (WIN7_IE9_RTM.110308-0330)
        Creation Date: 2013/02/13
        Creation Time: 10:31:26 PM
    Default Mail:
    Display Detail:
       Screen Width: 1366
       Screen Height: 768
       Number of Monitors: 1
       Number of Mouse Buttons: 5
       Has Mouse Wheel: Yes
       Has Pen Windows: No
       Double Byte Character Set: No
       Has Input Method Editor: Yes
       Inside Screen Reader: No
    Graphics Card:
        Version: 0.0.0.0
        Check: Not Supported
    Installed Acrobat:
    Installed Acrobat: C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe
        Version: 11.0.02.0
        Creation Date: 2013/02/15
        Creation Time: 5:04:53 PM
    Locale: English (United States)
    Monitor:
        Name: ATI Mobility Radeon HD 4200 Series
        Resolution: 1366 x 768 x 60
        Bits per pixel: 32
    OS Manufacturer: Microsoft Corporation
    OS Name: Microsoft Windows Vista
    OS Version: 6.1.7601  Service Pack 1
    Page File Space: 4194303 KB
    Processor: AMD64 Family 16 Model 6 Stepping 2  AuthenticAMD  ~1995  Mhz
    Session Detail:
       Boot Type: Normal
       Is Shutting Down: No
       Network: Available
       Inside Citrix: No
       Inside VMWare: No
       Remote Session: No
       Remote Control: No
    System Name: USER-PC
    Temporary Directory: C:\Users\User\AppData\Local\Temp\acrord32_sbx\
    Time Zone: Eastern Standard Time
    Total Physical Memory: 2881904 KB
    Total Virtual Memory: 4194176 KB
    User Name: User
    Windows Detail:
       Tablet PC: No
       Starter Edition: No
       Media Center Edition: Yes
       Slow Machine: No
    Windows Directory: C:\Windows
    Installed plug-ins:
    C:\Program Files (x86)\Adobe\Reader 11.0\Reader\plug_ins\Accessibility.api
        Version: 11.0.01.36
        Creation Date: 2012/12/18
        Creation Time: 2:08:34 PM
    C:\Program Files (x86)\Adobe\Reader 11.0\Reader\plug_ins\AcroForm.api
        Version: 11.0.02.0
        Creation Date: 2013/02/15
        Creation Time: 5:04:56 PM
    C:\Program Files (x86)\Adobe\Reader 11.0\Reader\plug_ins\Annots.api
        Version: 11.0.01.36
        Creation Date: 2012/12/18
        Creation Time: 2:08:30 PM
    C:\Program Files (x86)\Adobe\Reader 11.0\Reader\plug_ins\DigSig.api
        Version: 11.0.01.36
        Creation Date: 2012/12/18
        Creation Time: 2:08:32 PM
    C:\Program Files (x86)\Adobe\Reader 11.0\Reader\plug_ins\EScript.api
        Version: 11.0.01.36
        Creation Date: 2012/12/18
        Creation Time: 2:08:30 PM
    C:\Program Files (x86)\Adobe\Reader 11.0\Reader\plug_ins\IA32.api
        Version: 11.0.01.36
        Creation Date: 2012/12/18
        Creation Time: 2:08:32 PM
    C:\Program Files (x86)\Adobe\Reader 11.0\Reader\plug_ins\PPKLite.api
        Version: 11.0.01.36
        Creation Date: 2012/12/18
        Creation Time: 2:08:34 PM
    C:\Program Files (x86)\Adobe\Reader 11.0\Reader\plug_ins\Updater.api
        Version: 11.0.01.36
        Creation Date: 2012/12/18
        Creation Time: 2:08:34 PM
    C:\Program Files (x86)\Adobe\Reader 11.0\Reader\plug_ins\weblink.api
        Version: 11.0.01.36
        Creation Date: 2012/12/18
        Creation Time: 2:08:30 PM

    Adobe will not send data to que up with the printer, when checking the print que, even if I set the printer to offline it will not que up.

  • Need help in using dbms_lob.read

    I need to upload a file into an Oracle table into a Blob column. The file name along with the file contents are all in one BLOB column.
    Once that is done I need to read from the file and extract the file contents and load it into a staging table.
    File being uploaded is a *.CSV* file.
    E.g. Of the .CSV file is: ABC.csv file and its contents will look like:
    1,Hello,Nisha
    2,Hi,Ravi
    3,Bye, Rahul
    Etc…..
    Therefore the table containing the BLOB column will contain:
    File Creation_date
    ABC.csv 09/11/2009
    How can I read a file from the BLOB column and upload into a staging table?
    Final Staging table should look like:
    Record Number Greet Name
    1 Hello Nisha
    2 Hi Ravi
    3 Bye Rahul
    I think I am suppose to use dbms_lob.read, but I am not really sure how to use it. If there is any script, kindly mail me the same.
    Thanks....

    Nisha,
    Check this example (test) and see if it can be any help. I have utl_file and sqlldr
    First Method -- I loaded alert.log successfully and you can imagine how big this file can be (5MB in my test case)
    create table t1clob
    ( clob_text clob);
    CREATE OR REPLACE DIRECTORY DIR AS '/path_to_csv_file/;
    DECLARE
       clob_data   CLOB;
       clob_file   BFILE;
    BEGIN
       INSERT INTO t1clob
       VALUES (EMPTY_CLOB ())
       RETURNING clob_text INTO clob_data;
       clob_file   := BFILENAME ('DIR', ABC.csv');
       DBMS_LOB.fileopen (clob_file);
       DBMS_LOB.loadfromfile (clob_data,
                              clob_file,
                              DBMS_LOB.getlength (clob_file)
       DBMS_LOB.fileclose (clob_file);
       COMMIT;
    END;Second Method: Use of Sqlldr
    Example of controlfile
    LOAD DATA
    INFILE alert.log "STR '|\n'"
    REPLACE INTO  table t1clob
       clob_text char(30000000)
    )Hope this helps.

Maybe you are looking for

  • Restricting Select Options to Multiple Single Entries

    Hi All,        I have a requirement where we have two select options. I need to restrict only One of the select options to only accept multiple single entries. I have tried using the  'SELECT_OPTIONS_RESTRICT'  Function module. But it provided little

  • Orders list -Sales employees

    Dear All, how to get the list of orders report based on sales employees or some other partner function. Regards, shekar

  • 2D objects Serialization problem

    Welcome! I'm making a net game using RMI and I have this problem. When I'm trying to join my client with the server an error occures: Error: error marshalling arguments; nested exception is:      java.io.NotSerializableException: java.awt.geom.Ellips

  • Selecting a file name from a stack of cascaded files?

    Supose I have 5 cascaded files open which I renamed: Picture 1, Picture 2 and so forth. Can a script select lets say Picture 3? An action can not do this to my knowledge.

  • Problem to stop the subscription

    Hi, First, i don't really see the point of that Skype forum if nobody from Skype is answering you...  Second, i used a subscription for unllimited call in Europe, until the day they took off the button which allowed you to stop it for 1 month or more