Output meter, at the request

I would like to have a counter to a single output pulse whenever an incident occurs in a loop. My current solution (in pseudocode; I'm using LabWindows CVI on an RT target) looks like this:

DAQmxCreateTask (...);
DAQmxCreateCOPulseChanTime (...);
While (true)
{
If (condition)
{
T1 = Timer();
DAQmxStartTask (...);
T2 = Timer();
DAQmxErrChk (DAQmxWaitUntilTaskDone(*th,2));
DAQmxErrChk (DAQmxStopTask(*th));
}
}
DAQmxClearTask (...);

Unfortunately, the time between t1 and t2 is at least 0.142ms and sometimes 2ms is there an elegant way to reduce this and do not have to call the StartTask again and again?

Thank you

Jonas

You should get an improvement by committing to the task before your loop:

...
DAQmxCreateCOPulseChanTime (...);
DAQmxTaskControl (taskHandle, DAQmx_Val_Task_Commit);
While (true)
...

If this isn't good enough, you could try instead using a task of digital output (start the task before the loop, write twice inside the loop - high then low - whenever you need a pulse output).  If the pulse width needs any kind of accuracy at all you want to use the digital output task to trigger an output meter (start the meter before the loop task and configure it to be "redeclenchables" so you don't have to restart several times in the software).  I don't know whether or not it will actually run faster without benchmarking it.

Best regards

Tags: NI Hardware

Similar Questions

  • How to set the output meter channel to generate a signal pulse using DAQ6008

    Hello there I am generating a pulse signal of 100 Hz and a duty of 20% of the 6008 data acquisition cycle using visual studio 2013. I have code that needs to generate this but I'm not sure on how to set the channel output meter. When I run this NI MMAX and my vb error code indicates that the physical channel is not supported. I am a user of data acquisition were first and would appreciate any help offered.

    If you look at the USB-6008/6009 User Guide and specifications, you will see that the counter in these devices cannot rely as edges of entry. It cannot generate a pulse.

    Lynn

  • API to view the output/log of the concurrent requests

    Hi all:

    I use EBS 11.5.10 (DB: 10r2)

    Is there an API I can call to view the output/log of a concurrent request?

    We have the APEX Oracle installed in the same database as our EBS and I am developing a report of the APEX, where user provide a competing request id and then click a button; then APEX calls some Oracle EBS API to extract the output/log for this id of the request file and open it in the browser automatically (assuming that / natural log of output is the text).

    Thank you!

    Kevin

    Hey Kevin,

    Here is an example of a sqlplus session:

    Set serveroutput on 10000;

    SQL > declare
    number of v_request_id;
    v_two_task varchar2 (256);
    v_gwyuid varchar2 (256);
    v_url varchar2 (1024);
    Start
    v_request_id: = 123456; (request identification number)
    Select profile_option_value
    in v_gwyuid
    of fnd_profile_options o, fnd_profile_option_values ov
    where profile_option_name = 'GWYUID. '
    and o.application_id = ov.application_id
    and o.profile_option_id = ov.profile_option_id;
    Select profile_option_value
    in v_two_task
    of fnd_profile_options o, fnd_profile_option_values ov
    where profile_option_name = 'TWO_TASK.
    and o.application_id = ov.application_id
    and o.profile_option_id = ov.profile_option_id;
    v_url: = fnd_webfile.get_url (file_type-online fnd_webfile.request_log, id-online v_request_id, gwyuid => v_gwyuid, two_task-online v_two_task, expire_time => 100);
    dbms_output.put_line (v_url);
    end;
    /

    http://appstierservername.yourcompany.com:8000/OA_CGI/FNDWRR.exe?temp_ID=12788080980 (number will appear here)

    PL/SQL procedure successfully completed.

    SQL >

    I hope this helps.

    Published by: DBA115102 on June 10, 2011 17:27

  • ObjectKeyAssignment@PersonWantsOrg is not met at the time of the request is approved (event: granted)

    Hello

    I have a custom process to be triggered by the licensed event of PersonWantsOrg. The process needs to do something else with the value of "ObjectKeyAssignment" when the request is approved in ITShop. However the "ObjectKeyAssignment" had no value populated still in time the custom process was pulled by the event "granted".

    Is there a way I can capture the value of "ObjectKeyAssignment" in approval of the application when the event granted? Or other workaround solutions? It is v7.0.2.

    Thank you!

    I did some tests in my version and PersonWantsOrg.ObjectKeyAssignment was always filled my 7.0.2 environment.

    The reason not to get the value of your membership Org requested CustomProperty01, it's that accession does not exist at the time the LICENSED event is raised. Means, your code to get the UID_Org does not work because you are using the non-existent number of members for the UID_Org,

    Instead, use the following code to extract the CustomProperty01 from the Org you ask the composition for:

    Dim dboKeyOrg As DbObjectKey = New DbObjectKey ($FK (ObjectKeyOrdered), QERAssign.ObjectKeyAssignTarget$)

    values("CP01") = Session.GetSingleValue (String)(dboKeyOrg,"CustomProperty01")

    You can find more examples on how - to use the object layer in samples of script on the delivery of the product in the folder "Modules\QBM\dvd\AddOn\SDK\ScriptSamples".

  • Generate a digital output that indicates the frequency of half of the contribution

    Hi, I'm new with data acquisition. I would like to get your help.

    I have a digital signal input that is generated by an encoder. I would like to generate an output signal of the way that his level of signal will change at each edge of the awareness of the input signal so that the frequency is half that of the entry.

    I would like to know how to do this using the NI DAQ M 6221 map.

    Thanks for your help

    Hardware solutions can be so simple... sometimes I prefer an iron solder wire

    Look at the section counter...

    I think there's a prescaler/separator for the meter... and the next would try to drive the output to a PFI

  • Outputs produced by the analog input job Retrig delay counter

    Hi all!

    First of all, I want to thank everyone on this forum who take the time to answer the questions, this forum has been invaluable to me.  I have a question about delays in adjustment to the pulse output of a counter, like what is described here.  My question is related to another, asked hereon the trigger of an analog signal and producing a pulse for each triggered event.  I have this job and can be seen in the attached vi.  Basically, now I'm able to produce a TTL pulse whenever my analog signal passes a predetermined threshold.  I have also documented the vi to my best understanding, if I have something wrong in the documentation, please let me know.

    In any case, now that I have a pulse at each outbreak, I would like to be able to adjust the delay of events so that the pulse is not produced until the period n/20 (n = 0, 1, 2,... (19) what I expect to see is a similar pulse train in 'fig. 2' in the article, where the white pulse is the counter pulse, and the pulse red would be the same as my analog signal.  So, for example, if I had a 281Hz signal, I want to produce a single pulse with a width defined by the user whenever my signal crosses a threshold (it's zero delay: 0/20); This part may be made using the vi attached to this subject.  Now I want to delay this impulse as to each trigger event, a pulse is not produced until 1/20 of the period, or 0,000178 seconds after the trigger.

    Looking at my vi, I think that if I change the output channel of the meter to 'CO Pulse Time' and then set the respective initial delay, time and little time, I can get delayed impulses mentioned in the article.  Correct me if I'm wrong, but I think that basically 'big time' controls the pulse width. 'initial period' is what controls how long to wait after the first trigger event is reached, before generating a pulse, but this applies only to the first impulse and not the rest; and finally 'small time' is the time to wait before the next pulse is created.

    Earlier today, when I use the CO Pulse Time option, it seemed to work properly for me to a certain degree.  At low frequencies the impulses seem to trigger to each event when the pulse width is set at 2.5% of the period.  When I tested at 281 Hz with a pulse width, 'big time' of 0,000089 sec and without anything wired for the 'initial delay' or 'small time', the impulses seem to ignore systematically each triggers 2... that tells me that something is wrong in my settings, rather than problems with the sample clock.  So I decided to connect '0' to 'small time', but then I got an error message indicating that some time may be less than a value (I forgot what the error message).  So I concluded that I must not understand what these terms mean.

    Sorry for the long explanation, but I really need help with this.  So let's say that the first set of data, I want to acquire is at zero delay, such as pulses are generated at each triggering event like how I have my VI now; so, for the next set of data I want pulses to generate 0,000178 seconds after the trigger threshold; so, for the data set third, I want to pulses to generate 0,000356 seconds after the trigger threshold; and so on... How should I do for this?  Thank you very much!

    Hello!

    Please post on the Forums OR! I think the main issue here is that you are sampling not fast enough to catch all of your high. So you set your high dry 0,000089. You will need to substantially increase the frequency of sampling in order to catch all these. Something around 25 k should do the trick.

    To the extent where using the time counter Pulse, you're totally on track. I think that the use that the delay will do the job.

    I hope this helps! Let me know!

  • Why is my proxy service returns the request as a reply message?

    Hi all

    I have a business service that inserts a record into DB and returns no response. So, I created a service proxy with custom WSDL file and forward the request to the company. And in my custom WSDL file I have different inputs and outputs, but when I call the proxy service I always get the message request an answer!
    What I am doing wrong?

    Here are the files:

    -----
    WSDL file
    <wsdl:definitions
    targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/SMSService/InsertSMSRecord/ProxyService"
    name="SMSProxyService-concrete"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:sms="http://xmlns.oracle.com/pcbpel/adapter/db/InsertSMSRecord"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/SMSService/InsertSMSRecord/ProxyService">
         <wsdl:types>
              <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
                   <xsd:import
                        namespace="http://xmlns.oracle.com/pcbpel/adapter/db/InsertSMSRecord"
                        schemaLocation="../DBAdapter/InsertSMSRecord/xsd/InsertSMSRecord.xsd">
                   </xsd:import></xsd:schema></wsdl:types>
         <wsdl:message name="InsertSMSRecordInput_msg">
              <wsdl:part name="SMSRequestBody" element="sms:SMSRequest"/>
         </wsdl:message>
         <wsdl:message name="InsertSMSRecordOutput_msg">
              <wsdl:part name="SMSResponseBody" element="sms:SMSResponse"/>
         </wsdl:message>
         <wsdl:portType name="InsertSMSRecord_ptt">
              <wsdl:operation name="sendSMS">
                   <wsdl:input message="tns:InsertSMSRecordInput_msg"/>
                   <wsdl:output message="tns:InsertSMSRecordOutput_msg"/>
              </wsdl:operation>
         </wsdl:portType>
         <wsdl:binding name="sendSMS-binding" type="tns:InsertSMSRecord_ptt">
              <soap:binding style ="document" transport="http://schemas.xmlsoap.org/soap/http"/>
              <wsdl:operation name="sendSMS">
                   <soap:operation soapAction="sendSMS"/>
                   <wsdl:input>
                        <soap:body use="literal" parts="SMSRequestBody"/>
                   </wsdl:input>
                   <wsdl:output>
                        <soap:body use="literal" parts="SMSResponseBody"/>
                   </wsdl:output>
              </wsdl:operation>
         </wsdl:binding>
         <wsdl:service name="InsertSMSRecord-service">
              <wsdl:port name="InsertSMSRecord-port" binding="tns:sendSMS-binding">
                   <soap:address location="http://localhost:7001/SMSService/Proxy_Services/sendSMS"/>
              </wsdl:port>
         </wsdl:service>
    </wsdl:definitions>
    -----
    File InsertSMSRecord.XSD
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <xs:schema
    targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/InsertSMSRecord"
    xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/InsertSMSRecord"
    elementFormDefault="qualified" attributeFormDefault="qualified"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
       <xs:element name="SMSRequest" type="SMSRequestType"/>
       <xs:complexType name="SMSRequestType">
          <xs:sequence>
             <xs:element name="SYSTEM_ID" type="xs:string" nillable="false"/>
             <xs:element name="USER_ID" type="xs:string" nillable="true"/>
             <xs:element name="PRIORITY" type="xs:int" nillable="true"/>
             <xs:element name="MESSAGE" type="xs:string" nillable="false"/>
             <xs:element name="MOBILE" type="xs:string" nillable="false"/>
             <xs:element name="LANGUAGE" type="xs:string" nillable="false"/>
             <xs:element name="SHORT_CODE" type="xs:string" nillable="true"/>
          </xs:sequence>
       </xs:complexType>
       <xs:element name="SMSResponse" type="SMSResponseType"/>
       <xs:complexType name="SMSResponseType">
          <xs:sequence>
               <xs:element name="Status" type="xs:string" nillable="true"/>
               <xs:element name="errorType" type="xs:string" nillable="true" minOccurs="0"/>
               <xs:element name="errorDescription" type="xs:string" nillable="true" minOccurs="0"/>
          </xs:sequence>
       </xs:complexType>
    </xs:schema> 
    -----

    And here is a sample of the input and the output I get:*.
    -----
    Entry
    <soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ins="http://xmlns.oracle.com/pcbpel/adapter/db/InsertSMSRecord">
       <soapenv:Header/>
       <soapenv:Body>
          <ins:SMSRequest>
             <ins:SYSTEM_ID>sfda</ins:SYSTEM_ID>
             <ins:USER_ID>test</ins:USER_ID>
             <ins:PRIORITY>5</ins:PRIORITY>
             <ins:MESSAGE>test</ins:MESSAGE>
             <ins:MOBILE>966503105515</ins:MOBILE>
             <ins:LANGUAGE>ENGLISH</ins:LANGUAGE>
             <ins:SHORT_CODE>SFDA</ins:SHORT_CODE>
          </ins:SMSRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    -----
    Output
    <soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ins="http://xmlns.oracle.com/pcbpel/adapter/db/InsertSMSRecord">
       <soapenv:Header/>
       <soapenv:Body>
          <ins:SMSRequest>
             <ins:SYSTEM_ID>sfda</ins:SYSTEM_ID>
             <ins:USER_ID>test</ins:USER_ID>
             <ins:PRIORITY>5</ins:PRIORITY>
             <ins:MESSAGE>test</ins:MESSAGE>
             <ins:MOBILE>966503105515</ins:MOBILE>
             <ins:LANGUAGE>ENGLISH</ins:LANGUAGE>
             <ins:SHORT_CODE>SFDA</ins:SHORT_CODE>
          </ins:SMSRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    -----

    Any help is appreciated...
    Thank you...

    In fact, this is how it works. You will need to replace the contents of $body with the XML response necessary. OSB returns the contents of $body as at the end of the treatment.

    . / * means everything inside the current node. So, if you specify 'body' in the variable field, then. / * means everything inside the variable 'body '.

    Kind regards
    Anuj

  • The request contains a URL that is too large

    When you click on a link, a new tab opens with this message. "The request contains a URL that is too large.

    Help!

    Well, I have accidentally solved the problem. Trying to open links incriminated, things seem to work. Thanks for your replies. If problem surfaces again once, I'll be back. Happy new year!

  • The requested itinerary has not been mapped in Spark

    If I try to go to some Web sites, for example http://www.rtlnieuws.nl/ I get this message
    The requested itinerary has not been mapped in Spark.
    If I use Chrome I don't have this problem

    I solved the problem by cleaning the mind hidden CC cleaner

  • Firefox would take me to yahoo, but now he says sorry gone the requested resource is no longer available on this server and there is no forwarding address.

    When I click on my Firefox icon instead of coming yahoo I get a page that says 410 Gone. Sorry, gone the requested resource is no longer available on this server and there is no forwarding address. Remove all references to this resource. Please check the URL for proper spelling and capitalization. If you're having trouble finding a destination on yahoo try to visit the 'Yahoo homepage"or browse a list of Yahoo online services. Also, you can find what you're looking for if you try searching below (it gives a lookup field). Under the box it says please try Yahoo help center if you need further help. If I click on the homepage of Yahoo words, it will take me to the homepage of yahoo, which is used to make my my just by clicking on the icon of my Firefox. I'd appreciate any help anyone could give me. I deleted Firefox to my computer and re-uploaded with yahoo download but always the same screen when I click on the Firefox icon.

    Try resetting your homepage.

    https://support.Mozilla.org/en-us/KB/how%20To%20set%20The%20home%20page

  • Firefox has detected that the server redirects the request for this address in a way that will never end.

    This week (01/10/12) I registered on youtube and now I can't log back in here or in my gmail account. I tried every fix-it/single remedy offered the FF forum but nothing works.

    Any other work, all the sites that I frequent load fine, is youtube doing something on purpose for FF users? I can get the page youtube videos and see, but I can't log on, every time I click the sign in button, I get:

    "The page is not redirecting properly".

    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
    

    This problem can sometimes be caused by disabling or refusing to accept cookies. »

    I hate to be a conspiracy theorist, I can connect to youtube without problem on IE, but I hate this browser. I use windows 7 and 15 FF. Can someone find it?

    Looks like it's a firefox issue, because that never happened on IE, Safari or Opera on me.
    You think not that a simple patch can solve this problem. I have to delete individual cookies every day.

  • I deleted my account on a site I'm going and it keeps saing that Firefox has detected that the server redirects the request for this address in a way that doesn't

    He repeated to me that Firefox has detected that the server redirects the request for this address in a way that will never end.

     This problem can sometimes be caused by disabling or refusing to accept
       cookies.
    

    Have you tried to clear the cache and cookies?

    Clear the cache and cookies from sites that cause problems.

    "Clear the Cache":

    • Tools > Options > advanced > network > content caching Web: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Tools > Options > privacy > Cookies: "show the Cookies".

    See also:

  • all the site went "not found HTTP 404 error. The requested resource is not found. "and the"Firefox cannot load Web sites but other programs can"page is not helping

    all the site went "not found HTTP 404 error. The requested resource is not found. "and the"Firefox cannot load Web sites but other programs can"page is not help somehow

    One possible cause is security software (firewall, antivirus) that prevents or limits Firefox or plugin-container process without informing you, possibly after the detection of changes (update) for the Firefox program.

    Delete all rules for Firefox and the plugin-container in the permissions list in the firewall and leave your firewall again ask permission to get full unlimited access to the internet for Firefox and the plugin-container and the update process.

    See:

    You can try to reset (power off / on) of the router.

  • Cannot log on to Twitter. I get 403 Forbidden: the server understood the request, but refuses to fill. »

    When I try to log on to Twitter, I get the error message below.

    403 Forbidden: the server understood the request, but refuses to fill.

    Seems to emerged since I have updated to Firefox... I think so...

    You can manually connect on Twitter by removing cookies from twitter. Click on "Firefox" at the top left, and then choose 'Options '. Click on the "Privacy" tab and click on 'delete cookies '. In the list, scroll down to twitter.com and click on 'Delete the Cookies' I hope this helps. Regarding the 403 error, it is usually caused by a typing error in the address bar, or with a failure on the Twitter servers.

  • Firefox has detectedthe server redirects the request to an address in a way that will never end

    Firefox has detected that the server redirects the request for this address in a way that will never end it is verbatim it's never happened before

    We have the same problem. Ours is a little out of the ordinary that we have a web application that displays pages based on a configuration of a database for the "namesake" page is created over and over again that our users make their way through our investigations.

    Is there a method on the side Server things, what can be done to stop this error from appearing? We tried some experiments as alternating in the title of the page, redirect between two different pages but FF still think it is to see the same page over and over again.

    We would love to be able to support FF for our clients and their customers (those who take our surveys) and it is a crucial issue at the moment for some of our customers worldwide.

    Any help would be greatly appreciated.

    Thank you
    ~ Dave Carr
    800, Inc. service.
    [email protected]

Maybe you are looking for

  • Reduction in volume of Skype

    I think this is really annoying when I call you or accept one, Skype puts the volume of my active apps in 1%, and I hear nothing other than Skype. I need to put the volume on the back of each app each time. I want at least an option to prevent this.

  • Defects of printer driver

    My HP Compaq dx2400 microtour keeps telling me that the drivers for my printer HP Deskjet F4580 are not loaded and cannot be found?  I removed the printer and download the full suite for the printer, twice, but I have the same problem...  The printer

  • "Unnamed device is now connected" when using wifi

    I plug all day at a friends via wifi and one place and another to another friends.  The first person that I get a msg several times when I am on... "a device without a name is now connected.  When I use the wifi at the other House of friends, I don't

  • XPS Q 12 9, 33 - no sound left speaker

    No audio from the left speaker. Wired headset offers perfect audio left and right. Has to be material. How can I fix it please. I usually have my audio bluetooth to my stereo. If your sticky thread is unimportant. They seemed to break while watching

  • «Go back to the factory default» deletes all documents and data personal?

    I'm selling my laptop, so return to the factory default. Someone can always retrieve driver information? Thank you. Moved to virus & malware Original title: Is 'back to factory default' totally Virgin pilot?