DAQmx continuously update output array from example

Hello,
I am using the example Synch_AI-AO in the DAQmx folder and it works great for sine waves, pulses, triangle waves or anything periodic. However, I would like to output a noise array which is generated from the WhiteNoise function, which is continously updated every N seconds. 
I have tried calling the StopCallback then the StartCallback after delaying for N seconds, but since I have to be in function when I call these callbacks I end up getting back to the place where I called them before exiting them (like recursion), which kills my program.
Is there a way to update output so that it doesn't cause the recursion issue that locks up my program?
Thanks.

Hi EricJR,
Rather than calling the StopCallback and StartCallback functions, have you tried calling the DAQmxWriteAnalogF64 function every time new samples are generated?

Similar Messages

  • Question about using for-loop to generate array from DAQmx. Thanks!

    I have a laser system with a frequency of 1kHz, I am using this 1kHz signal to trigger the DAQmx and get the data from a photodetector, e.g. I will get 1000 data points during 1 second from DAQmx, but I need to separate this 1000 data points into the even and odd list, which is two list of 500 data points, e.g.. The 1st, 3rd, ... 99th data is one array, the 2nd, 4th,... 10th data is another array, then I will do further calculations based on these two arrays.
    To seperate the even and odd data, the only way I can find is put these 1000 points into an array and then seperate them afterwards.
    Can I do things like this pic?
    I don't know the speed of the for loop, because the 1kHz trigger is always there, once it is triggered, the DAQmx read will give a data point, if the speed of the for-loop( the time from the end of a loop to the beginning of the next loop) is slower than the 1kHz trigger, then the for-loop will miss data point, then the ordering of the 1000 points in 1 second will be changed.
    Or I need to put everything, e.g. AI Voltage, Trigger, sample clock, into the for-loop and then return a Y? Thanks! 

    Clarification:
    The VI you have posted will work as following:
    1) The task will read 2 analog inputs (ai0, ai3).
    2) The acquisition starts, oncece digital signal (trigger) is detected on PFI0
    3) The sampling rate will be as specified in "rate" control - it is continuous analog input acquisition, which means that after trigger is received (point 2), the board will start to generate hardware clock with frequency you specify as "rate"
    4) with each rising edge of that hardware clock, the measurement is taken, and stored into buffer of driver.
    5) DAQmx read will try to read "number of samples per channel" number of samples each time is called - and if there is not enough measurement stored in buffer (step 4), then DAQmx read will wait until DAQ card will measure reaquested number of samples (or timeout occurs before requested number of samples has been acquired)
    6) DAQmx read will be then called 1000 times - so totaly you will read 1000 * "number of samples per channel"  number of samples.
    You do not have to be worried about speed of the loop. In fact, if you need to read just 1000 samples, with 1kS/s, then you can remove for loop and you can change measurement mode from continuous to finite samples, and specify number of samples to read to be 1000. You will read them all properly. I recomend you to read User Manual for your DAQ device - lets say M Series User Manual.
    I hope it is clear now.
    regards,
    stefo

  • Errors 2015 and1125 continue to keep me from updating my website. 2015 error happens

    Errors 2015 and1125 continue to keep me from updating my website. 2015 error happens and update can be resummed but error 1125 can not be resummed and thus website can not be updated. This has been a continuing problem for me for months now. I am willing to upload my site to an Adobe expert to look at.

    Thank you for sending your file.
    The most likely cause I see for the invalid bitmap errors is an idiosyncracy/bug related to the background image fill on your master page in combination with the stroke, the fact one corner of your master page is rounded, the fill image file format is .gif, and perhaps other factors.
    Given your specific design, I believe you can go to your master page and delete the Page Fill image and set the Fill Color to None without changing the appearance of your site (since the Browser Fill will show through the page). Click on the trash can icon in the Fill panel to delete the fill image and then set the Color to None.
    So, why was this page fill so problematic?
    During preview/export/upload/publish Muse goes to great lengths to produce output that provides a high level of fidelity across all popular browsers on desktops and devices. In this case the problem browsers are IE7 and IE8. IE prior to IE9 doesn't not support rounded corners via CSS, so Muse has to achieve rounded corners by other means. Cutting to the punchline, in this particular case the net result was separate PNG images resampled large enough for each of the individual pages of your site. That alone is bad, but then consider that some of your pages are fairly tall and that means the export process was creating some very large PNG flies.
    With the release of Muse 8 we'll be dropping compatibilty with IE7. IE7 has very very low and declining marketshare and the cost of attempting to account for all the special cases associated with IE7 when developing new features or enhancing exisitng ones is simply too high.
    For IE8 compatibility we'll explore a better approach to the specific case you encountered. Perhaps on IE8 we'll opt to simply not have the corner appear as rounded.
    Very sorry for the inconvenience caused by the 2015 errors. After making this change to your file, if you continue to encounter them, please let us know. Thanks.

  • How to output last 4 arrays from a For Loop?

    Hi People,
    I am almost at the end of my tether. I really hope someone could please help me.
    Any input would be welcome. VI attached.
    VI explanation:
    I initialize an array.
    The random number generator simulates my camera input.
    Depending on which iteration it is, the data is added into one of four output arrays.
    'x-y*floor(x/y)' gives a remainder value of 0, 1, 2 or 3.
    'Case Selector' just adds 1 to 'x-y*floor(x/y)' to get case 1, 2, 3 or 4.
    Shots 1, 5, 9 etc are added to Array 1 (Case 1).
    Shots 2, 6, 10 etc are added to Array 2 (Case 2).
    Shots 3, 7, 11 etc are added to Array 3 (Case 3).
    Shots 4, 8, 12 etc are added to Array 4 (Case 4).
    Averaged Output displays the averaged value i.e. the total value divided by the number of shots saved in that array ('Set (IQ+1)').
    My problems are:
    1) I would like to output only the last 4 sets of data from the Averaged Output 1, 2, 3 and 4 to 4 different files (i.e. save as .csv what is displayed onscreen in indicators 'Averaged Output 1', 2, 3 and 4 at the end of all iterations.
    Where should I place my file save diagram disable so that it does this?
    Putting it outside the main For Loop with auto-indexing on gives me one file with all previous data. (This is not feasible as my number of shots should number in the thousands)
    Putting it outside the main For Loop with auto-indexing off gives me only the last set of data. (I need the output for 4 Arrays, not just the last run)
    Putting it inside the main For Loop (as shown) gives me the same number of files as number of iterations. (Again not feasible due to large number of files that will be generated and slow camera capture)
    For the sake of fast camera capture, I would like these 4 files to only output once all the image captures are complete.
    2) Would preferably like to name the file once and for the programme to append '(1)', '(2)', '(3)' and '(4)' to filename of the appropriate 'Averaged Output' Arrays but file path controls are another big headache for me.
    3) P.s. is initializing one array enough to avoid using Memory Manager? Or should I initialize 4 arrays?
    I am using Labview 2010.
    Thanks so much,
    Jaslyn
    Solved!
    Go to Solution.
    Attachments:
    Help Understanding Arrays and file paths (10).vi ‏26 KB

    Thanks so much Lennard!!
    Hi JKSH,
    I've been busy trying to complete the dang code, but for completeness so that other users can learn too, I shall answer your queries. Thanks for looking in.
    First, what do you mean by "add"? Your code in your case strcuture sums your input values, so your array size doesn't change. However, you also said "Putting it outside the main For Loop with auto-indexing on gives me one file with all previous data. (This is not feasible as my number of shots should number in the thousands)" -- it sounds like you are expecting an array with thousands of elements. So, what should "Output Array N" look like?
    Ans: Output Array N should be a 4x4 array of the summation of all the numbers generated during every 4th iteration.
    i.e. if random number 1=1, random number 2=2, etc, And 'No of iterations' is 12,
    Output Array 1 should be 1+5+9:
    15 15 15 15
    15 15 15 15
    15 15 15 15
    15 15 15 15
    (Note: Most of your arrays are 4x4, but in Case #2 you created 128x128. I prersume this is a typo?)
    Ans: Kind of, I'm using a 4x4 array of randomly generated numbers as an example but my actual data will be the 128x128 pixel output of a camera. And during actual experimentation, 'No of Iterations' will number in the thousands.
    Second, why do you add your "simulated camera input" to the "Initialized Array"? You can add it direcly to the previous output inside your case structure.
    Ans: See answer to question 3
    Third, have a look at shift registers: http://www.ni.com/gettingstarted/labviewbasics/shiftregisters.htm. Use them instead of Feedback Nodes to make your code tidier.
    Ans: I did try.. But I can't seem to add shift registers to the case structure, only the for loops outside. Are you sure it can be done..?
    jaslyn wrote:
    1) I would like to output only the last 4 sets of data from the Averaged Output 1, 2, 3 and 4 to 4 different files (i.e. save as .csv what is displayed onscreen in indicators 'Averaged Output 1', 2, 3 and 4 at the end of all iterations.
    Where should I place my file save diagram disable so that it does this?
    For the sake of fast camera capture, I would like these 4 files to only output once all the image captures are complete.
    You will need to call "Write to Text File.vi" 4 times to write 4 files. So, you should finish your loop, then call this VI 4 times.
    Ans: How do I get it to extract the data from each of the 4 cases in my case structure?
    jaslyn wrote:
    2) Would preferably like to name the file once and for the programme to append '(1)', '(2)', '(3)' and '(4)' to filename of the appropriate 'Averaged Output' Arrays but file path controls are another big headache for me.
    You can create strings first, then convert them into paths: http://zone.ni.com/reference/en-XX/help/371361G-01/glang/string_to_path/
    Thanks
    jaslyn wrote:
    3) P.s. is initializing one array enough to avoid using Memory Manager? Or should I initialize 4 arrays?
    I'm not sure what you're asking; can you please clarify what you mean by "avoid using Memory Manager"? But anyway, you've actually initialized FIVE arrays: 1 outside the loop, and 1 inside each case.
    I've read that to avoid fluctuations in memory usage, it is a good idea to initialize arrays to their expected size before the start of data collection. That was just what I was trying to do.

  • Stop plots from continuously updating in edit mode

    I have many plots on a graph in the Report section of DIAdem. When I am trying to put lables in for the axes and a title for the plot, every move I make I have to wait like 10 seconds because it re-updates all the plots. Is there a way to stop the plots from continuously updating during the edit phase?

    Hello amaglio,
    I have another indirect suggestion that might help with your questions.
    Starting with DIAdem 2011 we have a new display type that allows you to add points to graphs programmatically, i.e. you will be able to enter the X and Y of a curve you wish to point to and DIAdem will draw an arrow to that point, and move it when you resize an axis system. See example plot below.
    You can join the Beta test for DIAdem 2011 and test this for yourself at http://www.ni.com/beta - you can use my email address (our email addresses are [email protected]) for the NI reference to participate in the Beta test.
    I know that doesn't solve your immediate issue, but it might solve your problem when DIAdem 2011 is released and you will be able to automate the task you are right now doing manually.
    I hope this helps a little.
         Otmar
    Otmar D. Foehner
    Business Development Manager
    DIAdem and Test Data Management
    National Instruments
    Austin, TX - USA
    "For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary."

  • Output signal from an array of excel to servotube

    Hi All,
    I'm doing a test that the input of the test should be an excel files of 2D array (for example, we can have 1000 point sinusoid here). I want to get analog output from this 2D array and send it to a servotube. The problem is how I can send this sinusoid analog output to the servotube. Two files are attached here, the post-filter and sensor test with servotube. The array analog output comes from the post-filter. What I wanna do is to send this analog output to the servotube which shows in the case of Another VI.
    I appreciate everyone's help.
    Thank you very much.
    Best
    Yu
    Attachments:
    Post-Filter Multiple Columns.vi ‏24 KB
    Sensor Test with Servotube_64 bit.vi ‏63 KB

    First, Thanks for your answering. Here is the file I used as a sample. It's the angle and the sine value of angles. 
    Attachments:
    test.txt ‏25 KB

  • Please fix my apple account. I cant update and download from app store. I wrote you before but there is no answer.  For example one message box i got says: Your Apple ID has been disabled.  But the itunes guy says, he cant help me. Who can?

    please fix my apple account. I cant update and download from app store. I wrote you before but there is no answer.
    For example one message box i got says: Your Apple ID has been disabled.
    But the itunes guy says, he cant help me. Who can? I can use my apple acounts, why?

    Try here first >  Apple ID: "This Apple ID has been disabled for security reasons" alert appears
    If you can't resolve the issue on your own, call Apple or schedule a call >   Apple - Support - Solutions
    Keep in mind, this is a user to user forum. You are not communicating directly with Apple here. No one here can fix your Apple iD.

  • Example of passing String Array from java to C using JNI

    hi all
    i searched net for passing string array from java to C but i dont get anything relevent
    i have
    class stu
    int rollno
    string name
    String [] sub
    i want to pass all as String array from java to C and access it C side

    1. Code it as though it were being passed to another method written in java.
    2. Redefine the method implementation to say "native".
    3. Run jnih to generate a C ".h" file. You will see that the string array
    is passed into C as a jobject, which can be cast to a JNI array.
    4. Write the C code to implement the method and meet the interface
    in the generated .h file.

  • Continuously Updating Graph Help

    Relatively new too labview. What I am looking to do is relatively simple. I have an accelerometer that I would like to aquire data from. I want to Log 5 seconds of data at 100hz. When I use a waveform graph it does not update until the entier loops have finished. I can get a live updating graph if i use a waveform chart, but the time scale is set to system time (HH:MMS). I simply want it to start at 0 seconds and go to 5 seconds. The data does not need to be logged on the graph as I will simply be outputting to a file.
    Is there a way to get a continuously updating graph using a waveform graph or is there a way to set up a waveform chart with a time scale that starts at 0 and goes until a defined value (5 seconds) 

    You must use a waveform chart. Not a graph. Goto help in the toolbar, then select Find Examples. Search for chart. 
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Row should be locked before getting an output stream from an attribute

    I have table Worker with photo attribute (its database type is ORDSYS.ORDIMAGE, entity attribute type is OrdImageDomain).
    I use standard display and edit renderer for displaying and changing ord-image attribute.
    If I add new worker and set him photo, everything is OK.
    But if I edit some existing worker and set them photo, while posting to database exception is thrown.
    This problem began some time ago, after made some changes (like upgrade JDev, changing some AM configuration properties, and so on...), but I ca't reproduce right behaviour.
    I use JDeveloper 9.0.3.2, database is Oracle8i Release 8.1.6.0.0, I tried reserved and stateful AM mode both (the same bad result), pesimistic locking.
    Error occures inside Tomcat 4.1.27 and OC4J both.
    Does anybody know any hint about this error...?
    Than you very much
    Jan
    PS. Error message datail:
    oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Update": SQL Statement "JBO-25040: Row should be locked before getting an output stream from an attribute.".
         at oracle.jbo.server.EntityImpl.doDMLWithLOBs(EntityImpl.java:4542)
         at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:4422)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:3544)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2290)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2232)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1527)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:1693)
         at oracle.jbo.html.jsp.datatags.CommitTag.doStartTag(CommitTag.java:45)
    ## Detail 0 ##
    oracle.jbo.JboException: JBO-25040: Row should be locked before getting an output stream from an attribute.
         at oracle.jbo.domain.BaseLobDomain.getOutputStream(BaseLobDomain.java:729)
         at oracle.ord.im.OrdDomainUtil.loadAndSetProperties(OrdDomainUtil.java:656)
         at oracle.ord.im.OrdImageDomain.saveToDatabase(OrdImageDomain.java:2325)
         at oracle.jbo.server.EntityImpl.doDMLWithLOBs(EntityImpl.java:4521)
         at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:4422)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:3544)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2290)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2232)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1527)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:1693)
         at oracle.jbo.html.jsp.datatags.CommitTag.doStartTag(CommitTag.java:45)

    Thanks for replay.
    Yes, I use JDev wizard generated BC4J JSP app (it was generated inside 9.0.2 and then migrated to 9.0.3).
    I changed inside it many things, but I thing no important.
    I have for example copying record to history while editing, but when I disable it, the same problem occures.
    I changed database - 8.1.7 to 9.2.0.2.0, but the same problem.
    Any hint?
    Thanks for any comment.

  • Output Array Binding

    I am looking for an example of output array binding (equivalent to BULK COLLECT). The input sample code is very good, but the documentation talks about output binding as well, but there are no examples.
    If anyone has a short example that shows how to set up the bind variables, I would very much appreciate it.

    Hi,
    From
    http://download-west.oracle.com/docs/cd/B19306_01/win.102/b14307/featOraCommand.htm#BABBDHBB
    <snippet>
    // execute the cmd
    cmd.ExecuteNonQuery();
    //print out the parameter's values
    Console.WriteLine("parameter values after executing the PL/SQL block");
    for (int i = 0; i < 3; i++)
    Console.WriteLine("Param2[{0}] = {1} ", i,
    (cmd.Parameters[1].Value as Array).GetValue(i));
    for (int i = 0; i < 3; i++)
    Console.WriteLine("Param3[{0}] = {1} ", i,
    (cmd.Parameters[2].Value as Array).GetValue(i));
    </snippet>
    Cheers,
    Greg

  • Sending arrays from Excel into Labview

    I want to send an array from Excel VBA into a LabView VI.
    The Excel example shows how to send individual numbers and return an array into Excel but not send an array.
    Everything tried sends blank arrays into LabView, which can then be modified in LabView and returned to Excel.
    A VBA code snippit that does not work is:
    Sub LoadData()
    ' LoadData Macro
    ' Keyboard Shortcut: Ctrl+l
    ' This is an example to demonstrate LabVIEW's Active-X server capabilities.
    ' Executing this macro loads a LabVIEW supplied example VI "Frequency Response.vi",
    ' runs it and plots the result on an Excel Chart.
    Dim lvapp As LabVIEW.Application
    Dim vi As LabVIEW.VirtualInstrument
    Dim paramNames(0)
    Dim paramVals As Variant
    Set lvapp = CreateObject("LabVIEW.Application")
    viPath = lvapp.ApplicationDirectory + "\examples\apps\freqresp.llb\DAK Frequency Response.vi"
    Set vi = lvapp.GetVIReference(viPath)   'Load the vi into memory
    vi.FPWinOpen = True                     'Open front panel
    paramNames(0) = "Foo"
    paramVals = Sheet1.Range("j1:j1000").Value
    Call vi.Call(paramNames, paramVals)
    This code generates an error - expecting 1D array or variants.
    However, if I supply the correct array, then LabView thinks it is empty
    'foo' is a cluster
    'Array' is a double array
    Neither work to receive the data

    Thanks for the reply but that approach will be difficult.  The problem to solve is relatively simple IF LabView could read arrays (it writes arrays easily).  Here is the problem:
    I want to convolute two large arrays.  I have written VBA programs to do this but they take too long - over 30 sec whereas the LabView version take <1 sec IF I could get the data into LabView.
    The convolute is part of an optimization program that goes though many loops so that it takes hours to run efficiently AND if I manually change cells in the spreadsheet, then it takes 30sec to come back as VBA does not respect clean cells (for some reason).
    I was trying to write a function in VBA to do this calculation via LabView rather than VBA.  One way to  do this is to write a text file in VBA and read in LabView, then pass the results back or maybe the clipboard as a buffer.  That is faster but clumsy.  You could also have LabView look for dirty cells and then do the calculation as the server rather than the client.  Again, time consuming and cumbersome.  I have written pure LabView code to do the curve fitting but prefer to use Excel as that is easier to incorporate and work with the data.   You can do convolute using FFTs but Excel does not do that correctly - they CANNOT make their FFTs into a function (VBA functions cannot modify cells in the spreadsheet but only return variables.  FFT modifies cells so cannot be called from a function, only a macro, which then needs to be updated manually).  Again, I can kluge VBA (real kluge this time) to make FFTs work as a function BUT prefer the LabView solution, if possible, as I am not sure the FFT will actually save time.
    I am not sure if the problem is LabView's fault or Excel's (2013) fault that the variables are not set-up properly.  LabView claims to be able to do this.  Again, you can pass single variables into LabView and read back arrays but try as I might, I cannot get arrays into LabView.
    Any help in sending arrays (maybe Labview expects a variant variable and needs to convert it somehow) would be appreciated.  Variants are suppose to be able to be converted automatically but maybe there is a bug in LabView (2010) that does not handle input variant arrays correctly (I have tried making them clusters, double arrays, ect).  LabView thinks that all the arrays sent by VBA are empty. If LabView modifies the same array, VBA sees that modification so that the addresses appear to be sent correctly i.e. the array "handle" is being sent to LabView or else it could not fill the array to send back to VBA.
    If ever this is solved, I will put on-line the solution for others as again marrying both programs will have advantages.  Others may find this interesting is marry LabView with Excel so that LabView does some of the heavy calculations that Excel has kluged. 

  • Calling Oracle 10g Stored Proc with Assoc Array from C# VS 2008

    I have the following PL/SQL procedure:
    CREATE OR REPLACE PROCEDURE HMA_ADM.PRC_VDM_SAVDEL_VEN_DOC
    P_OP IN VARCHAR2,
    P_USRID IN TB_VDM_MANAGE_DOCUMENTS.CREATEDBY%TYPE,
    P_DATE IN VARCHAR2, -- HAS TO BE STRING, ELSE WE GET AN ERROR
    P_DOCNAM IN TB_VDM_MANAGE_DOCUMENTS.DOCUMENT_NAME%TYPE,
    P_DOCLNK IN TB_VDM_MANAGE_DOCUMENTS.DOCUMENTLINK%TYPE,
    P_FNGUID IN TB_VDM_MANAGE_DOCUMENTS.FILENET_GUID%TYPE,
    P_DESC IN TB_VDM_MANAGE_DOCUMENTS.DESCRIPTION%TYPE,
    P_REQID IN VARR
    ) IS
    Where VARR is:
    CREATE OR REPLACE TYPE VARR IS TABLE OF INTEGER;
    In C# I have the following code:
    int64[] intReqID;
    OracleCommand cmdVDL = new OracleCommand(DBQueries.SPQRY_SAVDELVENDOC, connDB);
    cmdVDL.CommandType = CommandType.StoredProcedure;
    cmdVDL.Parameters.Add(new OracleParameter("P_OP", strOP));
    cmdVDL.Parameters.Add(new OracleParameter("P_CREATEBY", strUID));
    cmdVDL.Parameters.Add(new OracleParameter("P_CREATEDATE", strDate));
    cmdVDL.Parameters.Add(new OracleParameter("P_DOCNAM", strDocNam));
    cmdVDL.Parameters.Add(new OracleParameter("P_DOCLNK", strURL));
    cmdVDL.Parameters.Add(new OracleParameter("P_FNGUID", strGUID));
    cmdVDL.Parameters.Add(new OracleParameter("P_DESC", strDesc));
    cmdVDL.Parameters.Add(new OracleParameter("P_REQID", OracleDbType.Int64) {
    CollectionType = OracleCollectionType.PLSQLAssociativeArray,
    Size = intReqID.Count(),
    Value = intReqID,
    DbType = DbType.Int64,
    OracleDbType = OracleDbType.Int64
    OracleParameterStatus[] stat = new OracleParameterStatus[intReqID.Count()];
    for (i = 0; i < intReqID.Count(); i++) {
    stat[i] = OracleParameterStatus.Success;
    cmdVDL.Parameters["P_REQID"].ArrayBindStatus = stat;
    cmdVDL.ExecuteNonQuery();
    When I run this I get the following error:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'PRC_VDM_SAVDEL_VEN_DOC'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    If I remove the Associative Array from both, the procedure runs fine.
    What am I doing wrong?

    Additionally,
    1) UDT support requires 11106.20 or higher ODP (but can be used against 10g db)
    2) if the plsql is changeable, you may want to swap it to associative array instead to avoid having to create custom classes for the UDT, and here's a short sweet example.
    Greg
    CREATE or replace PACKAGE MYPACK3 AS
    TYPE numarray is table of number index by BINARY_INTEGER;
    PROCEDURE getempsinarray(thearray IN numarray, numrecs out number);
    END MYPACK3;
    CREATE or replace PACKAGE BODY MYPACK3 AS
    PROCEDURE getempsinarray(thearray IN numarray, numrecs out number)
    IS
    begin
      numrecs :=  thearray.count;
    END getempsinarray;
    END MYPACK3;
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    public class indexby
         public static void Main()
          OracleConnection con = new OracleConnection("data source=orcl;user id=scott;password=tiger;");
          con.Open();
          OracleCommand cmd = new OracleCommand("mypack3.getempsinarray", con);
          cmd.CommandType = CommandType.StoredProcedure;
          OracleParameter Param1 = cmd.Parameters.Add("param1", OracleDbType.Int32);
          Param1.Direction = ParameterDirection.Input;
          Param1.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
          Param1.Value = new int[3]{7369,7499, 7521};
          Param1.Size = 3;
          OracleParameter Param2 = cmd.Parameters.Add("param2", OracleDbType.Int32, DBNull.Value, ParameterDirection.Output );
         cmd.ExecuteNonQuery();
         Console.WriteLine("{0} records passed in",Param2.Value);               
          con.Close();
    }

  • Returing array from PL/SQL procedure

    Hi,
    I am trying to return array from PL/SQL procedure. Heres is the code. I am getting an error "OracleParameter.ArrayBindSize is invalid ".
    Will anybody let me know what is wrong in following code. or does anybody have code to return PL/SQL array using VB.NET.
    oCommand.CommandText = "MyPack.TestVarchar2"
    oCommand.CommandType = CommandType.StoredProcedure
    Dim id As Integer = 10
    Dim deptname As String()
    Dim oParam1 As Oracle.DataAccess.Client.OracleParameter = New Oracle.DataAccess.Client.OracleParameter("id", Oracle.DataAccess.Client.OracleDbType.Int32)
    Dim oParam2 As Oracle.DataAccess.Client.OracleParameter = New Oracle.DataAccess.Client.OracleParameter("deptname", Oracle.DataAccess.Client.OracleDbType.Varchar2)
    oParam1.Direction = ParameterDirection.Input
    oParam2.Direction = ParameterDirection.Output
    oParam1.CollectionType = Oracle.DataAccess.Client.OracleCollectionType.None
    oParam2.CollectionType = Oracle.DataAccess.Client.OracleCollectionType.PLSQLAssociativeArray
    oParam1.Value = id
    oParam2.Value = ""
    oParam1.Size = 10
    oParam2.Size = 20
    oCommand.Parameters.Add(oParam1)
    oCommand.Parameters.Add(oParam2)
    oCommand.ExecuteNonQuery()
    Thanks
    Sameer

    Thanks Arnold for the reply..
    Yes, I am trying to get result set in array which is unknow to me (No of rows return by the query). For the test I will pre-define the result set so that I will able to set ArrayBindSize.
    I have read C# example but when I try to write it in VB.NET it gives me syntax error when I try to set the ArrayBindSize.
    oParam.ArrayBindSize = new int[3]{15,23,13} // individual max size of 3 outputsWill you please let me know how to set ArrayBindSize (VB.NET) because I am new to this..
    There is an example at otn "How to: Bind an Array to an ODP.NET Database Command" which does multiple INSERTs in one trip to database. This works fine. I need to do same for the SELECT statement which will return me multiple rows. I do not mean refCursor. If I use refCursor, it will make soft parse which I am trying to avoid using this Array techniq.
    Thanks
    Sameer

  • Continuous update of imovie, iphoto, pages, numbers, keynote after installation of Mavericks

    Hi,
    I face on the same issue since the installation of Mavericks.
    I had before the iLife Suite and iWork Suite coming from a DVD purchase.
    Since the installation of Mavericks, the update is available from the App Store.
    But after the update of each application, I was able to start them but few minutes/hours after, I can't launch the application again and the system restart the download of the application ... and this for all applications coming from a previous DVD purchase.
    For example, Aperture which comes from a App Store purcharse has been update one time and works perfectly.
    Have you an idea to solve the issue ?
    Regards

    Same issue here it's using up all my monthly download .
    I movie has installed and is working but the Update continues to download. The store window lower panel shows all the updates installed since updating to Maverick's including iMovie. The top panel offers iMove same version as an update and is downloading in the background.
    How can I clear down this and set a flag to tell the system it is up to date!
    How do I turn off updates until this is resolved I think iMovie is 1.5gb I have already wasted 3gb of my monthly allocation.
    Regards

Maybe you are looking for

  • Printing multiple copies of 3 page BOL in Duplex mode-

    Hi Gurus! I have created a smartform to print the BOL on front side and terms and conditions on back side. I used the duplex mode to print and it works perfectly fine. When I have a BOL with 3 pages of information , it prints the items on the front s

  • Enable shadow copy on failover disk

    Hello!  I have: 1) Failover cluster with 2 hosts on Windows server 2012 r2 2) Role: File Server How i can create\enable shadows copy for cluster disk (File server disk) to another disk? C уважением к Вам, Я

  • Spreadsheet table widget

    Hi Muse testers, This is my first attempt at a mucow widget ... I wanted to provide it in case it was something you might find useful. I'm sure Adobe will be creating a table widget soon, but I have created this as a way to make an editable table pow

  • Cannot unistall creative suite 2

    I have just installed the new cs5 programs, so I would like to get rid of the old cs2 versions that are on my computer. The creative suite 2 was never fully installed due to some errors, but the programs still appear in the adobe folder and they stil

  • How to Know wich action is triggered

    Hi all, I want to know wich button is pushed within the badi BBP_PD_SAVE_BADI (esle in badi BBP_DOC_CHANGE_BADI). I know that i can get the action with the following code::       DATA: lo_transaction_context TYPE REF TO /sapsrm/if_transaction_context