How to output data when converting labview vi into matlab mex functions

Hi,
I am a fairly new user to labview and am currently working on labview
7.1. I have created a labview vi which can extract data from ni daq
6070e in real time. The problem is that this code has to be converted
so that it can be used with matlab.in order to do that i am using math
interactive tool kit which converts the labview code into mex files
which can then be used in matlab. Unfortunately i have not been able to
figure out how to output this data so that it can be processed in
matlab easily. i cannot afford any loss of information and all the
output must happen in real time. the o/p must take place after the fft
has been done. i am attaching the vi for convenience.There are 10
broken wires ,and this is the place where i want the o/p to be
generated.
Also do let me know if this vi can be further improved.
Regards
Attachments:
RT_loop2ver4_working.zip ‏642 KB

Manuj,
You seem to have misunderstood the way in which LabVIEW processes data.  The code that you have produced will run in exactly the same way without the need for the case structure.
The code does not actually run the data from the previous case. It is merely processing data from the previous loop iteration, regardless of the case. If you were to remove the case structure, leaving only one copy of the code intact, and remove the toggle switch you have produced, or used the shift register which, I assure you would have worked, then you will have exactly the same functionality.
I have attached an example that uses the shift register to toggle cases, but also iterates that the case structure is not needed by using the same feedback node (and code) without a toggle switch or case structure.
Hope this helps you optimize your code
Regards
AdamB
Applications Engineer
National Instruments UK
Applications Engineering Team Leader | National Instruments | UK & Ireland
Attachments:
CASE_NO-CASE_Example.vi ‏24 KB

Similar Messages

  • How to preserve data when converting a Standard DSO into a Write Optimized

    Hi,
    I'm looking for proven strategies for preserving data when converting a standard DSO into a write optimized DSO. The data has to be dropped before the new DSO is transported into the environment.
    1. The DSO is currently in synch with a cube,
    2. The PSA does not have all the data which is in the DSO.
    3. Data volume is incredibly high for a full reload from ECC, so we'd like to avoid that option.
    Appreciate any help!

    Hi Gregg,
    have you considered just deleting the data? I know that sounds simple, but it might be a valid solution.
    If the DSO is just receiving new data (e.g. FI documents), you can continue to deliver a logically correct delta to the cube.
    Should that not be possible and you really want all data that you currently have in your DSO1 in the write optimized future of it, then how about this:
    - Create a new DSO2 same structure as DSO1
    - Load all data into that
    - Delete all data from your DSO1 and import the transport to make it write optimized
    - Load all data back into you now write optimized DSO1 from DSO2
    The problem you have then, is that all data that you have already loaded into your cube is due to be delivered as a delta from DSO1 again.
    Depending on your transformation / update rules that might or might not be a problem.
    Best,
    Ralf

  • How to decrypt data when you can't get the private key in Windows?

    I'm very confuse. My english is poor, but I try to say my question clearly.
    When browser connects to a https website which needs client certificate to authenticate the identity, the browser will send client certificate to web server.
    Then the web server will use the certificate to encrypt some data and send it to browser.
    Then broswer should have private key to decrypt that.
    But as I know, if I install a pfx format personal certificate, I can set can't export private key, which means you can't get the private key to use it. So how can
    the browser decrypt the data without private key?
    By the way, what is CSP, use CSP's interface can we use CryptoAPI
    to decrypt data without private key?

    Answer for question is  "you cant".. 
    "How to decrypt data when you can't get the private key in Windows?"
    Read more 
    http://msdn.microsoft.com/en-us/library/windows/desktop/aa387460(v=vs.85).aspx
    http://msdn.microsoft.com/en-us/library/windows/desktop/bb427432(v=vs.85).aspx
    http://technet.microsoft.com/en-us/library/dd277320.aspx
    http://en.wikipedia.org/wiki/Public-key_cryptography

  • How to output data to a file in SCC-SG04?

    I am using SCC-2345 with SCC-SG04 connected to NI-6221 in Windows 2000 in VC6.
    How to output data to a file like data1.dat in VC6 or in Labwindows/CVI?

    Hello mwibm,
    If you just want to do file input/output in LabWindows/CVI, I would take a look at the Formatting and I/O CVI library or the ANSI File I/O functions. For example, if you just want to write an array of data to a file, I would look at the ArrayToFile function or the fwrite/fputs/fprintf ANSI C functions included in stdio.h. The ANSI C functions will also work in Visual Studio. More information on the LabWindows/CVI File I/O functions can be found in CVI help, and more information on ANSI C functions can be found in CVI Help and online at various websites.
    Maybe you could further clarify what problems you are having and what kind of data you want to write to a file.
    Thanks.
    Wendy L
    LabWindows/CVI Developer Newsletter - ni.com/cvinews

  • How to output sample and convert clocks to PFI lines of E-Series DAQ (DAQPad-60​15)

    Hi,
    Can someone tell me how to output sample and convert clocks to PFI lines of E-Series DAQ (DAQPad-6015)?
    Thank you very much.
    Jack

    John --
    Windows is not an option for me. I like your idea of using a counter output -- it may be helpful as I am getting ramped up, but my application will eventually require both timer outputs.
    I have a legacy C application written for Macintosh, and I am in the process of moving it onto OS X. So my options are to use DAQmx Base, or write an in-kernel driver. I actually have already done the latter for 6024/6025 E-series boards (for another company); for this client I was hoping to use the DAQmx Base to allow an easy transition to M-series boards, without the cost of writing and supporting a low-level driver.
    The specific task I am doing is relatively straightforward. I record 2 channels of AI for a short period (usually about 250 ms.) and during this time I drive 2 external digital signals. Right now, I use the 2 timer outputs, which allows precise synchronization with the output and AI sampling.
    I appreciate your comments, and thanks in advance for any additional suggestions you can lob my way.
    --spg
    Scott Gillespie
    Applied Brain, Inc.
    scott gillespie
    applied brain, inc.

  • Who knows how to output some text once labview detects something I want using pattern matching(V​ision assistant)​?

    who knows how to output some text once labview detects something I want using pattern matching(Vision assistant)?
    The text is something like"Yes, this is a coin"
    Thanks!

    I attached a SubVI which I used to place an overlay next to a Pattern, found by a Pattern Match before:
    As you can see, you simply pass the image reference and the Array of Matches to the VI along with the String you want to have as an overlay next to the Match.
    I also modified your VI a bit, but didn't test it. I created an Array of clusters, each elment containing the template path along with the respective text.
    Please note that this is just a hint!
    Christian
    Attachments:
    suggestion.vi ‏146 KB
    Overlay_Txt.vi ‏24 KB

  • How to open dat file in labview

    how to open dat file in labview.???how to make use of biomedical startup kit for doing so???

    Please post this question on the Biomedical User Group here:  www.ni.com/biomedusers
    This is where you will find the best support for the Biomedical Starter Kit.
    Steve
    Visit the NI Biomedical User Group at:
    www.ni.com/biomedusers

  • How to read data from an internal table into a real table?

    Hello experts,
    I'm relatively new to ABAP and I'm trying to figure out how to read data from an internal table into a table that I created.  I'm trying to use the RRW3_GET_QUERY_VIEW_DATA function module to read data from a multiprovider.  I'm trying to read data from the e_cell_data and e_axis_data tables into a table that I've already created.  Please see code below.
    TABLES MULTITAB.
    DATA:
      query_name TYPE RSZCOMPID,
      s_cubename TYPE RSINFOPROV,
      t_cell_data TYPE RRWS_T_CELL,
      t_axis_data TYPE RRWS_THX_AXIS_DATA,
      t_axis_info TYPE RRWS_THX_AXIS_INFO,
      wa_t_cell_data like line of t_cell_data,
      wa_t_axis_data like line of t_axis_data,
      w_corp_tab like line of t_cell_data.
    s_cubename = 'CORP_MPO1'.
    query_name = 'Z_corp_test'.
        CALL FUNCTION 'RRW3_GET_QUERY_VIEW_DATA'
           EXPORTING
             i_infoprovider           = s_cubename
             i_query                  = query_name
            i_t_parameter            = query_string_tab
           IMPORTING
             e_cell_data              = t_cell_data
             e_axis_data              = t_axis_data
             e_axis_info              = t_axis_info.
    If anyone has any information to help me, I would greatly appreciate it.  Thanks.

    Hi,
    <li>Once you call the function module RRW3_GET_QUERY_VIEW_DATA, lets say data is available in the corresponding tables e_cell_data e_axis_data which you have mentioned.
    <li>Modify your internal table defined for other purpose, with data from e_cell_data e_axis_data like below.
    LOOP AT t_cell_data INTO wa_t_cell_data.
      "Get the required data from t_cell_data.
      MOVE-CORRESPONDING wa_t_cell_data TO it_ur_tab.
      "Modify your internal table wih data
      MODIFY it_ur_tab TRANSPORTING <field1> <field2> <field3>.
    ENDLOOP.
    LOOP AT t_axis_data INTO wa_t_axis_data.
      "Get the required data from t_cell_data.
      MOVE-CORRESPONDING wa_t_axis_data TO it_ur_tab.
      "Modify your internal table wih data
      MODIFY it_ur_tab TRANSPORTING <field1> <field2> <field3>.
    ENDLOOP.
    Thanks
    Venkat.O

  • How to fill data when call function of sap standard script form?

    Hi every experts,
    <Priority Normalized>
    In our system, when we log in 'FR', we can print purchase order in language Franch,in t_code:ME22N.  And when logging in 'EN', we can print it in language English, in ME22N. The English form is just only translated from Franch, with all same structure and frame.  The form is done by script form.
    And when logging in 'ZH', we create a new program, calling function smartform, instead of translating from EN language. Because of different structure and frame, I don't know the way to write script, so  I print puchase order by smartform, when logging in 'ZH'.
    But I have a new issue. Our MM module consultant needs me to print Chinese form if one condition, print English form in other condition.
    So I have no idea to solve it. Because in my program, I get data to fill smartform and call function of smartform. And I don't know how to get data to fill script form. I only know the function name, 'OPEN_FORM' 'WRITE_FORM' 'CLOSE_FORM'.....
    If I only call the several functions, I will get only frame without no data. So who can tell me how to do????
    <Urgency downgraded>
    Edited by: Suhas Saha on Jul 26, 2011 3:34 PM
    Edited by: Vinod Kumar on Jul 26, 2011 4:09 PM

    Hi,
    Normally if we look in NACE transaction, you can see that upto five different FORMS can be assigned to a single output type . i.e. for each form there will be a seperate routine through which it gets called. But it all start from the first form only.
    so you need to write your code in the ENTRY of the first form and if it does not satisfy do not go for processing of it but just exit of that form ENTRY. so that it will take you to next form.
    hope this helps.
    Thanks,
    Venkatesh

  • Problems with Capture Date when converting from PSE9

    I'm trying to troubleshoot a problem I'm having when converting my PSE9 catalog to LR3.4. Specifically, about 20% of my images (abouit 2,500 out of 12,000) didn't import with capture dates. I can clearly see the correct capture dates in PSE9 Organizer, but when I view the same imported images in LR3.4, there is no date. This occurs with dates that I've modified in PSE9 as well as dates straight out of the camera.
    This is a major problem for me because I'm used to organizing my photos in PSE9 using capture dates. On a related note, PSE9 allows you to set the capture date to a known year and unknown month, day, and time, but when imported into LR3, these dates are converted to Jan 01 of the known year. Sorry, but Jan 01 is not the same as unknown. Is there a way to correctly display unknown portions of a capture date in LR3 similar to the way it's displayed in PSE9?
    Sorry if this has been discussed before.

    How did you convert your catalog?  Did you use File > Upgrade Photoshop Elements Catalog, or did you use File > Import Photos?  You should use the former; the latter has many problems, among which PSE doesn't always correctly write medata (e.g. capture dates) into files. If you used File > Upgrade Photoshop Elements Catalog, post an image here and we can take a look at its metadata to troubleshoot.
    function(){return A.apply(null,[this].concat($A(arguments)))}
    On a related note, PSE9 allows you to set the capture date to a known year and unknown month, day, and time, but when imported into LR3, these dates are converted to Jan 01 of the known year.
    Even though Adobe's XMP metadata standard allows for unknown month, day, or time, most programs including LR don't support it -- PSE is the only program I know of that does (and it has problems).  I use the conveniton of 1/1 12:00:00 to represent unknown values.
    See this FAQ for other issues with converting PSE catalogs to LR:
    http://www.johnrellis.com/psedbtool/photoshop-elements-faq.htm#_Converting_to_Lightroom

  • How to backup data when hard drive is failing.

    I think my hard drive is failing..
    I booted using Install DVD, and got message in Disc Utility that "this drive has a hardware problem that can't be repaired." It mentioned I should backup data and consult apple representative..
    I clicked on Macintosh HD under the red physical drive (500.11 GB Hitachi HTS) and did disc repair.
    Strangely, the message went away on the physical drive when I finished.  It turned back to black wording and gave green "verified/repaired" messages in the log.
    I am still able to boot my macbook, although everything is running slowly... Desktop excel files take 15 mins to open.
    Does this still sound like a failing hard drive?
    I am trying to act fast and borrowed my sister's external harddrive/ "passport for mac", and it slowly prompted a time machine backup. It is slowly working through "8.34GB of 200.33GB"
    I do not really understand what I am doing, but hoping this is the right move. Could someone explain what time machine will do or how it will help?
    Is there any chance I will harm her external hd?
    I am mostly worried about iPhoto and itunes library, iMovie projects,and important excel spreadsheets on my desktop. Is time machine looking after these concerns?
    Any help greatly appreciated.

    Where is you TM backup?
    Where are your external data redundancies?
    Now you will need to use very expensive data recovery experts to recover data when you could have had it safely on a $100 worth of 2 external HD.  
    Mechanical HD failure circumvents using recovery software.......so,  now you backed yourself into a corner and needed expensive data expert recovery.
    You took a wrong turn a long while back before reaching this cliff edge.
    that wrong term was not having (preferably 2) external HD as a redundant data archive.

  • How to streaming data/image from labview to a third party software

    Hi, i am working on a research project and stuck on the following problem: I have two cameras and one IMU Sensor unit, all conected to my PC. I save the camera images as avi format and the IMU sensor as TDMS format. I have also another software running on the same PC which i developed using VisualStudio2013.  On this software i alredy implemented a very complex filter to fuse images and IMU.  Now my quesion: would be it possibel to stream the .avi and .tdms from LabView to my software so I can test in real time how my filter is performing? If yes please let me know what LabView function do i have to use. thanks

    Thanks, the hardware are my PC, 2 usb cameras and one usb-IMU sensor. The PC runs w7 with LabView2014. I can read the camera and IMU to my Laview without any problem and save the data on my hard desk. I am also developing another software on VS-C++ for image processing and data fusion. I would like to know what is the best (and fastest) possibility to stream this data (Images and IMU) in real time from LabView to my own software?
    I read a lot in NI-website on how to communicate LabView with a third party software. They are summarized in this link:
    https://decibel.ni.com/content/docs/DOC-9131
    It looks for me that the ‘shard memory’ principle (or File Mapping) is the most convenient method. In VC++ under windows I can easily handle shared memory by calling FileMapping windows functions. Now the question is how can I do that in LabView? I am relatively new in LabView and do not know if it is possible to use shared memory in LabView. For example: is it possible in LabView to buffer both video streams and IMU-data (live) in a shared memory in computer RAM using the windows FileMaping functions (may be using .dll). Then I can access the RAM form my own software and read the stream. Please see the attachment for more description.
    Attachments:
    Unbenannt.PNG ‏139 KB

  • How to output data outtside a for loop every 10 iterations​?

    Hi friends,
    does any body help me to sort out this problem?
    please check the attchement for my vi.
    all i want is output data from inside for loop to outside for loop every 10 iterations. please do not use local variable.
    Many thanks
    dan
    Attachments:
    output.vi ‏16 KB

    Hi Dan,
    I am not sure what you want to do every 10 iterations with the value outside, but If you want to update your graph every 10 iterations use the following way:
    If you want to handle the specific value every x iterations outside the loop you could either use queues or notifieres.
    BR,
    ThSa
    Message Edited by ThSa on 08-23-2006 09:05 PM
    http://www.newgistics.com
    Attachments:
    1.png ‏6 KB

  • Query - How to output data to multiple Excel tabs?

    Hello,
    I have a quick question. Is it possible to build an ABAP query to send output data to multiple tabs in an Excel spreadsheet? I know this can be done at a single (first) tab level, but I am not sure if outputting data to multiple tabs is possible.
    For example, the address data for the different European countries should be directed to different tabs such as U.K., France, Germany, etc based on the country of residence.
    I appreciate your help with this.
    Thanks!

    Hi
    I think it is possible
    You define a common internal table with the address fields  and  based on the Language condition this table will be populated
    call the fun module to donwload to excel in a PERFORM using this Internal table and Language as paramter
    so that based on the language selection/condition the internal table will be filled from the data and that data will be passed to the fun module and downloaded to the file name given .
    pass the different file names to the fun module along with the PERFORM statement, so that different files will be created based on language
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Regarding how to Read data when it is in offline in SMP 3.0

    I have a big problem guyz...I am working on a hybrid Mobile App
    When I am in Online I am able to read the data.When I kill the application and relaunch the app and place the App in Airplane mode and when I try to read the data It is throwing me a error in browser stating  "ERR_CONN_RESET" and in the device I am getting an error such as HTTPREQUESTFAILED....
    Mithun Please help us in reading the data in offline Mode.Please help us it is on high priority
    Tags edited by: Jitendra Kansal (Moderator)

    Yeah for sure mithun,
    function read() {
      if(navigator.onLine){
      alert("hi");
            updateStatus2("read request started");
            startTime = new Date();
            clearTable();
            if (!haveAppId()) {
                return;
            var sURL = applicationContext.applicationEndpointURL + "/DateFormats";
      console.log("Date Formats Fetched"+  sURL);
            var oHeaders = {};
            oHeaders['Authorization'] = authStr;
      oHeaders['X-SMP-APPCID'] = applicationContext.applicationConnectionId;    //this header is provided by the logon plugin
      oHeaders['Content-Type'] = "application/xml";
            oHeaders['X-CSRF-Token'] = "FETCH";
            var request = {
                headers : oHeaders,
                requestUri : sURL,
                method : "GET"
            console.log("read using " + sURL);
            OData.read(request, readSuccessCallback, errorCallback);
      else{
      sap.OData.applyHttpClient();
      //OData.read(request,readSuccessCallback,errorCallback);
        function readSuccessCallback(data, response) {
            var endTime = new Date();
            var duration = (endTime - startTime)/1000;
            updateStatus2("Read " + data.results.length + " records in " + duration + " seconds");
            var productsTable = document.getElementById("ProductsTable");
            for (var i = 0; i < data.results.length; i++) {
                var row = productsTable.insertRow(1);
                var cell1 = row.insertCell(0);
                var cell2 = row.insertCell(1);
                cell1.innerHTML = data.results[i].DateFormatType;
                cell2.innerHTML = data.results[i].DateFormatValue;
    the above is my read() function in which the data is read.
    I am also attaching my openStore() method:
    if (!haveAppId()) {
                return;
            startTime = new Date();
            updateStatus2("store.open called");
            var properties = {
                "name": "DateFormatsOfflineStore",
                "host": applicationContext.registrationContext.serverHost,
                "port": applicationContext.registrationContext.serverPort,
                "https": applicationContext.registrationContext.https,
                "serviceRoot" :  appId,
      "streamParams" : "custom_header=Authorization:Basic " + btoa(applicationContext.registrationContext.user + ":" + applicationContext.registrationContext.password) + ";custom_header=X-SMP-APPCID:" +  applicationContext.applicationConnectionId + ";",
                "definingRequests" : {
                    "DateFormats" : "/DateFormats"
            store = sap.OData.createOfflineStore(properties);
      console.log("Offline Store Created");
            //var options = {};
            store.open(openStoreSuccessCallback, errorCallback/*, options*/);
      console.log("Offline Store Opened");
    When the device is in online , data is read absolutely fine where as in offline i am unable to read data and Http request failed error is getting displayed.....
    Mithun Please help us in this on high priority

Maybe you are looking for

  • Unable to login in EP 6.0 after system refresh

    After performing the system refresh of EP 6.0, completed the post system copy steps. Imported the new certificated as well, when I try to login the page is getting refresh but remains on the same page. please help me what could be the reason.

  • Regarding payment to vendor(urgent)

    Dear all, I came across this problem. For the financial year 1.04.2006 to 31.03.2007 except two payments to the vendors all the other payments have been made. As on 01.04.2007 two vendor payments have not been made. They are KR 1000 KR 50. After 01.0

  • How to delete a UI element in a "safe" way?

    When I delete/cut/copy a UI element from a project. I cannot rebuild/archive the project due a "classpath" problem. The project's structure is damaged and a lot of errors are generated. 1) How to delete UI elements from the layout without damage the

  • Pc to mac with ethernet

    Hello, Can someone please help me to how transfer file from PC to Mac using Ethernet cable? I followed the instruction on the mac web and the support but still unsuccessful. Help? Thank you

  • Pass temporary table as parameter to a procedure from Java

    Hi, I have a PL/SQL procedure that has as input parameter a temporary table. For calling this procedure from PL/SQL there is no problem: I declare a variable having the type temporary table%ROWTYPE, I fill the table with data and then call the proced