Edge of metering size buffer/table problem (VC ++)

Hello

Accidentally, I posted this in the multifunction DAQ forum so forgive me for posting this again here.

I'm trying to make an edge stamped with PCI-6115 of counting for the application that I'm developing.

Ideally, I initialize a buffer array, then use a sample clock time and acquire the values of a counter which will then be stored in a buffer.  After a number of samples, I would then use the DAQmxReadCounterU32 function to extract this data and perform calculations.

However, windows gives me an error when I try to initialize the size of the stamp of table is larger than 255001, I need 264000 +.

Essentially, it seems that only this part of the code to execute:

error int = 0;

TaskHandle taskHandle = 0;

TaskHandle taskHandleCtr = 0;

given uInt32 [260000];

After trying initialize the array of uInt32 my program crashes saying there was an error with my exe with a popup asking me if I want to send an error report to Microsoft.

That would be a problem of windows not afford to allocated more 255000 32bits samples for this table?  If so how can I put the table on the memory embedded amount?

Sorry guys, it actually had nothing to do with the DAQ card.

He was apparently C++ that limits the size of the array that I called him, which was the traditional "int a [size]".

I used this rather to solve my problem:

int * a = NULL;
a = new int [10000000];

Problem solved.

Sorry for posting in the wrong forum and thanks to all who read this.

Howard

Tags: NI Software

Similar Questions

  • Reg: size (conceptual) table-

    Hi Experts,

    I have a conceptual doubt about the size of a table.

    Tell - we got 500 k. I can store them in a table unique (say "table_x") containing all the lines.

    Is another way they can be stored in 5 tables (say 'table_x1', 'table_x2'... "table_x5") each holding 100 k records.

    So, which of the above data-storage-strategies will consume more space?

    My understanding is that-

    While creating a table, on a bigger picture, he uses segments. Say the segment size = 32K

    Table_x guess that consumes - 25K

    So, in this segment, left out space = (32-25) = 7K

    In the other approach, assume that each table takes 5K and due to some reasons the other (32-5 = 27 K) space remains unused.

    AFAIK, size of tables is calculated by the SUM of the areas of segment. Right?

    Please advise, correct if I am wrong anywhere.

    Thank you and best regards,

    -Nordine

    (on Oracle 11.2.0.3.0)

    Well, the problem is that you think that table is like the pizza box and lines are the pieces of pizza in the box when in fact it is the only pizza that you have in the database and there is no container for it. If you divide 100 GB of space in one go using a single segment or 10 segments of 10 GB each, you always set 100 GB of space only. There is nothing which contain these 10 pieces in itself which could devote additional space compared to the creation of a single segment of 100 GB. The example is not correct. It won't happen will be assigned to you a 100 GB space at once. Oracle allocates extents for this purpose only that you won't be wasting space. Your given scenario would occur when you have a segment or segments N created to allocate the necessary space and now might be to delete the data. It would create the space that would be unused but which would also be taken in charge by the LMT.

    Aman...

  • Exact size a table takes

    Hello

    Can someone show me how to get the EXACT size a table currently occupies.


    Thank you.

    Heres something I've implemented for a client recently who wanted the object sizes, it breaks down the by object type (tables, indexes, lobtables, lobindexes) and see the percentage against total db size used in the segments... throw a table_name in if you want to limit the search... to remove the commentary on the inscription 'account' below to exclude all smaller then 50 MB

    as noted above, the blocks are different, but its close enough. could get some use out of it.

    define 999 pages
    fixed lines 180
    SELECT
    owner, table_name, round ((sum (bytes) / 1024/1024/1024), 4) Size_GB,.
    round (TRUNC (sum (bytes) / 1024/1024) / total_size_meg * 100, 2) Percentage_of_total_size.
    total_size_meg
    Of
    (SELECT table_name, nom_segment, owner, bytes)
    FROM dba_segments
    WHERE segment_type = 'TABLE '.
    UNION ALL
    SELECT i.table_name, i.owner, s.bytes
    OF dba_indexes i, s dba_segments
    WHERE s.segment_name = i.index_name
    AND s.owner = i.owner
    AND s.segment_type = 'INDEX '.
    UNION ALL
    SELECT l.table_name, l.owner, s.bytes
    OF dba_lobs l, s dba_segments
    WHERE s.segment_name = l.segment_name
    AND s.owner = l.owner
    AND s.segment_type = 'LOBSEGMENT. '
    UNION ALL
    SELECT l.table_name, l.owner, s.bytes
    OF dba_lobs l, s dba_segments
    WHERE s.segment_name = l.index_name
    AND s.owner = l.owner
    AND s.segment_type is 'LOBINDEX'),
    (select sum(bytes/1024/1024) total_size_meg from v$ datafile)
    WHERE
    -table_name like '%%'
    owner not in ('SYS', 'SYSTEM')
    GROUP BY table_name, owner, total_size_meg
    HAVING SUM (bytes) / 1024/1024 > 50 / * Ignore really small tables currently commented out * /.
    ORDER BY OWNER, SUM (bytes) desc

  • Changing aid necessary table problem

    Hello. I hope someone can help me with this problem.

    I have two tables, an and mv. Create the following script:

    create table (mv)
    the moduleId Char (2) CONSTRAINT ck_moduleId CHECK (moduleId in ("M1", "M2", "M3", "M4', 'M5', 'M6', 'M7', 'M8'")).
    credit ck_credits Number (2) CONSTRAINT CHECK (credits (10, 20, 40));
    constraint pk_mv primary key (moduleId)
    );

    create table (its)
    stuId Char (2) CONSTRAINT ck_stuId CHECK (stuId ('S1', 'S2', 'S3', 'S4', 'S5')),
    moduleId tank (2),
    primary key constraint (stuId, moduleId) pk_sa,
    constraint fk_moduleid foreign key (moduleId) references (moduleId) mv
    );

    And the scripts below is to insert data into the two:

    insert into VALUES mv ("M1", 20)
    /
    insert into VALUES mv ("M2", 20)
    /
    insert into VALUES mv ("M3", 20)
    /
    insert into VALUES mv ("M4", 20)
    /
    Insert in mv VALUES ('M5', 40)
    /
    insert into VALUES mv ("M6", 10)
    /
    insert into VALUES mv ("M7", 10)
    /
    Insert in mv VALUES ('M8', 20)
    /


    insert into a VALUES ('S1', 'M1')
    /
    insert into a VALUES ('S1', 'M2')
    /
    insert into a VALUES ('S1', 'M3')
    /
    insert into a VALUES ('S2', 'M2')
    /
    insert into a VALUES ('S2', 'M4')
    /
    insert into a VALUES ('S2', 'M5')
    /
    insert into a VALUES ('S3', 'M1')
    /
    insert into a VALUES ('S3', 'M6')
    /

    Now for the real problems.

    First of all, I need to try to overcome the problem of table mutation ensure that stuid = S1 in table its can not take the two moduleId M5 and M6.

    Just one or the other. I created a single trigger, but runs aground because of the changing table problem.

    The second problem that I need to overcome is that none of the stuids can have the ModuleID where total value of more than 120 credit credits. Credit value is stored in the table of mv.

    Thank you very much in advance for any help.

    Use a statement-level trigger:

    First of all, I need to try to overcome the problem of table mutation ensure that stuid = S1 in table its can not take the two moduleId M5 and M6.

    SQL> create or replace trigger sa_trg
      2  after insert or update on sa
      3  declare
      4  c number;
      5  begin
      6    select count(distinct moduleId) into c
      7    from sa
      8    where stuid = 'S1'
      9    and moduleId in ('M5','M6');
     10    if c > 1 then
     11       raise_application_error(-20001,'S1 on both M5 and M6!!');
     12    end if;
     13  end;
     14  /
    
    Trigger created.
    
    SQL> select * from sa;
    
    ST MO
    -- --
    S1 M1
    S1 M2
    S1 M3
    S2 M2
    S2 M4
    S2 M5
    S3 M1
    S3 M6
    
    8 rows selected.
    
    SQL> insert into sa values ('S1','M5');
    
    1 row created.
    
    SQL> insert into sa values ('S1','M6');
    insert into sa values ('S1','M6')
    *
    ERROR at line 1:
    ORA-20001: S1 on both M5 and M6!!
    ORA-06512: at "SCOTT.SA_TRG", line 9
    ORA-04088: error during execution of trigger 'SCOTT.SA_TRG'
    

    The second problem that I need to overcome is that none of the stuids can have the ModuleID where total value of more than 120 credit credits. Credit value is stored in the table of mv

    SQL> create or replace trigger sa_trg
      2  after insert or update on sa
      3  declare
      4  c number;
      5  begin
      6    select count(distinct moduleId) into c
      7    from sa
      8    where stuid = 'S1'
      9    and moduleId in ('M5','M6');
     10    if c > 1 then
     11       raise_application_error(-20001,'S1 on both M5 and M6!!');
     12    end if;
     13
     14    select count(*) into c from (
     15    select stuid
     16    from mv, sa
     17    where sa.moduleid=mv.moduleid
     18    group by stuid
     19    having sum(credits)>120);
     20
     21    if c > 0 then
     22       raise_application_error(-20002,'A student cannot have more than 120 credits!!');
     23    end if;
     24
     25  end;
     26  /
    
    Trigger created.
    
    SQL>   select stuid, sum(credits)
      2  from mv, sa
      3  where sa.moduleid=mv.moduleid
      4  group by stuid;
    
    ST SUM(CREDITS)
    -- ------------
    S3           30
    S2           80
    S1          100
    
    SQL> insert into sa
      2  values ('S1','M4');
    
    1 row created.
    
    SQL>   select stuid, sum(credits)
      2  from mv, sa
      3  where sa.moduleid=mv.moduleid
      4  group by stuid;
    
    ST SUM(CREDITS)
    -- ------------
    S3           30
    S2           80
    S1          120
    
    SQL> insert into sa
      2  values ('S1','M7');
    insert into sa
    *
    ERROR at line 1:
    ORA-20002: A student cannot have more than 120 credits!!
    ORA-06512: at "SCOTT.SA_TRG", line 20
    ORA-04088: error during execution of trigger 'SCOTT.SA_TRG'
    

    Max
    http://oracleitalia.WordPress.com

  • Size of table

    For example, I have 3 table 1 d with different size.  I combined the and turn them into a 2d array.  When I index more short table 1 d of origin out of the aray 2d, the size is now equal to the rest of the original 1 d arrays.  Is there an easy way to preserve the dimension?  I don't want padding.  Thank you.

    Why is it hard? Simply insert a feature bundle height = 1 century before autoindexing on the edge of the loop on the right.

  • Generate several plots according to the size of table

    Hi all

    I'm relatively new to LabView and I read several threads that are similar to my problem, but I don't know how to implement it yet.  Basically I have a large table that stores the raw data read from multiple text files.  This large painting size would vary based on the number of text files generated by a data acquisition system.  I would like to draw each line of the table a new field.  Instead of manually wiring, is there an easier way around?

    Thank you

    Lynniz

    Lynniz,

    If you need a separate chart for each parcel then can determine you at least in advance what the maximum number of locations could be and show/hide your graphics programmatically based on data. All the graphs could be in a Subvi that appears separate from your main application window, or you could use a secondary.

    I'm just brainstorming here. There could be a more elegant way to do it, but the graphic masking that already exist is the only thing I can think of right now.

    Eric

  • simple table problem

    I have read some data from a text file and form a table according to my requirement (the illustrious photo attached).

    What my problem was when I used this table in an other vi through the connector components, all the lines in the resulting table the width of the line of maximum size, and are filled with zeros.

    How do I remove it? I need the lines ending with its own values, here in my case two first rows should have 5 items in the table, the elements of line 7 third and so on...

    Your VI makes no sense. Why not autoidenxing? Why "delete from table?

    Here's a simple possibility (just to write the resulting string in a file).

  • Dynamically adjust the size of table control panel

    Hello

    I have a combo box control that I drag within a table.

    Since my request depends on the size of the initialized array, I'm having a problem with the car, adjust the number of items to display on the control panel.

    Say for example, I wanted to have 4 zones of drop-down list on my table, I drag the table to show the 4 combo boxes.

    The problem is that if I wanted to change this moment of execution at 2 or 6 elements, it still shows 4 items in the control.

    Is there a way to adjust based on the number of items?

    I found it... must be a day tired... Since the solution is too simple

  • Format mask for the size of table cells

    Hi all

    I'm working on a catalog with a lot of products, and each product has a table for its specifications.

    The catalogue is ready for printing, but now the customer asks me to enlarge certain parts of the text in the table.

    This means that I have to give some cells more space. The cells have different sizes, and that's the problem:

    Is there a way to define the new cell widths and heights as a sort of "master format" so that I can change the tables
    for the design of new without marking of each column and adjusting by hand?

    Unfortunately, the layout is too complex to have tables on a master page, as they are not on a particular coordinate

    throughout the catalog.

    I hope I described my problem quite clearly I'm no native speaker

    I thank very you much in advance!

    Max

    The script linked in the post one of this thread will allow you to adjust automatically to match - table column widths it allows to save the widths of a table in the style of the table and then apply them to other tables of this style.  I don't know about heights, but if all the heights will be the same within a given table, you can select all the lines and enter the exact height of the cell.

    Re: width of column in the specs of the cell

  • Edge of metering using nicaiu.dll

    I am trying to create a counter edge by directly calling functions in VB.NET nicaiu.dll. I am able to read the counter OK value but counties still return to the initial value set when I created the channel. For example, I create the task of counter by using DAQmxCreateCICountEdgesChan and the value of the initial counter 100000. I then read the meter using DAQmxReadCounterScalarU32. The County changes when I turn the encoder cable channel meter but returns to 100000 once the encoder stops.

    The wiring is correct, because it works correctly using the Test i/o counter OR-max Panel. The number increases as I turn the encoder and never resets when the encoder stops.

    Finally, I need to get this working using DAQmxCreateCILinEncoderChan but I see the same behavior when using this type of channel. For now, I use DAQmxCreateCICountEdgesChan because it is easier and mimics the function in the Test NOR-MAX Panel.

    I did this job using the .NET DAQmx API. However, there are errors when my application runs on a computer with a different version of NOR-DAQmx of what was used when the application is compiled. The appeal of the DLL directly seems to eliminate problems with different versions of DAQmx.

    No idea what I'm missing?

    Public Class Form1

    Private Declare Function DAQmxCreateTask Lib "nicaiu.dll" (ByVal TaskName As String, ByRef NITaskHandle As IntPtr) As Integer
    Private Declare Function DAQmxCreateCICountEdgesChan Lib "nicaiu.dll" (ByVal TaskHandle As Integer, ByVal PhysicalChannel As String, ByVal NameToAssignToChannel As String, ByVal edge As Integer, ByVal InitialCount As UInteger, ByVal CountDirection As Integer) As Integer
    Private Declare Function DAQmxReadCounterScalarU32 Lib "nicaiu.dll" (ByVal TaskHandle As Integer, ByVal Timeout As Double, ByRef ReadVal As UInteger, ByVal Reserved As IntPtr) As Integer

    Private Const DAQmx_Val_Rising = 10280
    Private Const DAQmx_Val_Falling = 10171

    Private Const DAQmx_Val_CountUp = 10128
    Private Const DAQmx_Val_CountDown = 10124
    Private Const DAQmx_Val_ExtControlled = 10326

    Private TaskHandle As IntPtr

    Private Const STARTCOUNT = 100000
    Private Const DEVICECHAN = ' DEV1/CTR0.

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    Dim ErrVal As Integer

    ErrVal = DAQmxCreateTask ("ENCODER", TaskHandle)
    Debug.WriteLineIf (ErrVal <> 0, "Error" & ErrVal.ToString)

    ErrVal = DAQmxCreateCICountEdgesChan (TaskHandle, DEVICECHAN, "ENCODER", DAQmx_Val_Rising, STARTCOUNT, DAQmx_Val_CountUp)
    Debug.WriteLineIf (ErrVal <> 0, "Error" & ErrVal.ToString)

    End Sub

    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick

    Dim ErrVal As Integer
    InVal As UInteger Dim

    ErrVal = DAQmxReadCounterScalarU32 (TaskHandle, 0, InVal, Nothing)
    Debug.WriteLineIf (ErrVal <> 0, "Error" & ErrVal.ToString)

    Label1.text = InVal.ToString

    End Sub

    End Class

    Try to explicitly run your task (DAQmxStartTask) after you have created the channel meter.  If you do not explicitly start your task, the appeal of reading starts the job instead, which would reset the count value.

    As far as I know if only this should once (on the first read call), then maybe it something else.

    Out of curiosity, have you considered using the API of VB.NET DAQmx instead of the dll unmanaged c?

    Best regards

  • Limit the size of tables in excel

    Hi everyone, I'm trying to export a table to excel and I am having trouble.

    First of all, I used 'Write to worksheet File.vi' to create a file .xls and has perfectly worked, but now I need to export a table to another sheet of the same xls file (whose name we should be able to choose), so I started to use ActiveX controls.

    I can create the new worksheet with the desired name and write the data into it, but the problem is that it does not show my table only, but also ALL the cells (65536 x VI) with the value # n/a.

    I can solve the problem in one of the dimensions, but not in both entities. This is the first time I use the ActiveX functions (I built this VI with the help of other examples I found in the forum), so I think I'm missing something important.

    What can I do to not show THAT my table?

    Thank you very much for your time and knowledge.

    In addition, you close twice the _Workbook reference, thus generating an error. Here's how to do it. The neck line to Format.vi beach is drawn from here.

    Ben64

  • manipulation of the table problem

    I'm using Labview 2009 and I have a problem with windows... I have to implement the following code in Labview (X and digital input boards):

    for (i = 0 to MAX (X)) {}

    If (X [i] > (X [i-1] + 1)) {}

    X.Add (X [i], X [i-1] + 1) / / add the value X [i-1] + 1 x [i] position of the X table

    Y [i] = 0

    }

    on the other

    Y [i] = Y [i]

    }

    If I try to add items in the original array Y with the function 'Replace subset of table', the output array is not changed by the VI. If I try to initialize and to build a new table, I get a matrix of zeros. Can someone help me?

    If you want to just add 0 to the index that does not exist in X [] then try this.

  • Size of array problem in Windows 7

    Hi all

    I have a VI through the opening in a new laptop, it shows a few tables inadequate controls (with a table diferent size), however I can´t put it right.

    But when I'm doing an EXE of this VI and if I run the EXE in another computer, the façade seems aligned and Ok.

    I m using the labview 2009 Sp1 with Windows 7, this vi have been created in another laptop in an older version and always with the Windows Xp, and every time that I updated the version of labview always seems correct on the laptop, until now when I changed the laptop computer and the operating system to Win7.

    Any help/advice is much apreciated

    Thank you

    Make sure that you use the same font settings for all the controls you want to align. You might have some controls set a specific font name and others left the police to default Application. LabVIEW replaces the police request regardless of the default font of the system is on a particular computer.

    Different fonts are by default and available on different versions of Windows then you can definitely get in trouble here if you mix families of fonts and the names in the same user interface.

    If you request a specific font name and it is not available on some Windows machine will be replaced by another policy that he thinks looks like but the heuristics of this substitution can sometimes go really South of the Ecuador and just give the crazy results.

  • MS Office report Express VI and table problem

    Hi all

    I have a strange problem with MS Office report VI, which is included with the report generation tool. I created an Excel template that I linked, according to the preference "Custom template for Excel" and all the named ranges. However, two of the named ranges that I entered are 1 d arrays of doubles. Now the problem:

    When I entered the berries to their specific name range (it's only 6 values), instead of simply enter the values in the table in the cells he entries like this:

    A value of 0

    1 value

    2 the value

    ...

    6 value

    He pushes the 'value' to the column next to the beach of name because of 0-6.

    He does it with two tables so it screws to the top of all formulas. Anyone know how to remove the 0-6 and simply enter the values?

    Thank you all

    The Express VI are easy and convenient, but some costs. Since the Express VI can also accept a waveform entry, you have to accept that it will add a channel name.

    With the tool report generation (who are also its limits), it's easy to add only the data you want:

    Ben64

  • Reset do default sets a size of table to zero?

    What is the function reset 2D game table size to default to zero? Aid is not explicit on this.

    Otherwise, what is the best way to set a table 2D zero size?

    The "it takes less time to try just to post a message asking if it is": the answer is Yes. But only if the default value is an empty array to start. Obviously.

    Otherwise, what is the best way to set a table 2D zero size?

    Wire a constant empty array to your choice of a local variable or a node of 'Value' property, in view of the elimination of any potential race condition.

Maybe you are looking for