Generating customized signal

Hello all,
I've been trying to generate a customized signal on LabVIEW. It needs to be repeated periodically. I wrote a C-code and implemented it in the function block and put the block inside a while loop that is time-controlled using a tick counter. The signal works properly, when I tried plotting it within the while loop. However, when I try to read the data from outside the while loop, I am unable to. Is there any way I can extract the data outside the while loop or use a different timing mechanism that doesn't involve a while loop?
I tried using a queue but the values weren't passed outside the loop even when I used the queue.
Thanks!
sirius18
Attachments:
C++ Loop (1).vi ‏31 KB

Wow, you're determined to stick to a text based programming language even inside a LabVIEW block diagram!
I'm not sure your VI is working the way you want it to. There is nothing slowing down the while loop. It will loop as fast as the CPU can handle.
The timing primitives on your block diagram are just giving a millisecond timer value, they aren't providing any periodic timing.
Your formula node is supplying 1 value pair at a time, these pairs need to be collected somehow. When the XY graph is placed on the the block diagram a "Build XY Graph" express VI is also added to collect the XY data points for you, otherwise you will only ever see a single value pair. The bit that isn't obvious is that you need to wire the "reset" input to the "Build XY Graph" express VI. Otherwise its default value is True and it resets at every iteration and you only ever see one value.
There is a "First Call?" primitive you can use to reset the Build XY Graph VI once at the start and then switch over to collecting data.
I've also added a "Wait millisecond multiple" inside loop to slow it down and give you consistently timed data points. Without it you will get countess millions of unpredictably timed data points a second.
I think this will get you to the next step.
Troy
CLDEach snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
Beware of the man who won't be bothered with details. - William Feather
The greatest of faults is to be conscious of none. - Thomas Carlyle
Attachments:
C++ Loop (2).vi ‏32 KB

Similar Messages

  • How to generate GPS signal continuous

    Hi,
    I encountered a problem recently and I need your help. A customer used a PXI-5671 to generate GPS signals to test a receiver. The problem was like this:
    1) When we used actual GPS signals instead of simulated signals generated from the PXI-5671, the receiver functioned normally.
    2) When we streamed bin file to generate signals repeatedly using the PXI-5671, the receiver could receive correctly for the first time, while at the rest of it the receiver couldn't receive the signals nor display how many satellites there were and what the signal strengths were.
    I supposed, that this was due to the reason that the timestamp for the second time was earlier than that at previous time. How do we generate GPS signals continuously with the timestamps updated?

    Hi,
    When you stram from a bin file repeatedly, it will run first time but will lose lock because when it comes tothe beginning of the file, its time suddenly jumps and the receiver does not accept this. For example, lets say your bin file is from GPS time t1=0 to GPS time t2=30000s. When you loop back around the file, the time increases from 0 to 30000 and then jumps back to 0 and that is not acceptable by receiver. You will need a direct streaming from 5671.
    I can put that up for you soon if you want.
    Regards, 
    Sastry 
    Sastry Vadlamani
    RF and Communications Software R&D
    National Instruments

  • How to generate a signal like this on PCI-6202 DAQ card

    I want to generate a signal like the one in the attached picture.
    Which have inputs like
    1. Frequency 
    2.Duty cycle
    3. No of pulses
    I have created a file which gives the signal like the other one in the end which has frequency of 200us and duty cycle of 0.5% that is 1us On and 199us signal off. Now i need to include some sort of condition that when the button is pressed then the signal of the require frequency, duty cycle and no of pulses is created as input by the user on the front panel, like the one which are first part of the signals in the picture below. 
    Attachments:
    singal_co2_laser.png ‏12 KB
    gen_digital_freq_duty_noofpuleses.vi ‏21 KB

    I can direct you to this forum post as an example and see if it helps you out. It seems very similar
    http://forums.ni.com/t5/Multifunction-DAQ/how-to-g​enerate-digital-signal-from-PCI-6221-like-the-one-​...
    Rob W.

  • Want to Generate custom logs with Log4J within Java Embedding activity

    Hi Gurus,
    i want to Generate custom logs with Log4J within Java Embedding activity. For that i have performed some steps, but the log file has not been created.
    ServerSide Configuration:
    *===============*
    1. I have copied the log4j-1.2.15.jar file to the "oracle.soa.ext_11.1.1" location and recreate the oracle.soa.ext.jar file using an-script, which appends the log4j.jar file to the classpath.( That was created successfully)
    2. Specify a File location in log4j.xml for creating the log file. (e.g. (<middleware_home>/config/customLog.log)
    3. Then create a folder and add log4j.xml and log4j.dtd file under the folder.
    4. Modify the startManagedWeblogicServer by adding JAVA_OPTIONS="-Dlog4j.configuration=<middleware_home>/config/log4j.debug.xml”
    5. Then restart the SOA server.
    log4j.xml :
    I have used fileAppender.
    DevelopmentSide Configuration:
    *===================*
    1. Create synchronous BPEL process and Add "JAVA Embedding Activity" inbetween receiveInput and replyOutput activity.
    2.Import the log4j-1.2.15.jar to the project libs
    3.In the BPEL source code, import the Logger class.
    4.Insert the code in the JAVA Embedding Activity
    Logger logger = Logger.getLogger("CustomLog");
    logger.info("CustomeLog " + getTitle());
    Compile and deploy the project into the SOA_server and test it. Test status is completed but log is not created in the mentioned location.
    Ref: http://blog.andrade.inf.br/search/label/Log4j
    Is there any other way to achieve this requirement. Please suggest.
    Thanks in Advance,
    Sharmistha

    You can try this.
    http://veejai24.blogspot.co.uk/2008/04/simple-way-to-implement-log4j-in-your.html
    Thanks,
    Vijay

  • Ukelele generated custom keyboard layouts not working in Lion?

    I asked this question in the stackexchange site a few days ago.  Nothing I've tried has worked so far, except for creating a new account.  Because a fresh account works, it's got to be something with my preferences, right?
    http://apple.stackexchange.com/questions/21691/ukelele-generated-custom-keyboard -layouts-not-working-in-lion
    Here's the question from above:
    I created a custom keyboard layout with Ukelele (http://scripts.sil.org/ukelele) in Snow Leopard (idea is to generate scandinavian letters with Alt-key, otherwise have a pretty much standard U.S. layout). After the upgrade, the old installed (to ~/Library/Keyboard Layouts) layout wasn't working.
    Ukelele seems to work OK in Lion, but whether I put the generated keylayout in a bundle or single file, or save it "/Library/Keyboard Layouts" or "~/Library/Keyboard Layouts" doesn't seem to matter.
    Help?
    EDIT:
    @Sergio, I cannot choose the layout in Input Sources. One keylayout file I tried:http://semeai.org/~sjl/us-scands.keylayout
    [EDIT: Removed unrelated stuff]
    UPDATE 2011/08/15:
    @Tom:
    Copied your keylayout (it naturally ended up in my Junk folder):
    midgard (01:55) >ls -l ~/Library/Keyboard\ Layouts/MongolianQWERTY.keylayout-rw-r--r--@ 1 sjl  staff  44536 Mar 13  2008 /Users/sjl/Library/Keyboard Layouts/MongolianQWERTY.keylayout
    Logged out, logged in, isn't showing in Input sources (I'm looking very closely between "Maori" and "Myanmar - QWERTY").
    I've also uninstalled bunch of software and plugins giving suspicious messages to system.log, but hasn't helped.
    UPDATE 2011/08/16:
    I created a test account, and lo, the layout works perfectly for it. Also the bug in preferences doesn't show for that account. When trying this on my own account, there are no errors in Console logs with the suggested keywords (I can't seem to locate console.log file, though).
    UPDATE 2011/08/16 later:
    Nuking Library/Caches (and relogging) didn't help.
    UPDATE 2011/08/17:
    I did
    % find Library -name "*.plist" -exec mv {} {}.renamed \;
    and restarted, but it didn't help. I restored the situation with
    % for file in `find Library -name "*.plist.renamed"`; \  do mv "$file" "${file//.renamed/}"; done
    addendum: I also went through all the .plist files with plutil -s as described inhttp://www.askdavetaylor.com/can_i_check_my_plist_files_in_mac_os_x_for_problems .html. There was some brokennes, but in very unrelated applications.

    Tom,
    I think I love you.
    That absolutely did it! Thanks so much!
    If you'll answer with the same link in the stackexchange site, I'll mark the answer as correct, so you'll get the rep there.
    Thanks,
    Sami

  • R12 Generate Customer Statement and email to customer automatically.

    Hi,
    Is there any standard function "Generating Customer Statement and emailing directly to customer" in R12?
    Thanks
    Dharma

    Not that I am aware of - see MOS Doc 433215.1 (Is There a Way to Email AR Statements or Dunning Letters to Customers?)
    Srini

  • Customer ##1 Enter a valid time interval error while generating customer BP

    Dear Experts,
    I am getting the following error when I am auto generating Customer while creating Business Partner in BP transaction code.
    Customer ##1: Enter a valid time interval
    Message no. CMD_API087
    Had anybody faced this problem?
    Regards
    Komal

    Hi,
    In Transaction 'BP', after values is put for BP name, Grouping & Create in BP role, there is a field for Validity period. Click on the icon to Create Validity period. This should resolve the issue.
    Regards,
    Nimesh

  • Can myRIO generate PS_ON signal to turn on a PC?

    I am working on an autonomous robot running on myRIO and a mini PC. The robot has a power ON toggle switch. However, the motherboard requires a momentary switch PS_ON signal. I wonder if myRIO can generate this signal via its MXP pins. If it's possible, I'm planning to load this VI as a start-up program to power on the whole system.
    I'd appreciate any input or previous experience.

    Hi kvanpv
    I think there should be no problem for you to set the myRIO to generate the PS ON Signal, as long as you check that the electrical requirements of the motherboard are covered by the MXP pins of the myRIO. Does the signal have any particular timing requirements?
    WenR

  • Can we generate custom reports in oIM 10g

    hi,
    Is it possible to generate custom reports in OIM 10g? Is it a complex process?
    Thanks

    Thanks for the reply,
    I am able to generate the report, but the issue is with the filter condition, I am trying to filter the results with a udf field but filtering is not happening and in logs the error coming is
    Thor.API.Exceptions.tcColumnNotFoundException
    at Thor.API.tcMetaDataSet.getStringValue(Unknown Source)
    at com.thortech.xl.webclient.util.ReportUtilities.getLinkHref(Unknown Source)
    at com.thortech.xl.webclient.util.ReportUtilities.populateTableDataForTabularDisplay(Unknown Source)
    at com.thortech.xl.webclient.util.ReportUtilities.displayReportWithTabularLayout(Unknown Source)
    at com.thortech.xl.webclient.util.ReportUtilities.displayReportWithLayout(Unknown Source)
    at com.thortech.xl.webclient.actions.ReportAction.displayTabularReport(Unknown Source)
    at com.thortech.xl.webclient.actions.ReportAction.displayReport(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)
    at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
    at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
    at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
    and one more thing , how to give two conditions in where clause in stored procedure , for e.g i have given like
    strWhereClause := 'usr_key IN(SELECT DISTINCT usr_key FROM usr) and UPPER(usr.usr_status) like '
    || UPPER(''''||strstatus_in||'''')
    || ' AND UPPER(usr.USR_UDF_CUSTOMATTR) LIKE '
    || UPPER(''''||strcustattr_in||'''')
    || ' ';
    and its not taking the two values.pls tell me where its going wrong

  • Error generating custom progress

    Hi!
    When I run an application JavaFx in Firefox or IntenetExplorer displays the following message:
    Error generating custom progress : java.lang.SecurityException: attempted to open sandboxed jar http://dl.javafx.com/1.3/progressbar__V1.3.1_b101.jar as a Trusted-Library
    java.lang.SecurityException: attempted to open sandboxed jar http://dl.javafx.com/1.3/javafx-rt-windows-i586__V1.3.1_b101.jar as a Trusted-Library
         at com.sun.deploy.security.CPCallbackHandler$ParentElement.checkResource(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath$JarLoader.checkResource(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
         at sun.plugin2.applet.JNLP2ClassLoader.findClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Excepción: java.lang.SecurityException: attempted to open sandboxed jar http://dl.javafx.com/1.3/javafx-rt-windows-i586__V1.3.1_b101.jar as a Trusted-Library
    The version of Java is 1.6.0_21
    Thanks for the help!

    Many of problems i've expienced with deployment where about jar signature and cache. Is that problem appear only with your APP, is it signed, there were many bug related issues with JDK u18 to 20.

  • How to generate two signals using NI myDAQ

    Dear Sir:
    I designed a circuit to generate a sine wave successfully using Labview. What I want is using NI myDAQ to generate another 3V DC signal as a power supply. I can do this seperately but when I add them together there is an error:  NI Platform Services:  The specified resource is reserved. The operation could not be completed as specified.
    I would like to use A01 to generate a sine wave and A02 to generate a DC wave, could you please check my file and tell me how to solve this problem. I found a solution which generates two signals together but what I need is to control these two signals seperately and using two channels.
    Kind Regards
    Jeff 
    Attachments:
    signal gen and acquire.vi ‏126 KB

    Thanks very much for your kind reply.
    No. I tried for a long time, change the samples of each simulate signal to the same but the warning also came out. Could you please check my file and tell me how to solve this kind of problem?
    Kind Regards
    Jeff 

  • Reg: Generating  custom number instead of system generated no in ME21n

    Hi Experts,
                      I need to know user exits or Badi to generate custom number instead of system generated number while saving p.o ME21n transaction.
    Regards,
    Vikram.S

    Vikram,
    Instead of doing it programatically , ypu can satisfy your requirement in configuration settings.
    check SPRO with the help of functional consultant.

  • Search data in a 2d array and generate a signal when found

    Hi, i am looking for an interactive way to search data from an array containing a 2d array found in a cluster. The data is in the 2d array. I have attached the vi containing the array. I want an interactive method to look up for the codes in the 2d array(found in the 1st row) and when found generate a signal to tell it has been found. The signal varies depending in which category was data code found (whether engineering, law or others). Btw the data i am looking for are in fact input using a barcode reader. Should i use a search 1d array function? or is there another method?
    Solved!
    Go to Solution.
    Attachments:
    Untitled 1.vi ‏6 KB

    Just to make sure we are totally clear here.  We are trying to find the cluster which contains a certain data point in its first row of the 2D array?
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Search for element.png ‏14 KB

  • Generating digital signals (T/F) continuosly at certain frequency

    Please help me in generating digital signals continuously (TRUE/FALSE alternatingly) in LABVIEW 7.1. I want them to be crreated at frequency which can be controlled by myself. Kindly help its urgent. Contact me at [email protected] Thanks Rahul

    Have you looked at the shipping examples for DAQmx? What kind of DAQ card do you have?
    p.s. since all questions are answered here, posting your email does no good except put you on a list of spammers.

  • How to generate PSK signal via IFRIO

    Hi, i want to ask is anybody know how to generated PSK signal via IFRIO.
    I already generate PSK signal and analyse it using modulation tool kits but how to configure IFRIO to make it send out this signal?
    PSK signal detail:
    BPSK with symbol rate 4000bps
    modulated by 16KHz carrier.
    Thanks.

    Hi
    precisely i have no idea what is the sampling rate of the signal. I just want to generate the signal with constant amplitude based on the actual sampled signal. is it possible to achieve?.
    Attached is my actual sampled signal.
    Attachments:
    data samples.doc ‏32 KB

Maybe you are looking for

  • Load of hierarchies from R/3 via flat file: how to generate the flat file?

    Hello, I need to build a custom extractor for a hierarchy. The hierarchy exists in R/3, but there's no standard datasource to extract it. I know I can upload it via flat file, but I have a question related to this. Does anyone know if there's a progr

  • (Item) was not copied to the iPod (Name)'s iPod Touch because it cannot be played on this iPod

    Last week I purchased Star Wars the Clone Wars: Season 5 off of the iTunes store. I have purchased all previous seasons over the years and they have been able to play on my iPod. But when I purchased this new season, whenever I try to add the episode

  • Vendor Name modification

    Hi Guys I want to increase the length size for NAME1, but still appearing as short in the output though I gave the following output length   fieldcatalog-fieldname   = 'NAME1'.   fieldcatalog-seltext_m   = 'Comp Name'.   fieldcatalog-outputlen   = 20

  • Nokia software update with Vista

    Whenever I try to update my E90 it fails after downloading the 70 or so Mb's and Visya shows an error "Nokia Service Layer Host Process has stopped Working"...Please help... my E90 version is 7.24.0.3

  • Mdis.ini  file?

    Hi Friends, I am looking for the mdis.ini  and  importmanagerbatch.exe files.I couldnt trace those files. I want to run the batch job. Please guide me regards Shankar