Simulate Signal Express VI is sending two periods of the wave per loop iteration - how can I reduce this to one period?

Hello,
I've been trying to use the Signal Generator Express VI and DAQ Assistant in order to generate an output waveform, as seen in this NI tutorial video:
http://www.ni.com/academic/students/learn-daq/generate/ (timestamp is at 2:07 for what I'm trying to do)
For background, I'm trying to move a piston device using Labview. The sine waveform is intended to move the piston at a smooth speed. For every loop iteration, the Simulate Signal VI running into my DAQ Assistant moves the piston to its maximum displacement and back twice. I cannot determine why this is occuring.
The settings in my "Configure Simulate Signal" tab are as follows:
Frequency: 1Hz
Phase: 90 deg
Amplitude: 2
Offset: -2
I would like my piston to only reach its maximum displacement and return for every iteration of the loop. I've tried adjusting all of the settings within "Configure Simluate Signal" but I can only work in even numbers - sending the piston back and fourth two, four, or eight times, ect.

The Simulate Signal VI is set for integer number of cycles and the default frequency set in the Cycles per Second control is 3.75 Hz. That results in the signal containing three complete cycles and the data array contains 8000 elements, not the nominla 10000 specified in the Express VI dialog.
If you only want one cycle, you need to specify the signal so that you only get one. Either reduce the frequency or reduce the number of samples.
As you have noticed Express VIs do one thing exceedingly well: They obscure what is going on inside.  I pulled your signal generation code out into a separate VI and then created a generator which will generate the same signal but allow you to select the number of cycles. It uses the Sine Waveform.vi from the Signal Processing  >> Waveform Generation palette.
I also recommend that you change the structure of your program. The use of sequence structures is discouraged in LabVIEW  because they defeat dataflow are very inflexible when changes need to be made. A Producer/Consumer Design Pattern plus a state machine would probably be a good choice. This will allow separation of the daq acquisition from the saving to file so that the timing of one does not constrain the timing of the other.
Setting the Analog Input Read to read multiple samples simultaneously and using the hardware timing of the data acquisiton device will get data faster and the timing will be precisely (compared to software timing) controlled by the hardware.
Writing to the same file in parallel loops probably results in some strange behavior such as differing numbers of writes from acquired data compared to generated cycles. As the file grows, the writes may slow down due to the OS needing to fragment or reallocate space for the file.
Lynn
Attachments:
Signal generator.vi ‏49 KB

Similar Messages

  • HT4798 i created my apple id account, verified but know i m unable to log on, it says incorrect password, i tried to reset via forgot password option but it does not send reset password page to my e- mail address, how can i get this sorted or delete my pr

    User created apple id account, verified but know she is unable to log on, it says incorrect password, she tried to reset via forgot password option but it does not send reset password page to here e- mail address, how can i get this sorted? or how can i get her whole apple account deleted and created new one using same e - mail address?

    The idea to jumpstart by change was not the smartest one, but gives you an opportunity to use that "temporary" account as permanent. You do not have a choice cause obviously despite you thinking that old account is no more -it does exist on Apple servers. And if you are unwilling to share your [email protected] with friend, just create one extra [email protected] for your friend. One suggestion - do not use gmail.

  • I have a iphone 4s, it died and has been on the charger for the last two days and still wont turn on. How can i fix this???? condition of phone is not the best and was having issues staying charged to begin with but never NOT came back on.

    I have a iphone 4s, it died and has been on the charger for the last two days and still wont turn on. How can i fix this???? condition of phone is not the best and was having issues staying charged to begin with but never NOT came back on. I've tried the holding of the home and power button but still nothing

    iOS: Not responding or does not turn on - Apple Support
    try this but maybe terminal if no result

  • I need to deactivate two old computers and reinstall CS3 on two new computers. How can I do this if one is long gone and the other just crashed?

    I need to deactivate two old computers and reinstall CS3 on two new computers. How can I do this if one is long gone and the other just crashed?

    contact adobe support and request an activation count reset, http://helpx.adobe.com/x-productkb/global/service1.html

  • I have a 2nd generation iPod....I have switch on the OFF position and it will periodically turn on (thus draining the battery) by itself.  How can I fix this?

    I have a 2nd generation iPod shuffle.  Recently, after I turn switch to OFF position, it will turn on (green light flicks on) by itself periodically and obviously battery gets drained.  How can I fix this?

    I don't know of a way to fix an issue with the switch, if it's a hardware issue.  You can try doing a Restore on the shuffle in iTunes, to see if there's some software glitch.
    However, I often leave my shuffle with the power swtich in the ON position.  When you are not playing music, the shuffle goes into a "sleep" mode after about a minute.  You'll notice that you need to press the Play button twice to get it to play again; the first press wakes it up.  In my day-to-day experience, I don't notice any difference in battery life between the shuffle being OFF and ON (and not playing), even if I leave it ON overnight.  And keeping it ON avoids needing to constantly move the tiny swtich, and saves it from wear and tear.
    So, you might try just keeping the power swtich in the ON position, and pausing playback to "turn it OFF."

  • Message : when I write a new phone number to send a message to, the Historical data appears. How can I delete  and reinitiate it ?

    Each time i want to send a SMS to a new phone number not registerd in contacts, the historical list appears.
    How can I reset this list and clean it ?

    Open a Write window. If all the toolbars are missing press the alt key to make the menu bar appear.
    From the menu bar select View-Toolbars and turn the missing toolbars back on.

  • I`ve just bought a Mac Book pro 15", did the required updates and since two days ago it freezes. Now I can´t even start the computer. the screen is allways white. how can I solve this issue??

    I`ve just bought a Mac Book pro 15", did the required updates and since two days ago it freezes. Now I can´t even start the computer. the screen is allways white. how can I solve this issue??

    The same thing happened to me... Since two days the ******* thing keeps freezing after a while. Then I try to reboot and the screen goes white and it doesn't boot. If I wait like half an hour it boots again.
    I thought it was a hardware problem, but the Apple Hardware Test founds nothing at all. I think it has to do with the software update I performed 2 days ago.
    (MacBook Pro 15" Early 2011)

  • I restored my iphone and when i got everything back and signed in my imessage would not send through my phone number and wouldnt activate it, how can i fix this?

    i restored my iphone and when i got everything back and signed in my imessage would not send through my phone number and wouldnt activate it, how can i fix this? its really annoying and i have tried everyting
    someone help me

    If your music was purcansed from the iTunes Store and your country allow is you can redownload it
    Login to itunes as yourself on this computer then
    http://support.apple.com/kb/HT2519
    You will also need to authorise that computer so you can play the content.
    Ctrl B to turn on the top menu
    Store > Authorise this Computer...
    Type in your Apple ID and password and authorise.

  • I have a new iPhone 4S, have noticed when texting some of my contacts with iPhones that my text sends on imessage and the text duplicates itself.  how do i stop this from happening?

    I have a new iPhone 4S and have noticed that when I text a friend with an iPhone it automatically send the message via imessage and sends the text twice, how can I stop this from happening?

    Your phone is setup from default with iMessage turned on. Your friends phone obviously isn't. I have a friend that has an iPhone 3G[S] with an old phone plan that didn't require a data package and he's just been swapping the sim card for 5 years. When he's at home, his phone is on wifi and it sends over iMessage. When he's at work on 3G the phone defaults back to text message because he doesn't have a data plan to send iMessage over. The phone isn't actually sending 2 messages. You send in iMessage and if the other phone is off of iMessage, it will resend to that phone as a green text message. That person never got the blue iMessage you tried to send because their iMessage wasn't working.

  • My email does not have the correct email when i send to someone. It has my mothers. How can i fix this?

    When I send an email to someone or reply to them it sends it under my mother's name. How can i fix this?

    It may be that you have more than one outgoing mail account, and you're sending from the wrong one. From the Mail menu bar, select
              Mail ▹ Preferences...
    The Mail preference dialog opens. Select the Composing tab from the row of icons at the top. From the menu labeled
              Send new messages from:
    choose
              Account of selected mailbox
    Note that this setting may have no effect if you start a new message while a VIP or smart mailbox is selected in the mailbox list. Those are saved searches, not actual mailboxes.
    If the problem remains, select the Accounts tab in the preference dialog, then select the affected account in the list on the left.
    In the Account Information pane, select the correct server in the menu labeled
              Outgoing Mail Server (SMTP)
    If there's only one server in the menu, select
              Edit SMTP Server List...
    and add a new server with the correct settings. If you're not sure how to do that, try the Mail Settings Lookup.
    Another possibility is that the wrong card in your address book is selected as yours. Select your card in the Contacts application. Then select
              Card ▹ Make This My Card
    from the menu bar.

  • I have two ipads under the same name/account. How do I airplay content from one to the other if there is not a distinguishing difference between the two or use face chat?

    I gave my 2yr old my 16gb ipad 2 when I upgraded to a 64gb ipad 3. They are on the same account so that I can share certain apps between them, but because they consider themselves one in the same I can't use airplay or face chat with my daughters ipad. How do I do these things?

    Airplay doesn't work between two iPads so you don't need to worry about that, however, you can change the name of an iPad in Settings > General > About > Name.

  • I have a ASCII input feeding a value in. Each time this value falls between two numbers I want to increase the count by 1. How can I do this?

    I have been trying to work this out an I am sure is is not too difficult to do, but I cant seem to get anywhere with it. If anyone could help that would be great.
    Thanks
    RossH

    I am not currently at a PC with LabVIEW on, so Ic ant send you an example of how to do this. Instead you'll have to understand my description....
    I'll assume that you want to constantly monitor the input value...
    Use a while loop with a shift register to store the count value. You can initialise the count value to zero (or whatever you like) by wiring a numeric constant to it - to the left of the shift register - outside the loop. Place a case structure inside the loop and wire the shift register left to right through the false case. In the true case place the increment function and connect it between the input and output nodes you now have on the case structure. On each iteration of the loop the count value will either remain the same or be incremented b
    y one depending on whats wired to the boolean input on the case structure. Now you need to detect whether your ascii value is in range. You can use the 'In range and coerce' function for this (found in the comparison function pallette). Wire the range values and the input value to it and take the boolean output to the input of the case structure. The ascii value must be acquired within the loop, so that you are checking the updated value on each iteration (or if it comes via an array you could wire the array directly to the outside of the loop and enable indexing - in this case it would be best to use a for loop). You can place an indicator on the 'count' wire to monitor its value if you wish. Remember to also place some conditional statement to stop the loop when required and also a wait function should exist inside the loop. When the loop stops, the count value will be available at the output of the shift register.
    Hope this helps and is clear enough for you to implement?!

  • I can't open .rtfd files with images. They disappear and when I send them to a PC the images are gone. How can I solve this problem? No other format works!

    When I make a document and add an image and send it to a PC as .rtfd the image and the format changes and disappears. But if I send from PC to PC an .rtfd file it comes out normal. I already downloaded the Quick Word App hoping that would solve the issue but it doesn't! What can I do to share files from PC to Mac and from Mac to PC without having the file change?

    So now that's two of us.  Hopefully, someone has an answer. 

  • Every time I send an email, OSX sends a request for admin name and password. How can I stop this?

    OS X want to make changes. Type an administrator's name and password to allow this. OS X wants to use the "System" keychain."

    Hello rosern,
    Thanks for using Apple Support Communities.
    If you're continuously being prompted to enter the administrator password to unlock your Keychain when you're using Mail, then I'd like you to please follow the directions outlined below.
    If you entered the correct password in the password dialog in Mail, but continue to be asked for your password, try these suggestions.
    In Keychain Access, locate and delete the email account password item.
    In Disk Utility, select the volume (for your hard disk or disks) in the list, click First Aid, then Verify Disk. After you’ve verified (and repaired, if necessary) the disk, try sending yourself a message.
    Mail (Yosemite): If Mail keeps asking for your password
    Take care,
    Alex H.

  • HT1620 I have been trying to download iOS 6.1 on my ipad.  It takes between 6-8 hours to download and after about 4-5 hours it send me an error message and cannot download. How can I delete this downloa? it will not let me download any apps

    I have been trying to download iOS 6.1 on my ipad.  After its been downloading for about 4 hours, I receive a message that there is an error and cannot download.  How can I delete this download from my settings?  I tried downloading other apps, but it will not let me unless I download iOS 6.1

    What iOS are you currently running?
    If you have an iPad 1, the max iOS is 5.1.1. For newer iPads, the current iOS is 6.1. The Settings>General>Software Update only appears if you have iOS 5.0 or higher currently installed.
    iOS 5: Updating your device to iOS 5 or Later
    http://support.apple.com/kb/HT4972
    How to install iOS 6
    http://www.macworld.com/article/2010061/hands-on-with-ios-6-installation.html
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    If you are currently running an iOS lower than 5.0, connect the iPad to the computer, open iTunes. Then select the iPad under the Devices heading on the left, click on the Summary tab and then click on Check for Update.
    Tip - If connected to your computer, you may need to disable your firewall and anitvirus software temporarily.  Then download and install the iOS update. Be sure and backup your iPad before the iOS update. After you update an iPad (except iPad 1) to iOS 6.x, the next update can be installed via wifi (i.e., not connected to your computer).
     Cheers, Tom

Maybe you are looking for

  • GeForce4 Ti4400 - various problems

    I have been having various problems with my card.  These include:  Pausing for several seconds (like a lock up) then reverting to vga mode;  complete freeze where I have to reset the computer;  red lines and dots that fill the screen sporadically;  a

  • A recent problem with exchange calendar sync?

    I searched this forum and did not find anything of this nature. I recently noticed that the events from my exchange calendar have began to purge themselves from the Pre as time goes by. Old events, which had been synced at one time are now gone. Futu

  • Problem with a float atribute

    I have a problem when I try to divide 2 integer: int a = 854; int b = 1000; float c = a/b; and the response is c = 0; How can I get the response c = 0.854; Thank you, aclaudia1

  • How do I send images in-line in text eMails?

    Using TB 24.6.0 and sending eMails in text format (not HTML) I am unable to add images (J-pegs) in-line. How do I overcome this problem or it is not actually possible in TB? Many thanks

  • Problem in Select stmt in loop

    Hi all, Pls provide your suggestions for the following code. LOOP at ITAB. select * from zxyz into corresponding fields of table ITAB_FINAL where fromdate eq date1           todate eq date2           MATNR eq ITAB-matnr. ENDLOOP. My question is that