Table of double filled by DLL contains odd values

Hello everyone

I'm working on a DLL call which must resize and fill in an array of double named "values" (2nd to the last parameter). I defined the signature as follows:

_declspec (dllexport) uint8_t readDoubleArray(uint8_t handle, LStrHandle lPath, int64_t startTime,        int64_t endTime, DblArrHdl *values, LongArrHdl *timebase);

Where is DblArrHdl

   typedef struct {      int32_t dimSize;      double doubles[1];        } DblArr; typedef DblArr **DblArrHdl;

In the call, I read copies of a database and resize the table double as follows:

     int size = doubleArray.size();

      if (NumericArrayResize(0x0A, 1, (UHandle*)values, size) != noErr) {           setLastError(MG_ERR_LABVIEW_ERROR, "Failed to allocate memory");          return FALSE;     }

I set the size and copy the values:

(**values)->dimSize = size;for (int i = 0; i < size; i++) { (**values)->doubles[i] = doubleArray[i];}

When I use the DbgPrintF to validate values, it gives me a value of about 120000 is correct. However, when returned by labview table contains strange data, such as 5.38564E - 315. Here's impression on the array of 'values' once he was through the DLL:

Here's how I wired it, ignore the grouping, it occurs in the array of values that comes out of the call to the DLL.

I have no idea how this can be. I followed the examples on the site. I also tried the normal DSSetHandleSize, but it changed nothing. No idea what I was wrong?

Thanks in advance,

Vincent

Hi again,

Vincent, you have a problem with the alignment. Simply add #pragma pack (1) before the table:

#pragma pack (1)
typedef struct {}
dimSize of Int32;
float64 elt [1];
} TD2.
typedef TD2 * TD2Hdl;

and everything should be OK.

See the example as an attachment.

Andrey.

Tags: NI Software

Similar Questions

  • How can I build a dll containing that a callback function, the callback function is used in CVI.

    Hello

    Case is that LABVIEW receive external data and produce an interrupt, then sends the data to the CVI.

    Can I generate a dll containing a callback function, use the callback function in CVI. Or there is a better way?

    Thank you


  • WLC 2106 routing table do not fill

    Hey guys, I hope you can help with this one.

    I just tried to set up a WLC 2106 and everything seems OK however the routing table is not filled (even directly connected and default route). Currently, I have it plugged into a switch and an AP and they are all two visible in ARP and CDP, but I only ping is peripheral.

    (Cisco Controller) > show the summary

    Number of roads... 0

    Destination Netmask Gateway network

    -------------------    -------------------   -------------------

    (Cisco Controller) > show cdp neighbors detail

    -------------------------

    Device ID:-swt00.asggroup.com.au

    Enter address (s): 10.33.17.62

    Platform: cisco WS-C3750G-48TS, capacity: Switch IGMP router

    Interface: Fastethernet0/0/1, ID of Port (outgoing port): GigabitEthernet1/0/48

    Hold time: 174 s

    Version:

    Cisco IOS software, software C3750 (C3750-IPSERVICESK9-M), Version 12.2 SEE2 (25), RELEASE SOFTWARE (fc1) Copyright (c) 1986-2006 by Cisco Systems, Inc., Compiled Saturday 28 July 06 12:55 by yenanh

    version of the proclamation: 1

    -------------------------

    Device ID: AP1cdf.0f95.732c

    Enter address (s): 10.33.17.10

    Platform: cisco AIR-LAP1142N-N-K9, capacity: Trans-pont

    Interface: Fastethernet0/0/7, ID of Port (outgoing port): GigabitEthernet0

    Hold time: 155 s

    Version:

    Cisco IOS software, C1140 Software (C1140-K9W8-M), Version 12.4 (21 a) JHB1 - VERSION of the SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2010 by Cisco Systems, Inc., Compiled Thursday, Aug 11, 10 at 15:45 by prod_rel_team

    -Other - or ITU (q)

    version of the proclamation: 1

    Configuration of the interface

    Name of the interface... ap-Manager

    MAC address... 58.8 d: 09:93:f1:c0

    IP Address....................................... 10.33.17.2

    IP Netmask....................................... 255.255.255.192

    IP Gateway....................................... 10.33.17.62

    State IP NAT outside... People with disabilities

    External IP NAT... 0.0.0.0

    VLAN............................................. 17

    Port of physics... 1

    Primary DHCP server... 10.33.17.1

    Secondary DHCP server... Not configured

    Option DHCP 82... People with disabilities

    ACL.............................................. Not configured

    AP Manager....................................... Yes

    Comments interface... NO.

    ... Management interface

    MAC address... 58.8 d: 09:93:f1:c0

    IP Address....................................... 10.33.17.1

    IP Netmask....................................... 255.255.255.192

    IP Gateway....................................... 10.33.17.62

    State IP NAT outside... People with disabilities

    External IP NAT... 0.0.0.0

    VLAN............................................. 17

    Quarantine-vlan... 0

    Port of physics... 1

    Primary DHCP server... 10.33.17.1

    Secondary DHCP server... Not configured

    Option DHCP 82... People with disabilities

    ACL.............................................. Not configured

    AP Manager....................................... NO.

    Comments interface... NO.

    Any help would be greatly appreciated
    Mark

    Hello

    Removes the brand management and interface of the AP on the WLC Manager and put the management and the Manager of the Ap in the vlan Switchports native...

    example of...

    the command is...

    WLC > config interface management vlan 0

    WLC > config interface vlan ap-Manager 0

    On the switch...

    switchport mode trunk

    switchport trunk dot1q encap

    switchport trunk vlan native 17

    end

    I assumed the management and Manager of the AP are in vlan 17. make the corresponding changes if not 17.

    Let me know if we can t oping after making the above changes...

    Let me know if that answers your question...

    Concerning
    Surendra
    ====
    Please do not forget to note positions that answered your question and mark as answer or was useful

  • Would like to know which table in the repository contains the value of the operating system

    Hello

    I would like to know which table in the repository contains the value of "Owner operating system".

    Any ideas.

    Thank you
    Paul

    The following query should help you:

    SELECT t.target_name agent_name, cm.string_value mgmt_targets Os_User t, mgmt_metrics m.
    cm mgmt_current_metrics WHERE t.target_type = 'oracle_emd. '
    AND m.target_type = 'oracle_emd' AND t.target_guid = cm.target_guid AND cm.metric_guid = m.metric_guid
    AND m.metric_name = 'EMDIdentity' AND m.metric_column = 'username' AND m.type_meta_ver = t.type_meta_ver;

    Best regards
    Vincent

  • Discover the lines of odd values

    Oracle 11.2.0.1

    Windows

    create table marks)

    number of rollno,

    Number of the object,

    Mark VARCHAR2 (3)

    )

    /

    insert into values of brands (1,1,40);

    insert into values of brands (1,2,35);

    insert into values of brands (1,3,35);

    insert into values of brands (1,4,38);

    insert into values of brands (2,1,10);

    insert into values of marks (2.2, "AB");

    insert into values of brands (2,3,50);

    insert into values of brands (2,4,50);

    insert into values of brands (3,1,55);

    insert into values of brands (3,2,50);

    insert into values of brands (3,3,44);

    insert into values of brands (3,4,4);

    insert into values of brands (4,1,78);

    insert into values of brands (4,2,45);

    insert into values of brands (4,3,84);

    insert into values of marks (4.4, "AB");

    insert into values of marks (5.1, "AB");

    insert into values of marks (5.2, "AB");

    insert into values of brands (5,3,50);

    insert into values of brands (5,4,10);

    > select * from brands;

    ROLLNO TOPIC MAR

    ---------- ---------- ---

    1 1 40

    1 2 35

    1 3 35

    1 4 38

    2-1-10

    2 2 AB

    2 3 50

    2 4 50

    3 1 55

    3 2 50

    44 3 3

    ROLLNO TOPIC MAR

    ---------- ---------- ---

    3 4 4

    4 1 78

    4 2 45

    4 3 84

    4 4 AB

    5 1 AB

    5 2 AB

    5 3 50

    5-4-10

    20 selected lines.

    Power required:

    ROLLNO TOPIC MAR

    ---------- ---------- ---

    2 2 AB

    3 4 4

    4 4 AB

    Business rule:

    We need to identify these roll numbers that are:

    1 AB brands in a single subject.  If the student is AB (Absent) in more than one subject then it is unnecessary.

    2. If there is high marks then also these lines flucuation, as in example above, topic 3 4 roll number, there are only 4 points, while he had good grades in other subjects.

    3. we need extract the lines which the corresponding brand values have values of very high/low i.e. assume a number of specific role is there which have markings about 20-30 but in a subject, he got in circulation 80-90, even as there are a number of role, one subject, he got 10-20 While in the other topic, he got 70-80.

    So I do not know how to identify these rows.  Table have about 15000000 rows.

    Even I don't know what is the technical name for this problem, otherwise I would have to search the forum.

    Is not a student or a home project, is our real time requirement, because usually, when I see something like student, roll number, brand etc. in question, it is considered as project for students.

    Kindly help me.

    Thank you.

    user12050217 wrote:

    Thank you very much for your answer.  As always, it is really useful.

    > Maybe if you mean no more than '1' which would then be ok.

    Yes Sir, that's correct.  We are the lines where the student is absent from more than one topic.

    > You have Roll No. 3 with no AB at all, still rule 1. States 'AB marks in 1.

    Roll No. 3 is necessary output because it has 4 brands in the 4th topic while he got good grades in other subjects.  So that's the big difference with other brands of subject.

    > That means 'large fluctuation '?  There is no logical function for 'high fluctuation.  It must be clearly defined.

    Thank you so much for asking the question.  Fluctuation really means, if there is any subject whose marks are not in the range with another topic then this line is to have high/low difference.  For example in the other topic there are 30,35,40 brands exist but in 4th or any other he got say 3 or 5 or 0, then it is the line that have 'strong fluctuation' it please.

    I think it must be a column in the table that will contain a value from 0 to 9 for lines that have fluctuations.  Then it will be probably easier to select higher values of fluctuation; something like:

    Select * brand where fluctuations = 9; means here are the first few lines required, these lines have a difference higher for a topic to other brands of subject.

    Once again thank you Mr President.

    You have not yet responded to what 'large fluctuation' is.

    Computers do not work on subjectivity, they work on fixed logic.  Tell me that a student who scored 5 in a subject and 20 and 30 on two other subjects has strong fluctuation, but another person may say: "well, the marking is on 500, so 5, 20 and 30 are all a note very low and not really important fluctuation."  That is why we must be clear, what you mean by 'high fluctuation'.  As in my example, I specified it as the ratio between the minimum and maximum marks in less than 20%, but you have to tell us what the actual logic is desired; not a fluffy subjective idea.

    What are the changes from 0 to 9?

    Requirements must be clear in the calculation, not the ambiguous words.

    How about something based on average scores?

    SQL > ed
    A written file afiedt.buf

    1 Select rollno, subject, brands
    2, min_mark, max_mark, round (avg_mark) as avg_mark
    3, case when brands! = "AB" then round(marks/avg_mark,2) 0 otherwise fine as mark_ratio
    4 of)
    5. Select rollno
    6, subject
    7, brands
    8, sum (case when brands = 'AB', then 1 else 0 end) on (rollno partition) as sum_AB
    9, min (case when brands! = 'AB', then other brands trailing null) on (rollno partition) as min_mark
    10, max (case when brands! = 'AB', then other brands trailing null) on (rollno partition) as max_mark
    11, avg (case when brands! = 'AB', then other brands trailing null) on (rollno partition) as avg_mark
    brands m 12
    13       )
    where the 14 sum_AB<=>
    15 * and min_mark/max_mark< 0.8="" --="" 20%+="" difference="" between="" min="" and="" max="">
    SQL > /.
    SUBJECT OF ROLLNO MAR MIN MAX AVG_MARK MARK_RATIO
    ---------- ---------- --- --- --- ---------- ----------
    2 1 10 10 50 37.27
    2 2 10 50 37 AB 0
    2 3 50 10 50 37 1.36


    2 4 50 10 50 37 1.36
    3 1 55 4 55 38 1.44
    3 2 50 4 55 38 1.31
    3          4 4   4   55          38         .1
    3 3 44 4 55 38 1.15
    4 1 78 45 84 69 1.13
    4 2 45 45 84 69.65
    4 3 84 45 84 69 1.22
    4 4 45 84 69 AB 0

    12 selected lines.

    If this isn't what you want, then you need to explain why, clearly and concisely, giving the reasons and logic.

  • How can I fill the records using the value LOV

    Create a form based on the use of the following output Table EMP

    Create a database block IE control-> Dept No. block


    Create a database block - EMP
    Create a LOV to the Dept not according to the dept table.
    For the current No. Dept. Complete records of the employees

    How can I fill the records using the value LOV?


    Thank you

    Hello

    Create trigger KEY-LISTVAL for control_block.dept_no with code similar to the following:

    IF SHOW_LOV ('LOV_NAME') THEN
            SET_BLOCK_PROPERTY ('EMP_BLOCK', DEFAULT_WHERE, 'DEPT_NO = ' || :CONTROL_BLOCK.DEPT_NO);
         GO_BLOCK ('EMP_BLOCK');
         EXECUTE_QUERY;
    END IF;
    

    Hope this helps

    Best regards

    Arif Khadas

  • Field containing desired values display

    Hi all
    I find the field where this field contains the value I want to search.
    For example, I want to show all fields containing the value "book".
    These fields belong not only to the tables, but also to all oracle database like view objects, etc.
    After the field/fields displayed, is it possible to know which table to which belongs the field/fields that were shown up to?

    Is there any query to handle this?
    If so, I need.
    Any help would be appreciated.

    Before THX

    cycon wrote:
    I want to find the name of the column based on the content of the column

    Looks like at Re: how to search in all rows and all columns? should do.

    Please try to give the search function of the site a go, you never know what you can find :)

  • I have a table with a city of the column. Values are 'delhi' and 'hyderabad '.

    I have a table with a city of the column. Values are 'delhi' and 'hyderabad '.

    as

    ID |   City

    ---------------------------

    1     |  Delhi

    ----------------------------

    2     |  Hyderabad

    Now, I have to update Delhi and Hyderabad Hyderabad with Delhi.

    How to do this?

    Hi Indi,

    (1) why do you want what it? Requirements of companies?

    (2) how much these values you want to reverse? Is it only "Delhi" and "Hyderabad", or there is a list, or other logic?

    Update your_table

    Set city = decode (lower (city), 'delhi', 'Hyderabad', 'hyderabad', 'Delhi')

    where lower (city) ('Delhi', 'hyderabad');

    Does that help?

  • How filter you to "Contact field contains a value ANY?

    Hi - Maybe this is a stupid question, but...

    I am trying to set up a filter in E10 that will check if a specific Contact field simply has a value, but make me a bit stuck. E9, I used to set up like this: Contact field XX contains =? *

    However, I'm trying to implement this filter criteria in a segment of the E10 and it doesn't seem to work. So far I have tried:

    Contact XX field contains '? "*" = 0 contacts

    Contact XX field contains "?" = 0 contacts

    Contact XX field contains "*" = 0 contacts

    Contact XX field contains"" = all contacts in my database, no matter if there is a Contact field value or not

    So my question is, what is the best way to set up a filter to include all contacts where a specific Contact field contains a value, as long as it is not a Virgin?

    Appreciate the help!

    Hi Erika,

    You can do this by using the 'model matches wildcard' filter criteria in Eloqua10.  The "matches wildcard pattern' is similar to 'exactly', but he recognizes the * and? wildcard characters.  If your filter criteria would look like:

    Contact area XX matches wildcard pattern '? * »

  • Addition of constraint not Null to a column that contains null values

    All,

    Could you please suggest me how to add the constraint not null to an existing column that has null values?

    SQL > create table nn (number n, s varchar2 (10));

    Table created.

    SQL > insert into nn values (1, 'test');

    1 line of creation.

    SQL > insert into values nn (2 '');

    1 line of creation.

    SQL > commit;

    Validation complete.

    SQL > alter table nn edit n number not null;

    Modified table.

    SQL > nn desc;

    Name                                      Null?    Type

    ----------------------------------------- -------- ----------------------------

    N NUMBER NOT NULL

    S                                                          VARCHAR2(10)

    SQL > alter table nn edit n number null.

    Modified table.

    SQL > nn desc;

    Name                                      Null?    Type

    ----------------------------------------- -------- ----------------------------

    N                                                  NUMBER

    S                                                  VARCHAR2(10)

    SQL > alter table nn change s varchar2 (10) not null;

    ALTER table nn change s varchar2 (10) not null

    *

    ERROR on line 1:

    ORA-02296: impossible to activate (SCOTT) - found null values

    SQL >

    Thank you

    Use NOVALIDATE:

    SQL > alter table nn change s varchar2 (10) not null;
    ALTER table nn change s varchar2 (10) not null
    *
    ERROR on line 1:
    ORA-02296: impossible to activate (SCOTT) - found null values

    SQL >
    SQL > alter table nn change s varchar2 (10) not null NOVALIDATE;

    Modified table.

    SQL > insert into values nn (3, null);
    insert into nn values (3, null)
    *
    ERROR on line 1:
    ORA-01400: cannot insert NULL into ('SCOTT'. "' NN '. » S »)

    SQL > select * from nn;

    N S
    ---------- ----------
    1 test
    2

    SQL >

    SY.

  • Creating a variable that contains the value of the variable system (Long) Date of change

    Can someone tell me how to write a script to create a variable named DocDate, which contains the value of the variable of system (Long) Date of change? Or write a script that creates a variable named DocDate, which contains the current date? I can't find a lot of documentation on scripting ExtendScript.

    Hi Julee, when you create a user variable in the interface, you cannot include the building blocks of time in the definition. They can only be used in system like the System Date of Modification (Long) variable variables. So the question is, why not just use the variable Date of change (Long) system in your document? What is the purpose of the variable user DocDate? Let me know what you think here, and I can try to help you.

    Here are some ExtendScript resources:

    My blog: FrameAutomation.com | FrameMaker, faster and more effective to

    Debra Herman blog: Extension of FrameMaker

    The large samples of Russ Ward: FrameMaker ExtendScript samples - West Street Consulting

    -Rick

  • The part of report of a report region table setting to fill the region

    I need to make them with any part of the report, the section of report fills the width of the region, the column spacing all also in the entire region.

    The screenshot below shows the report occupies only a small part of the region. I need the region to this width to maintain the page layout consistency between pages.

    I can change the CSS so that it affects

    . Report-standard-alternatingrowcolors {}

    Width: 750px;

    }

    And then the same set the columns to specific width, but this application is displayed on a number of different resolutions, thereby affecting the specific widths is not all good.

    If I value percentage widths it does not.

    Any ideas?

    Screen Shot 2014-10-24 at 10.04.52.png

    The following screenshot shows what I want to achieve, even if it made specific widths specifying, in px, which means that it is not scalable for different resolutions.

    Screen Shot 2014-10-24 at 10.08.42.png

    The external table that contains the table of standard report also must be set to 100% width. Change the CSS rule:

    table[id^="report_"],
    .report-standard {
      width: 100%;
    }
    
  • Strange behavior while making the table operation DOUBLE... !

    Hello

    Can we do DML/DDL operation on table DOUBLE?

    To know the answer, I have done below the operation and found a strange behavior...

    -run 5 times...
    INSERT INTO DOUBLE
    VALUES ('P');

    commit;

    Select * twice;
    o/p-
    MODEL
    1 P
    2 P
    3 P
    4 P
    5 P

    ---------------------------------
    updated double
    MODEL of value = "K";
    commit;

    Select * twice;
    o/p-
    MODEL
    2 h
    2 P
    3 P
    4 P
    5 P

    Odd: 1 single line update... Why? I was updating all the lines.

    If I run new update of command like below...

    updated double
    set MODEL = 'K', where dummy = "P";
    commit;

    Select * twice;
    o/p-
    MODEL
    2 h
    1 h
    3 P
    4 P
    5 P

    STRANGE: Now next updated record with 'K'... like that, if I run 5 times this o/p is as below...

    MODEL
    2 h
    1 h
    6.
    4 K
    6: 00
    -------------------------------------
    REMOVE double; -This also has data of delting 1 by 1 row... Why?

    Can anyone tell me about this operation of behaivor?

    Please provide any information about the DML/DDl operation on DUAl

    Rgds,
    PC

    http://asktom.Oracle.com/pls/asktom/f?p=100:11:7955478831730544:P11_QUESTION_ID:1562813956388

    Tom says:

    Let me start by saying:-DOUBLE is owned by SYS. SYS is the owner of the data dictionary,
    so DOUBLE fits in the data dictionary. You must not modify the data dictionary
    through SQL ever - weird things can and will happen - you are just a few of
    them. We can do a lot of strange things happen in Oracle by updating the data dictionary.
    It is recommended, supported or a very good idea.

    Double is just a convienence table. You do not need to use it, you can use anything you
    Here you are. The advantage to double is the optimizer includes double is a special line, a
    column table - when it is used in queries, it uses this knowledge during the development of the
    plan.
    ...
    the optimizer includes double is a special, magical table 1 row... It's just the way it works. If all goes well
    you reset double back to 1 row after your tests, or you've just totally broken your database!
    .. .dual = magic. Dual is a table of a line but with more than 1 or less is
    dangerous. You update the data dictionary. You should expect naturally very bad
    things are happening.

  • Table of passage to the DLL

    HI -.

    I need to be interfaced with a DLL. I can communicate correctly with most of the features, but I can't understand how to set up call a function library for "GPIO_Init." Can anyone with more experience help out me? I have attached the header and also the manual - this is the section 3.8.1 (page 37)

    Thank you very much

    Jon.

    See this recent thread with about the same issue: http://forums.ni.com/t5/LabVIEW/FTDI-FT4222-DLL-calling/m-p/3146709

    In this case, you pass an array of LabVIEW and configure the parameter array as array, passed by the pointer of table data.

  • Convert a table to a cluster of 4 elements array values 2D 2D double precision, or a table 1 d

    Y at - it an easy way to convert a 2D cluster table (4 elements each including a Boolean value and three numbers dbl) to a table 2D or 1 d of double precision values? I need to store my data in a text file to control a robot, I'm trying.

    Thank you.

    There are 1 million different ways to do it. The best thing to do would be to leave the data exactly as it is and simply use Flatten in XML format (search the palette). It accepts virtually any type of data, including a 2D cluster table as you described. He will spit human readable (although not necessarily nice) text that you can write to a text file. Then, read you data from the file and use Unflatten of XML to do the reverse.

    Or you can use a similar model to flatten your data in a 1 d of double table which you can then unflatten.

Maybe you are looking for

  • sending emails is OK, but not receive them

    It happened all of a sudden in the last days.

  • Multiple calculation Manager groups

    Hello I am trying to do the same calculation in several groups, which share the same channel name know Group1 A B C Group2 A B C ... Group A B C The calculation will be the result = A * B + C for example. So far, I have created a calculation script u

  • Elite L2201 monitor can be used with desktop Pavilion a1040n?

    Help!  I bought a L2201x21.5 inch LCD monitor elite and can not find a way to plug on my Pavilion a1040n desktop computer.  If this is not possible there is some sort of adapter that I use to make my new monitor works with my flag?  Thank you.

  • Users /(user name)/AppData/Local/Temp

    Greetings, I'm trying to better understand the purpose of this particular Temp folder (usersTemp under Vista (ultimate).  Specifically, it operations, functional routines, application of the related activities, or other executions file would put file

  • How can I set an automatic sleep period Win 7 Pro

    How can I set the duration of sleep to a Win 7 Pro PC, for example go to sleep automatically an hour given while wake up automatically at a specific time? This PC is basically unattended but files hosts used by the other computers on a peer-to-peer n