How to get a pulse in a specified sampletime

Hi.
We are making a LabVIEW program to communicate with PumpWorks through DDE, and have established communication.
The problem we can't find a solution to is this:
We want to start the pump (TRUE) and stop (FALSE) it in LabVIEW. PumpWorks can only recive the message one time, or else we get errors. How can we send a '1' - only one time when we press a button i LabVIEW, and send '0' one time when we press the button again.
We were thinking of a solution where we calculate the sampletime, and thereby only sends the message once - but we can't find a way to program it.
Does anyone have an idea on how to fix this? We need a pulse in just one sample when pressed start/stop. The rest of the time we shouldn't send anything.
Thanks for your help!
Is my avatar the dog from the fraggle rock?
Solved!
Go to Solution.

Okey, thank you again
The finished VI with the "pulse" is uploaded under here.
Is my avatar the dog from the fraggle rock?
Attachments:
valuechange.vi ‏19 KB

Similar Messages

  • How to get a pulse output at the start of a sine wave which is the input?

    i am working on a comparator that generates a pulse for the positive cycle of a sine wave.but i want to get a pulse of shorter duration at the start of a sine wave (using labview) please suggest

    Hello;
    You can synchronize one of the general purpose counters your board have to the analog input operation. By doing that, you can have your analog input starting the counter operation which will generate the desired pulse. Moreover, you can even specify the delay and width of that pulse. For more information on how to synchronize DAQ operations you can refer to an Application Note named "Advanced Synchronization Techniques for Data Acquisition" which can be found at our web site.
    Hope this helps.
    Filipe

  • How to get current date in a specified format ?

    Hi,
    I want to get the current date (java.util.Date()) in the format yyyy-MM-dd HH:mm:ss.
    Can you please tell me as to how to get that ?
    Regards

    I have used the same and the code looks like this. But i am getting java.text.ParseException : UnParseable Date: "Fri Jul 11 13:29:43 CDT 2003"
    The Code is :
    java.util.Date sysDate = new java.util.Date();
    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    String formatted_date = df.format(sysDate);
    It is erroring out in the last statement !!

  • How to get delayed pulse train

    hello,
    i am using Labview 7 and a PCI 6014 interface card. i want to generate delayed pulse train. for this purpose i am generating a analog waveform using 'function generator.vi'. i supply this waveform to a counter and to generate delay i am using 'finite pulse train(daq-stc).vi'. when i set trigger mode to 'no trigger', the VI works fine. But if i supply generated waveform to the counter gate(i.e. setting trigger mode to external), i see for sometime pulses missing are missing. I have also tried several other VI's(like 'delayed pulse easy.vi' and 'cont pulse train easy.vi'), but facing same problem. Can you please tell me how can i solve this problem.
    regards,
    Abhijeet

    hello Alan,
    Ok! here i explain my code. My requirement is to supply contineous 5V pulses at around 10Hz to a camera. After some time of the rising edge of pulse to the camera, i want to trigger Laser-1 and after some time of rising edge of the pulse to the Laser-1, i want to trigger Laser-2. In PCI 6014 there are only two counters which i am using for two Lasers(for delay generation). For Pulse train generation i am using 'function generator.vi'which is basically a waveform generator, but to get pulse train i set offset equal to amplitude. I supply this pulse train to two counters. To generate delay from the counters i am using 'Delayed pulse easy(9513).vi' which i have put into while loop. To see the output i am using 2-channel oscilloscope vi where i see some pulses missing. Also I obsereved pulses missing when i supply the output to the Lasers(Lasers stops firing for moment).
    I am attaching a timing diagram which is explains my application and a labview code where i have combined three VIs (one 'function generator.vi' and two 'delayed pulse easy(9513).vi').
    Thank you,
    Abhijeet
    Attachments:
    camera+laser1+laser2.vi ‏188 KB

  • How to get one character at a specified index and put it in a mutablestring

    I am new in cocoa programing and i am stock.
    I am trying to get a character in a NSString and i want to put it in a NSMutableString with the command appendString.
    For now it's not working. I try with different approach but i didn't find the right way to do that. It's probably very simple but i just don't see hit.
    I try with characterAtIndex and with getCharater. And now i am thinking to use charcaterRange but i don't know how to articulate an NSRange.
    Maybe somebody could show an example of of what i have to do to do that.
    I put this <<<<<<<<<<<<<<<< to show where in my code it's not working
    Thanks a lot for your help it's very appreciate.
    *The header:*
    #import <Cocoa/Cocoa.h>
    @interface Controleur : NSObject
    NSMutableArray *touche_presser;
    NSMutableArray *typedevariable;
    NSMutableString *formule;
    int calculencours;
    int i;
    int n;
    IBOutlet NSTextField *affichagede_laformule;
    IBOutlet NSTextField *informationdesupport;
    -(void) awakeFromNib;
    -(IBAction)touche_clear:(id)sender;
    -(IBAction)touche_0:(id)sender;
    -(IBAction)touche_1:(id)sender;
    -(IBAction)touche_2:(id)sender;
    -(IBAction)touche_3:(id)sender;
    -(IBAction)touche_4:(id)sender;
    -(IBAction)touche_5:(id)sender;
    -(IBAction)touche_6:(id)sender;
    -(IBAction)touche_7:(id)sender;
    -(IBAction)touche_8:(id)sender;
    -(IBAction)touche_9:(id)sender;
    -(IBAction)touche_plus:(id)sender;
    -(IBAction)touche_moins:(id)sender;
    -(IBAction)touche_multiplier:(id)sender;
    -(IBAction)touche_diviser:(id)sender;
    -(IBAction)touche_egale:(id)sender;
    -(NSString *) constructionde_laformule;
    -(NSNumber *) analysed_unerafale: (NSString *) elementd_uneformule;
    @end
    *The Methode:*
    -(NSNumber *) analysed_unerafale: (NSString *) elementd_uneformule;
    // Ici, j'analyse une partie de la formule et retourne le résultat (nsnumber)
    // dans la variable resultatde_l_analyse_de_larafale
    int ia;
    int nombrede_caractere_dans_element_de_laformule;
    NSNumber *resultat_actuel;
    resultat_actuel = [[NSNumber alloc]initWithInt:0];
    NSNumber *resultat_precedant;
    resultat_precedant = [[NSNumber alloc]initWithInt:0];
    NSNumber *resultatde_l_analyse_de_larafale;
    resultatde_l_analyse_de_larafale = [[NSNumber alloc]init];
    NSMutableString *caractere_x;
    caractere_x = [[NSMutableString alloc]init];
    NSMutableString *operateur;
    operateur = [[NSMutableString alloc]init];
    nombrede_caractere_dans_element_de_laformule = [elementd_uneformule length];
    ia = 0;
    for (n=1; n <= nombrede_caractere_dans_element_de_laformule; n = n+1)
    ia++;
    char y = [elementd_uneformule characterAtIndex:ia]; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< here
    NSString *x = [[NSString alloc] initWithUTF8String: y]; //[NSString stringWithFormat:@"%@", y]; <<<<<<<<<<<<< and here
    [caractere_x setString:@""];
    [caractere_x appendString:x];
    return resultatde_l_analyse_de_larafale;
    @end
    P.S.
    Excuse my bad english i am french speaking

    I also couldn't figure out what your code is doing, but hope this sample code will help:
    NSString *firstString = @"Canada";
    NSMutableString *secondString = [NSMutableString stringWithCapacity:10];
    int index = random() % [firstString length];
    // get a substring of length 1 at the index position of firstString
    NSString *oneCharString = [firstString substringWithRange:NSMakeRange(index, 1)];
    // append the single-character substring to secondString:
    [secondString appendString:oneCharString];
    NSLog(@"firstString=%@ index=%d secondString=%@", firstString, index, secondString);
    I was testing the above when your first reply was posted. It uses the same method Et suggested, but I didn't want to just throw it away.

  • How to get a single pulse Using Burst MOde?

    Harlow Peeps! Just want to know how to get a SINGLE pulse generated by the AGILENT 33220A function generator? the results i get it's in the burst MODE and everything is running smoothly and fine! it's just that i want to get a single pulse froM it only and not repeated triggeriong of the pulse...
    thanks! ^^
    cheers!

    hi,
    find attached an example, how to set hp33250a ( ag33xxx )  into burst mode.
    hope this helps........... - play with it - and change it to your needs.
    regards
    Werner
    Attachments:
    hp33250a _burst.zip ‏165 KB

  • How to get path of a specified file

    how to get path of a specified folder
    my code is as follows: Iam using struts 1.2
    my directory structure in tomcat/webapp is as afollows:
    sfq
    |
    | _ _xml
    | |     
    | |_ _ sqx_read.xml
    |
    |__jsp
    |
    |__WEB-INF
         |
         |_ _classes
              |
              |_ _ReadXml.class
    Now i have to get the path of a sql_read.xml file which is in xml folder from ReadXml.java file. pls it's urgent

    Urgent or not, you can obtain the document root directory as
    ServletContext.getRealPath("/")

  • How come I get all account information without specifying the username pass

    I intsalled the sun directory server and try a couple of sample programs available on the net to see how can i get the infromation form the server.
    The following is the actually code but how come i don't have to specify the user name and passoword??
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, "ldap://192.168.1.196:13769/o=JNDITutorial,dc=opendataldap,dc=com");
    DirContext ctx = new InitialDirContext(env);
    //To read the attributes of an object from the directory, use DirContext.getAttributes()
    Attributes answer = ctx.getAttributes("cn=Ted Geisel, ou=People");
    for (NamingEnumeration ae = answer.getAll(); ae.hasMore();) {
    Attribute attr = (Attribute)ae.next();
    System.out.println("attribute: " + attr.getID());
    /* Print each value */
    for (NamingEnumeration e = attr.getAll(); e.hasMore();
         System.out.println("value: " + e.next()))
    }

    Were u able to connect and retrieve the values??
    If not, you should add these into env variable
    env.put(Context.SECURITY_PRINCIPAL, "cn=Directory Manager");
         env.put(Context.SECURITY_CREDENTIALS, "adminpwd");

  • How to get string (specified by line and column) from txt file with labview

    Hi everyone
    How to get string (specified by line and column) from txt file with labview
    thx 
    Solved!
    Go to Solution.

    As far as I know, a text file has no columns.  Please be more specific.  Do you mean something like the 5th word on line 4, where words are separated by a space, and lines are separated by a newline character?  You could the Read from Spreadsheet String function and set the delimiter to a space.  This will produce a 2D array of strings.  Then use index array and give the line number and column number.
    - tbob
    Inventor of the WORM Global

  • How to get the records which has a specified x/y coordinates

    Hi,
    How to get the records which has a specified x/y coordinates. I have a table which has street data. And another table has a point data. Now I just want to get the records from street data which includes the points in the point data table. Can any one give your suggestions
    Thanks and Regards
    Aravindan

    Aravinda,
    If you want to find the line segments which intersect the given
    set of points, you can do that with SDO_RELATE.
    siva

  • How to get message which don't contain specified header?

    Hello
    I have a question:
    how to get messages which don't contain specified header?
    At this moment I have something like this, but it works to long (2 seconds for 15 messages, 2 minutes for 800 messages:/ )
    StringTerm st = new StringTerm("Header name") {
        public boolean match(Message arg0) {
            try {
               return arg0.getHeader(pattern) == null;
            } catch (MessagingException ex) {
               return false;
    Message[] m = f.search(st);where f is folder
    Does exist way easier and more "time-efficient"
    regards
    Edited by: moj_ekranik on Dec 4, 2009 1:28 AM
    Edited by: moj_ekranik on Dec 4, 2009 1:29 AM

    Assuming you're using IMAP...
    Try this:
    folder.search(new NotTerm(new HeaderTerm("header-name", "")));

  • How to get the values multiple times for the specified element - ABAP IXML.

    Hi all,
             i have requirement to get the values for the specified elements multiple times. eg:., if the element is used in the xml 4 times then i need to get all the 4 values.  here is the sample xml,
    <View mmRelease="6.30" mmVersion="2.0" mmTimestamp="1180099591892" name="Comp_viewtestView" package="sap.com" masterLanguage="en">
    <AbstractView.InboundPlugs>
    <InboundPlug name="ip2">
    <ParameterizedFeature.Parameters>
    <Parameter name="ippara2">
    <Parameter.Type>
    <Core.ForeignReference modelName="DtDictionary" package="com.sap.dictionary" name="binary" type="DtSimpleType"/>
    </Parameter.Type>
    </Parameter>
    </ParameterizedFeature.Parameters>
    </InboundPlug>
    <InboundPlug name="hi">
    <ParameterizedFeature.Parameters>
    <Parameter name="hipara">
    <Parameter.Type>
    <Core.ForeignReference modelName="DtDictionary" package="com.sap.ide.webdynpro.uielementdefinitions" name="Visibility" type="DtSimpleType"/>
    </Parameter.Type>
    </Parameter>
    </ParameterizedFeature.Parameters>
    </InboundPlug>
    Here i need to store the following values in internal table, the element to get the values are,
    (1) InboungPlug name and the respective values of "Parameter name" and "Parameter type" name value.
    The output will be of 2 records & values should be
    Inbound plug name = ip2
    Parameter name    = ippara2
    Parameter type      = binary
    2nd record
    Inbound plug name = hi
    Parameter name    = hipara
    Parameter type      = Visibility
    These 2 records should be in internal table and then i will be passing to database table...
    Can anyone provide me the code for the above......
    Thanks in advance,
    Vishnu.

    I didn't get ur requirement..
    As per my understanding, upload the XML file into an internal table and then loop over the internal table and get the values for ptype and pname..
    XML ABAP  -  may b helpfull
    Edited by: Veeranji Reddy on May 7, 2009 2:10 PM

  • How to get EXTMUX to pulse only when taking samples, and not on LocalMUX Change? (E Series Board)

    I am using the 6031E series board. The EXTMUX is setup to pulse on each convert pulse. While taking data, I am getting a pulse on the EXTMUX for each sample taken, and a pulse for each time the 6031E switches its own internal mux. Is there anyway to only have the EXTMUX line pulse ONLY when a sample is taken, and not when the internal mux switches?

    If you are reading the DAQ-STC manual, the signal I am talking about is the EXTMUX. If you are reading the PCI E Series manuals, the signal I am talking about is called SCANCLK (just to make things easier to understand, I guess??). The EXTMUX is setup through the MITE, and will pulse after every convert signal. My problem is that it also pulses when the internal mux changes as well.
    So (for simplicity), if I wanted 2 channels, with 5 samples on each channel, and a mux outside the card on each line, the EXTMUX signal would sync the external hardware with the card/software.
    In theory I would expect 10 pulses on the EXTMUX/SCANCLK pin, but in reality I get 12 pulses. If I had 3 channels, 5 samples per channel, (Expected 15 pulses) I end up getting 18 pu
    lses in reality. This throws off any kind of sync to the outside world.

  • How to send trigger pulse for every 0.25 sec until user stops the task?

    Hi All,
    Iam using NI_DAQ PCI 6221 Card for the Data Acquisition.
    Can any body please tell me how to send trigger pulse for every 0.25 sec until the user stop the task??
    Please suggest me the methods I should use to meet this requirement.
    Thanks In Advance,
    Sindhu

    Hi Sindhu,
    Am I correct in thinking that you do not want to use your 6221 to output a digital pulse, but that you are getting a digital pulse from somewhere else that you want to use as a trigger for the analog input?  And you will have more than one trigger?  If this is the case, then it can be accomplished by doing a retriggerable operation.  The way that this works is you use the counter on your board to generate the sample clock for your analog input because analog input cannot do retriggerable operations with its own sample clock.  You can modify the example GenDigPulseTrainContinuous_DigStart that is in the same location as the example I referenced before to be retriggerable by using the property DAQmxSetStartTrigRetriggerable.
    After doing that and testing to make sure that it works, you can setup an analog input task like the example ContAcqVoltageSamples_IntClk but specify the source of the sample clock to be the internal output of the counter you used in the counter portion of your program.  If you need help with the terminal names (You will need to use Ctr0InternalOutput for example), you can reference the NI-DAQmx C Reference Help at Start >> Programs >> National Instruments >> NI-DAQ.  After doing this, you will acquire the same number of samples as the number of pulses you choose to generate in the counter portion of your code every time a trigger is received.
    Also, I have come across an example that does retriggerable analog input using the counter as a sample clock in C++.  Either by using this example or modifying the shipping examples as I stated above you should be able to achieve what you are trying to do.
    Let us know if you have any questions.
    Thanks,
    Laura

  • How to get period date of for a given month from a given date in mdx for SSRS report (mm/dd/yyyy)

    I have a situation,  where i need to write expression Period to date(PTD). i want to know how to get the period date. i want you to help in writing Period date or else is there any function to get period date for a given date(the  date is given
    from the parameter dynamically) in MDX for SSRS report
    ram

    Hi ram,
    Per my understanding that you want to get the period date based on the month selected and the given date, right?
    Could you please provide details information below to help us better understanding your requirements, thus we will be more effective to provide an solution:
    What is the format of the period date you want to get, is this date in the DB and you want to filter it based on the month and the given Date?
    Did the month and given date are two parameters in the report? if possible, could you please provide some sample data in the DB and also the snapshot of the report structure
    I assume you want to get the period date(mm/dd/yyy) between the select month(e.g:Feb) and the given date (10/1/2014) and you should get the date between(02/01/2014-10/1/2014).
    If so,and you also have two parameter "Month","EndDate"(EndDate is the given date), please reference to details information below:
    You can create an new parameter "BeginDate" (Date/Time) which is the begin date of the period, you can use the expression to get the value based on the value of the month and the year value from the given date,finally hide this parameter:
    Specify the available value:
    Label:=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value)
    Value:=CDate(=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value))
    Specify the default Value:
    Value:=CDate(=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value))
    Add filter to the dataset as below:
    Preview you will get all the date in the given Period:
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu

Maybe you are looking for

  • Vista Version

    Can someone tell me which version of Vista to buy for my macbook - Basic,Home Premium, Business or Ultimate? Does it need to be 32 bit for my new macbook and what is 32 bit? I read somewhere not to get 64bit?? Thank You! Tammie

  • Named Searches and Java API

    Hi All, Does anyone know if its possible to execute Named Searches using the Java API?  If so, how would you set up that call? Best Regards, Mark

  • RSS feeds wont update

    Anyone else having a problem with the RSS feeds not updating?  Ive tried refreshing and it just says updating on the bottom and never goes away.  I tried restarting my phone with no luck either.  Ive checked all the settings and made sure it autoupda

  • Re: AP cant get DHCP address

    Hey all,  I'm hoping someone can help with a problem I am having with a AIRONET 1130AG Access point. I have installed quite a few of these but this one has me baffeled.  Now, I'm not a CCNA or anything like that. I set up using the GUI;  I use a simp

  • What is going on with apple?

    What is going on with Apple this year?  Syncing is now a challenge, when adding new content to devices either way, iphone, ipad, macbook, itunes does not see the content anymore unless you shut it down and re-open it, if you are using iphoto + itunes