Converting data pointed to by a pointer into an array

The vi I use returns a pointer to a block of data. The data are
unsigned 16-bit integers. Without using a for..do loop, how do I
convert the data into an array for input into an intensity graph?
(Note that I presently use a for...do loop that works by incrementing
the pointer by 2 bytes each time. But it  takes much time and I
want to eliminate using a loop in labview. I suspect built-in
functions/using DLLs would be much faster. But I do not know how to go
about doing it.)
Thank you for your help.

Hi Balakumar,
> The vi I use returns a pointer to a block of data.
If by "pointer" you mean a memory address, then I think you're DLL idea is right on track.  You could efficiently cast (sort of) the pointer into an array.
The attached .zip contains some VIs that may give you some ideas.  In LabVIEW, open the application builder and load CVTDLL.bld.  It compiles CVTDLL.vi into CVTDLL.dll.  CVTDLLCaller calls the DLL - passing it the pointer and returning an array.  The magic will happen in the way the pointer parameter is passed from the VI to the DLL.  I think we need the CLF to think it's supposed to be passing a U32 value, where the DLL thinks it receiving a pointer to an array.  Then it's just a matter of passing the data back out.  There are a bunch of forum contributors who could get this right the first try - "smercurio" and "RolfK" come to mind.
I hope this isn't yet another case where I'm way off track!
cheers.
When they give imbeciles handicap-parking, I won't have so far to walk!
Attachments:
CVTDLL.zip ‏20 KB

Similar Messages

  • How can I convert page points into document points??

    Hello,
    How can I convert page points into document points? any API?
    I have found 2 APIs
    AIDocumentViewSuite::ArtworkPointToViewPoint( ) and
    AIDocumentViewSuite::ViewPointToArtworkPoint( )
    but I dont know what is view point and art work point.
    I think artwork point = page points and view points = document points. am I correct ???

    What do you mean by 'document points'? Do you mean document units? Like centimeters or inches? If that, there's no API to do (well, kind of in AIUser.h, but that gives you back a string with a unit suffix). Frankly, its pretty easy to just figure out the conversion values for each type of ruler unit -- there are only five or so you need -- and then write a dinky function that takes a value in one or the other, looks up the current document unit and uses that to convert the value (one function for each way). You just need to figure out everything in terms of points (since pixels == points) -- in that regard, it probably helps to know that 72 pt == 1 inch. From that you can figure out pointer-per-inch|centimeter|millimeter|pica.

  • Trying to export x and y data points into excel

    Hi guys,
    I'm in a bit of a time crunch and I've been trying to figure a simple issue out.  I've been trying to export the x and y data points into an excel file.  I thought trying to use a property node would work but I've been tinkering with different subsets of the specific property nodes without any success.  The current issue I'm having right now is that the current way I have the data points into the excel file is incorrect because it's not including the x axis data points.  Additionally, I have thousands of data points that really slows things down.  I have attached the vi.  Thanks.
    Jon
    Attachments:
    UltraPCIe.vi ‏460 KB

    Hi Bill,
    Thanks for the note.  Yes, I am using that said vi.  I have attached the jpeg version of the block diagram for you.  Thanks!
    Jon
    Attachments:
    Update2.jpg ‏257 KB

  • How to read sampled data info from a "*.au"file into an array?

    I need to manipulate the sound file directly using DSP, the first step is to read sampled data from "*.au" file into an array. How can I do that? Thanks a lot!!

    There is a file I/O tutorial in the Java Tutorial (google for Java Tutorial). You can read an .au file as bytes like any binary file.
    Or if you are using the Java Sound API, google for java sound api or java audio tutorial etc etc.

  • How to resample a waveforem sample every n data points

    I would like to convert a waveform data set that has 1746 data points into a signal that has 500 data points by selecting the x-value from every 3.5 (1746/500) points and eliminating all other points. Ideally I would like to average the x-value of every 3.5 points and turn that into one data point in the resulting signal but I am not sure if that is actually possible. If at all possible I want to use the express VI's as I am not too familiar the other programming language.  I have been unsuccessfully trying to use the Align and Resample express VI because it is supposed to re-sample a signal every n data points but for some reason isn't working.  I have attached the data set (titled: Input) as well as a simplified program (titled: Resample Example).  Please contact me if you require any further information. 
    Thanks HEAPS!
    Attachments:
    Attachments.zip ‏55 KB

    I have a similar re-sampling issue and think I'm missing something here.
    The attached vi reads two analogue voltage levels one is a noisy signal (from leg muscle activity EMG) the other is from a foot switch, which I am using to partition the EMG into blocks of data (strides). There may be up to ten blocks of data which I'm trying to average, but they first need to be re-sampled to get them the same size (such that they represent one complete gait cycle). I am currently saving the blocks to TDMS file (for my benefit) then opening the file and re-sampling by changing dt based on the data size. But it's not working. I've also tried using the express resample vi that is used in the examples here, but it outputs nothing.
    Any ideas?
    Note: Change the file extention of test.vi to .tdms. It is an example data set. .tdms isn't a valid extension for upload to the forum :-(
    Attachments:
    EMG using NI-6008.vi ‏133 KB
    test.vi ‏772 KB

  • Averaging 3D array into 1D array.

    Hi,
    I have a 3D array containing XY points of several loops and
    i am trying to average the data points of my array into a 1D array that should
    contain 1Loop with XY points. Can someone help me out?
    Thanks 
    Mutah
    Qui ose vaincra.
    Solved!
    Go to Solution.

    Hi Mutah,
    it really doesn't help so much...
    There is no 3D array in your VI, just two 2D arrays. You also don't mention what to average in those arrays: rows, columns, or something completely different?
    Also: what do you mean by "loop" ("see a loop", "final loop")? Do you mean FOR loops, WHILE loops? Or rows/columns of an array?
    At least a small hint in the attachment...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    program.vi ‏136 KB

  • How can I convert these 250 data points in a spreadsheet file into an array???!!!

    I want to convert these points(see spreadsheet file attached) into a 1-D array of numbers and plot them using a vi. I am using the readfromspreadsheet.vi and it just gives me a number 4 and plots that. Please tell me what to do...I'm confused and have a project due!!!
    Attachments:
    ec1.xls ‏14 KB
    test.vi ‏14 KB

    Save the excel spreadsheet as tab delimited text file and use "Read From Spreadsheet File" vi to read it.

  • How to Convert Date to Month in Database which is pointing to EBS, Not DWH.

    Hi Friends,
    We are planning to create reports in OBIEE and the Source is EBS. That means, we don’t want to depends on Datawarehouse and Informatica and OBIApps. We just create some reports and they are pointing to EBS database.
    For testing purpose, we have taken one HR Report and it containsthe below columns:
    Month (Dim)
    Revenue Per Employee Headcount (Fact)
    Average Cost per Active Workforce Headcount (Fact)
    In my little investigation, we found that Revenue column is coming from EBS: GL_BALANCES. And we configured W_Day_D base table in DAC as there is no Month column in EBS (Not sure).
    *** Coming to my problem, how can I call Month column in my database pointed to EBS. How to convert Date to Month in my database.
    I could be wrong but anyone please look into this issue.. How can I create columns for that exact OBI report in EBS database instead of DwH.
    Thanks in Advance..
    Raghu Nagadasari

    Hi Veeresh,
    You are right. Here, no need of using W_DAY_D table, but, we need all the stuff from the table and to explain my problem i have taken that table as an example. Now, we ran scripts for W_MONTH_D and W_DAY_D tables with EBS columns. So, we are getting data for the tables. In the same manner we have to create scripts for the below tables.
    W_GL_ACCOUNT_D
    W_GL_OTHER_F
    W_STATUS_D
    W_MCAL_DAY_D
    W_EMPLOYMENT_STAT_CAT_D
    W_WRKFC_BAL_A
    W_DAY_D (Completed)
    W_MONTH_D (Completed)
    But, we are not aware of EBS Tables and their columns much. So, we are back tracing from RpD --> DAC --> Info --> EBS for each and every column and its taking much time.
    So, if anyone of you facing the same issue, please share the EBS tables for the corresponding OBI tables, which are mentioned above.

  • How can I convert 400 data points from a spreadsheet file to an array?

    The spreadsheet file contains over 5000 data points (in one column) of which I only want the first 400 and want to convert them to an array in Labview. I tried to use the 'readfromspreadsheet' vi but it wasn't much help. Please tell me how i should approach this problem and what vi's to use.

    I attach a model vi that you can experiment with. You will need to know the formatting of the data in your file, from there -plus the delimiter- you'll be able to estimate how many characters makes the first 400 data point. It's possible to develop a more robust vi to do this, in the mean time, the attached vi can quickly give some answer.
    Attachments:
    model.vi ‏28 KB

  • Methods in bapi used to convert data into XML

    Methods in bapi used to convert data into XML,
    how to implement those also,
    points will be rewarded
    Thank you,
    Regards,
    Jagrut BharatKumar Shukla

    Hi
    Check this
    http://www.sap-img.com/abap/sample-xml-source-code-for-sap.htm
    https://forums.sdn.sap.com/click.jspa?searchID=2889167&messageID=3406594
    Reward points for useful Answers
    Regards
    Anji

  • How to convert the data decoded by MJPEG Decoder MFT into RGB32

    I try to play .avi file(Motion JPEG) with MJPEG Decoder MFT and
    My ColorConverter MFT to convert into RGB32 by using the Media Foundation.
    The output format of MJPEG Decoder MFT is YUY2.
    So, I implemented My ColorConverter MFT to convert YUY2 into RGB32.
    I set the  topology to play .avi file and  to convert into RGB32.
    But I got a MEError event with ME_ARITHMETIC_OVERFLOW in
    IMFMediaEvent->GetStatus(&hrStatus)); after the event MESessionTopologyStatus.
    So,the file isn't started to play.
    The created topology is follow.
      Source-> MJPEG Decoder MFT -> My ColorConverter MFT -> EVR
               Format:                    YUY2                                         
    RGB32
    Why do the error occur in processing to convert the data decoded by MJPEG Decoder MFT
    into RGB32?
    Please tell me a appropriate way to convert the data decoded by MJPEG Decoder MFT
    into RGB32.

    You've got the High Speed Data Reader.vi as a starting point. That will retrieve the binary data and plot it on a chart. From the array of sgl's created, you could then use the Write to Spreadsheet File.vi to create a comma or tab separated file. The other option is to write the data straight to Excel using ActiveX. There's a shipping example that shows how that's done as well.

  • Converting multiple points to line

    Hi All
    I have table consist of point data.. how to convert multiple points to line data.. if anyknows pls tell me ..
    Thak you

    user13340372,
    . . . .Are you trying to draw a line between 2 points or draw a line connecting N points?
    How to Create a Line From 2 Points_
    . . . .You could use the SDO_Geometry constructor. For example, if you have a table POINTS defined as (ID NUMBER, FromPt SDO_GEOMETRY, ToPt SDO_GEOMETRY), then you could:
    SELECT 
        SDO_GEOMETRY(
        'LINESTRING ('||
        -- concatenate coordinates from FromPt
        REPLACE(REPLACE(p.FromPt.Get_WKT(), 'POINT (', NULL), ')', NULL)||','||
        -- concatenate coordinates from ToPt
        REPLACE(REPLACE(p.ToPt.Get_WKT(), 'POINT (', NULL), ')', NULL)||')'
        ---  SRID
        , 4326)
    FROM
        POINTS p;              
    How to Create a Line From N Points_
    . . . .In a "connect-the-dots" puzzle, you draw lines from one numbered point to the next numbered point. There, the numbers define how points are related. If you dont have that information, then you need to decide how you want your points connected. Here are a few options - your requirements should indicate which (if any) is suitable:
    . . . .(a) Draw Arbitrary Linestring Through Points: user10278189 already posted that PL/SQL solution (above).
    . . . .(b) Connect Nearest Neigbors: set CURRENT_POINT to a point (e.g., bottom-left). Then identify its nearest-neighbor (hereinafter, "NextPoint") using SDO_NN. Flag NextPoint as "visited" and set CURRENT_POINT to NextPoint. Repeat until all points in the point-set are flagged as "visited." The result ( which depends on the starting point ) is a linestring connecting all points (a "line" is only between 2 points; a linestring is between 2 or more points). This requires PL/SQL.
    . . . .(c) Draw Along Shortest Distances: Create a table containing: FromPt_ID, toPt_ID and distances between each pair of points. (If you do this via a cross product, remove rows where FromPt_ID = ToPt_ID.) Begin connecting the points with the minimum distance from the last "visited" point (as before, flag the points that have been used as "visited"). The result of this operation is the shortest linestring connecting your point-set. This requires PL/SQL.
    . . . .(d) Outline Set of Points: You could also use the SDO_GEOM.Sdo_ConvexHull function to create polygon that encloses your point set, and then use SDO_UTIL.PolygonToLine to turn that area-geometry into a line-geometry. This can probably be done in a single statement.
    . . . .(e) Others (TSP, spanning tree, etc).
    Regards,
    Noel

  • Data point display when mouse hovers over data point in TCODE QGC1

    Hi experts,
    Just want to ask if anyone knows how to add more data in the display when your mouse hovers over the data point in the control chart of transaction QGC1?
    Because currently the control chart shows u201CSeriesu201D and u201CValueu201D, Iu2019m planning to add the inspection lot date when your mouse hovers over the data point.
    Hope to have some response regarding this and thanks in advance

    Tohatsu,
    I am not sure exactly what you are trying to do but the way you have went about doing things is not the way to code in LV. Fist off break your code into functional blocks and use these functional blocks as Subvi's. This will make your block diagram easier to read. Once you do this you can get rid of a lot of code. Also you need to learn how to use the event structure, right now the way your code is set up to use it is not correct. Have a look at the examples that ship with LV. i am not even going to begin to try to understand your code because the diagram is so large. Please do not take all of this the wrong way I am not trying to be hard on you or anything, I am just giving you some constructive criticism..
    Break your code down into functional blocks and use subvi's to perform those blocks of code.
    Have a look at the examples on how to use an event structure.
    Have a look at state machines
    You would also benefit from getting the book called Labview for everyone, third edition, jeffrey travis and james kring.
    You have a lot going on in this VI. Use the eventstucture to your advantage instead of as a hinderence like it is now. the way your code is set up now everything runs in your while loop, then it waits for an event to fire. in your case the while loop will not run again until the mouse moves over the waveform chart. You are on the right track, you just need to get some fundamental basics down and you will figure out what is going on.
    Thanks for converting the code to 8.0 for me.
    Message Edited by Jhoskins on 01-30-2008 09:17 AM
    Joe.
    "NOTHING IS EVER EASY"

  • Am I able to tag a data point of a spreadsheet that is being created by a datalogging VI such that at the end I have the data with multiple tags which corelate to events during a measurement cycle

    Am I able to tag a data point of a spreadsheet that is being created by a datalogging VI such that at the end I have the data with multiple tags which corelate to events during a measurement cycle
    My final need is to take data from a datalogging VI and store it in a spreadsheet with tags that corespond to events in a subVI which is controlling motor movement. This will allow users to view all data and mark the relevent data for analysis. As usual, user want everthing but with conditions.

    Sure. What you do is take the numeric value acquired, the tags you want, and build them into an array. So now, when you write to the spreadsheet, you'll have a 2D array. One thing you have to keep in mind is that all elements of an array have to be of the same type. So if your tags are strings, you'll have to convert your numeric data into strings as well.

  • Plotting of graph with more than 4000 data points in Excel

    Hi All,
    I am fairly new to labview world. I am trying to plot out line graphs of the results from my program into Excel worksheet. I have huge set of data points(10000) stored in each of 10 different worksheets in MS Excel workbook. I am trying to compile results into last sheet as graphical representation of all the various dataset into 10 different graphs.
    My problem is that I am getting error because MS Graph does not allow me to plot more than 4000 rows or datapoints. Is there better and cleaner way of programming this? Or if some one can provide an example of how to handle such case. I'll appreciate any help.
    My goal is to able to plot one set of data 1st then I will be able to run through various worksheets to compile into standalone results.
     ERROR MESSAGE: "Report Generation Toolkit: Graphs you create or edit in Microsoft Graph cannot contain more than 4,000 rows or columns, including row and column headers. "
    Also for example if we run Line Graph example and change the # of data points from 100 to 4000, we get same message.
    Error -41114 occurred at NI_ReportGenerationToolkit.lvlib:Excel_Insert_Chart.vi -> NI_Excel.lvclass:Excel Insert Graph.vi -> Line Graph (Excel).vi
    Thanks,
    Saurabh

    Hi Dennis,
    I am collecting waveform data from oscilloscope using labview in both data & graph format. So my program collects data for a particular operating condition & then saves the data on a worksheet. After it loads new operating condition & goes over same cycle. I have to save all the data points in excel for different use cases, which I am saving in different worksheet for each specific operating condition.
    Since I already have data saved in excel at the end of test, I am trying plot each use case in the same report for study & presentaion after tests are finished. I have not been able to do so. I read the post which you have mentioned, seems like newer excel or labview version have same issue. I am using LV 9.0
    I will try using decimation but if you have any better way of handling this problem, I'll appreciate if you can share that.
    Thanks for your help.

Maybe you are looking for

  • Key word import

    I run Lightroom on my laptop for field use.  When I get home I want to transfer the files to my desktop sys which is much more robust for graphics handling.  My problem is that if I assign keywords to the photos on my laptop I can't get them to trans

  • Dunning Proposal-FPVA

    Dear Experts, I am doing the dunning proposal, when i have checked in the application log there is no dunning notices in the dunning proposal. I am getting the message "Dunning Notices in Dunn. Prop. 0".  There is no incoming payment method and lock

  • J2EE not Started.

    Hello to all!, I have problem with my system Netweaver 2004S. We had in our offices an interruption of the light, which affection the shutdown in server of Netweaver. The services of database is ok and the connection to the system is ok, but the J2EE

  • Mysql's binlogs eating up a lot of drive space

    I just noticed the root partition being filled up, having like 3 or 4 1gb-each files that are supposed to be mysql binaly log files..... How can I tell mysql to stop using those/downsize them/purge them? Is it safe or will it affect the apps using my

  • Delta of 0CRM_SRV_PROCESS_I

    Hi all ,     i have a very small question . can anyone tell me which is the field from where the delta of 0CRM_SRV_PROCESS_I is determined ?     the real problem is there is a custom datasource with the same structure of 0CRM_SRV_PROCESS_I.all i need