Complex number datatype in COM

I am unable pass complex numbers to LabVIEW via its COM interface (LabVIEW.VirtualInstrument.Call) from Python using the win32com COM client.
When LabVIEW returns complex numbers my client sees them as a tuple consisting of the real and imaginary components. However, when I make COM call to LabVIEW with tuple as the argument I get a COM type error. If I use Python's complex datatype instead, COM seems happy but then LabVIEW returns a type error.
As I understand it, COM doesn't have a "complex" datatype, so the issue is how LabVIEW expects complex numbers to be represented in terms of COM types.
Can anybody help?

Would it help to convert it to a string while passing between Python and LabVIEW?
Then you can typecast it accordingly in each environment.
Cory K

Similar Messages

  • Understanding number datatype [A help for beginners]

    I would like to share some practical aspects of Oracle Number datatype. Please visit following link.
    http://mamohiuddin.blogspot.com/2007/03/practical-approach-to-understand-oracle.html
    Thank you,
    aijaz

    My only comment would be, since this posting of yours is being made in March 2007, wouldn't it make sense to ensure that it's all correct for the latest version of Oracle (10.2) as 9iR2 is a little "old hat" now. I'm not saying that there is anything wrong with what you've demonstrated, but you only quote it as being compatible with 9iR2 and 10.2 has now been available for a good couple of years.

  • Domain of Number datatype

    Hi all,
    Recently i came across one of the most wierd situation across my whole Oracle experience of almost 3 Yrs. I created a table TESTAB (using Oracle 9i) as
    NUMBER_F NUMBER
    NUMBER_PS NUMBER(5,2)
    VARCHAR_F VARCHAR2(10)
    CHAR_F CHAR(10)
    Then i inserted a row as
    Insert into testab values ('0123.23', '099.34','Asim','Ahmed');
    and it accepted the data for Number datatype in single qoutes and automatically parse it for Number datatype.!!!
    SQL> select * from testab;
    NUMBER_F NUMBER_PS VARCHAR_F CHAR_F
    1 3.34
    23 34.34
    2.23 2.33 asim ahmed
    123.23 99.34 Asim Ahmed
    Can somebody explain is that the correct behaviour ! If it is, then i must say it is really shocking behavious for such a mature database like Oracle !
    Asim Ahmed.

    This feature is called 'implicit conversion'
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/03_types.htm#3435

  • Number datatype

    Hi
    Assume I have 5 digits 2 numbers (as below). I notice that they do not occupy the same space.(First one consumes more storage.)
    What is the reason for this?
    99999
    10000
    Edited by: Pascal Nouma on Aug 15, 2009 6:42 PM

    Justin Cave wrote:
    Oracle, like all programs, stores numbers in binary. It takes more binary bits to store larger numbers than smaller numbers even if they have the same number of decimal digits.Actually, NUMBER datatype is not stored in binary - [Understanding Oracle NUMBER Datatype|https://metalink2.oracle.com/metalink/plsql/f?p=130:14:7587170171678335381::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,1007641.6,1,1,1,helvetica]. And yes, 99999 and 10000 do not occupy same number of bytes:
    SQL> select dump(99999) from dual;
    DUMP(99999)
    Typ=2 Len=4: 195,10,100,100
    SQL> select dump(10000) from dual;
    DUMP(10000)
    Typ=2 Len=2: 195,2Reason is 10000 is exact value of POWER(100,2). As soon as we, for example, add or subtract 1 space occupied will increase:
    SQL> select dump(10001) from dual;
    DUMP(10001)
    Typ=2 Len=4: 195,2,1,2
    SQL> select dump(9999) from dual;
    DUMP(9999)
    Typ=2 Len=3: 194,100,100
    SQL> As you can see, number with more decimal digits can occupy less space.
    SY.

  • How to convert number datatype to raw datatype for use in data warehouse?

    I am picking up the work of another grad student who assembled the initial data for a data warehouse, mapped out a dimensional dw and then created then initial fact and dimension tables. I am using oracle enterprise 11gR2. The student was new to oracle and used datatypes of NUMBER (without a length - defaulting to number(38) for dimension keys. The dw has 1 fact table and about 20 dimension tables at this point.
    Before refining the dw further, I have to translate all these dimension tables and convert all columns of Number and Number(n) (where n=1-38) to raw datatype with a length. The goal is to compact the size of the dw database significantly. With only a few exceptions every number column is a dimension key or attribute.
    The entire dw db is now sitting in a datapump dmp file. this has to be imported to the db instance and then somehow converted so all occurrences of a number datatype into raw datatypes. BTW, there are other datatypes present such as varchar2 and date.
    I discovered that datapump cannot convert number to raw in an import or export, so the instance tables once loaded using impdp will be the starting point.
    I found there is a utl_raw package delivered with oracle to facilitate using the raw datatype. This has a numbertoraw function. Never used it and am unsure how to incorporate this in the table conversions. I also hope to use OWB capabilities at some point but I have never used it and only know that it has a lot of analytical capabilities. As a preliminary step I have done partial imports and determined the max length of every number column so I can alter the present schema number columns tp be an apporpriate max length for each column in each table.
    Right now I am not sure what the next step is. Any suggestions for the data conversion steps would be appreciated.

    Hi there,
    The post about "Convert Numbers" might help in your case. You might also interested in "Anydata cast" or transformations.
    Thanks,

  • Method called reverse that switches complex number coordinates.

    I have written a class called "Complex" and there are no errors in the program.
    What I am confused about is how to answer an assigned question. The question
    is this: "Write a method called reverse which will return a new complex number
    with the coordinates reversed. That is, if the complex number which invokes
    the method has coordinates (a,b), then the method should return a new complex
    value with coordinates (b, a)."
    I will include my code for the class here (I'm using the NetBeans IDE):
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package tutorial8;
    * @author Aleks
    public class Complex
        private int I; // Real Part
        private int J; // Imaginary Part
        public Complex(int I, int J)
        setComplex(I, J);
    public int getI()
        return I;
    public int getJ()
        return J;
    public void setComplex(int I, int J)
    this.I=I;
    this.J=J;
    if (I==J)
    System.out.println("true");
    else
    System.out.println("false");
    }thanks.

    Your right it compiles without errors but it says it's missing a main method.
    This main method thing is driving me insane. Some of my classes work such as the following
    one:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package tutorial7;
    * @author Aleks
    import java.util.Scanner;
    public class Shortcalculation
        public static void main(String[] args)
            Scanner keyboard = new Scanner(System.in);
            System.out.println("Enter a positive integer");
            int positiveInteger = keyboard.nextInt();
           if (positiveInteger < 2)
            System.out.println("First positive integer output");
            positiveInteger = 4;
            while ((positiveInteger/3 >=1) && (positiveInteger/3 < 2))
                System.out.println("4");
            else if (positiveInteger < 3)
            System.out.println("Second positive integer output");
            positiveInteger = 21;
            while ((positiveInteger/5 >=2) && (positiveInteger/5 < 3))
                System.out.println("21");
            else if (positiveInteger < 4)
            System.out.println("Third positive integer output");
            positiveInteger = 43;
            while (positiveInteger/7 <=3)
                System.out.println("43");
            else
            System.out.println("Not a valid integer");
    }But I don't see why THIS one shouldn't. I try to include a "public static void main(string[] args)"
    in the class complex but it says it's an illegal start of the expression. Maybe it depends on
    where in the class I put it. I'm only practicing writing classes for 3-4 weeks now because I've read
    a lot of the book. Too bad my memory is kind of bad. Ok, I have changed the class for this
    question, I have added a reverse method. I did it without a return statement.
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package tutorial8;
    * @author Aleks
    public class Complex {
        private int I; // Real Part
        private int J; // Imaginary Part
        public Complex(int I, int J)
        setComplex(I, J);
        public int getI()
        return I;
    public int getJ()
        return J;
    public void setComplex(int I, int J)
    this.I=I;
    this.J=J;
    if (I==J)
    System.out.println("true");
    else
    System.out.println("false");
    public void reverse()
    this.I=J;
    this.J=I;
    }sorry for the long post.

  • Why when someone rings me on my number it also comes up on my dads phone we are both on isos 8 and he has the iphone 5 and i have the 5s (if that helps)

    please help me! Why when someone rings me on my number it also comes up on my dads phone we are both on isos 8 and he has the iphone 5 and i have the 5s (if that helps)

    That is a new feature described in Connect your iPhone, iPad, and iPod touch using Continuity
    You can turn it off:
    Turn off iPhone cellular calls
    To turn off iPhone Cellular Calls on a device, go to Settings > FaceTime and turn off iPhone Cellular Calls.

  • How to convert waveform into complex number

    Hi,
    I need to convert the acquired voltage and current waveform through DAQ card into complex numbers in order to find the phase relationship
    between the waveform.Can u tell me is there any method to convert the acquired waveform into complex number array
    or is there any other method to find the phase??
    please help me in this
    Regards
    Meenatchi

    Dear Meenatchi,
    I am attaching two sample VI s for the issue you are facing. Hope this helps.
    The waveform in array format.vi gives you the values of the waveform obtained from your DAQ card in an array directly. You can choose this mode by selecting it from the options available on the DAQmx read vi. But if you still want to extract the array from the waveform data type please navigate to programming >> waveform >> get waveform components and extract the array component.
    The phase of the complex number created.vi gives you and array of the phases. Please specify the number of iterations of the for loop that determines the size of the array.
    If you need any further assistance, please feel free to contact us.
    Regards,
    Pavan Ramesh
    Applications Engineer
    NI India
    Attachments:
    Waveform array issue.zip ‏10 KB

  • Using number datatype for date column

    Hi
    Is there a side effect for using "number" datatype for "date" column?
    If so, what is the disadvantage?
    Many thanks

    Hi,
    Ora_83 wrote:
    Hi
    Is there a side effect for using "number" datatype for "date" column?
    If so, what is the disadvantage?Yes, there's a definite disadvantage.
    Oracle provides date arithmetic and a number of functions for manipulating DATEs. None of them work with numbers.
    For example,
    SELECT    TRUNC (order_date, 'MONTH')     AS order_month
    ,       AVG (ship_date - order_date)     AS avg_delay
    FROM       orders
    GROUP BY  TRUNC (order_date, 'MONTH')
    ;order_month involves a DATE function; it's pretty easy to find the month that conatins order_date.
    avg_delay involves date arithmetic. It's extrememly easy to find how much the time passed between order_date and ship_date.
    Depending on how you code dates as numbers, doing either one of the above may be just as easy, but doing the other will be very difficult. You'll waste a lot of effort converting the NUMBERs to real DATEs whenever you need to manipulate them.
    Validation can be very difficult for NUMBERs, also.
    Watch this forum. It's a rare day when there's not some question about how to get around a problem caused by storing dates in a NUMBER (or VARCHAR2) column. Don't add to that. Always use DATE columns for dates.

  • Problem with number datatype dimension in BIB

    Hi,
    I've got a problem. When I create dimension with number datatype and I assign it to my cube, I cannot use my cube with my BIB presentation object - such as Crosstab. Is this possible only with varchar dimensions?

    It should work, but it would be helpful if you could specify more information, for example which errormessage you are seeing and where.

  • Multiply a digital signal by a complex number

    I am using a 7811R FPGA module on a 1042Q chassis; I have an ADC board connected and delivering 8 separate streams of data to the DIO lines of the FPGA module.  The data is collected in the FPGA VI and than transfered to a Host VI for further data processing.
    I am trying to implement a digital beamformer for an antenna array; for that purpose I need to multiply the 8 data streams by a weight (complex number with amplitude and phase).  I can't quite grasp how I would multiply a digital data stream by a complex number!
    Would I have to collect a sequence of 8 data points and use them as one number?  What kind of data should I use for complex number multiplication? 
    Any other considerations I am not taking into account that you know of?
    Thanks in advance.

    You could convert booleans to zero to one and then multiply. But I can't think of anything you can DO with this.
    You need to think about what is going on physically. What do the data
    streams represent? What mathematical operations do you want to perform?
    Thinking about beamforming: crudely speaking, you want to delay the
    various signals by different time increments and then add them
    together.

  • Preceeding Zeros in Number datatype

    Hello all
    Is there any way to store values with preceeding zeros in Oracle Number datatype (eg : person code: 00089034)
    Thanks in advance

    Yes it is possible, by storing it as a varchar2. However I would advice you to store the number as a number, and use a format mask for display:
    SQL> select to_char(89034,'00000009') from dual;
    TO_CHAR(8
    00089034
    1 rij is geselecteerd.Regards,
    Rob.

  • Problem while modifying number datatype.

    Hi All,
    I have modified a column, which is of number datatype.
    Initially it was number(8,2), now I have changed this to Number(10,2).
    But, due to some change in requirement, I have to revese the changes. Now, I am trying to make it Number(8,2), but it is giving me the following error.
    Error report:
    SQL Error: ORA-01440: column to be modified must be empty to decrease precision or scale
    01440. 00000 - "column to be modified must be empty to decrease precision or scale"
    Is there a way to make it?
    Please suggest..
    I am using Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production.
    Thnx in advance..
    Bits..

    You'd have to jump through some hoops to decrease the allowable number of digits in a column. You'd either have to re-create the table, i.e.
    -- Save off the data in FOO
    ALTER TABLE foo
      RENAME TO foo_bkup;
    CREATE TABLE foo (
      -- New column definitions
    INSERT /*+ APPEND */ INTO foo( list_of_columns )
      SELECT list_of_columns
        FROM foo_bkupOr you could create a new column, copy the data, and rename the old column
    ALTER TABLE foo
       ADD( temp_col_name number(8,2) );
    UPDATE foo
       SET temp_col_name = old_col_name;
    ALTER TABLE foo
      DROP COLUMN old_col_name;
    ALTER TABLE foo
      RENAME COLUMN temp_col_name TO old_col_name;Justin

  • Number datatype in designer import

    Having Designer model number datatype columns or domains that do not have Col Decimal Places defined. Only maximum length is populated. Data Modeler designer import do not populate values to Precision nor Scale. Precision should be set.

    Identifed as a code bug. According to former metalink. Tobe fixed in a future version.

  • How to update precision value in number datatype

    hello all
    i hava a database containing data in that there is a table which contan a number datatype
    that is number(10)
    the table contain large amount of data
    now i need the precision value 2
    that is number(10,2)
    how i can update is
    i try alter command the do this bu the error is there the table contain data
    so please suggest the solution
    thanks in advance

    The number of columsn has nothing to do with it. The number of rows has nothing to do with it.
    Here is a step-by-step example to address your problem. I will change DATA_OBJECT_ID from NUMBER to NUMBER(10,2) even though there are thousands of rows in the table, the column is "in the middle " of the table, and there are many rows with non-null values in that column.
    07:02:43 > create table t3 as select * from all_objects;
    Table created.
    Elapsed: 00:00:06.22
    07:04:08 > desc t3
    Name                                      Null?    Type
    OWNER                                     NOT NULL VARCHAR2(30)
    OBJECT_NAME                               NOT NULL VARCHAR2(30)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                 NOT NULL NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                   NOT NULL DATE
    LAST_DDL_TIME                             NOT NULL DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    NAMESPACE                                 NOT NULL NUMBER
    EDITION_NAME                                       VARCHAR2(30)
    07:04:12 > alter table t3 modify (data_object_id number(10));
    alter table t3 modify (data_object_id number(10))
    ERROR at line 1:
    ORA-01440: column to be modified must be empty to decrease precision or scale
    Elapsed: 00:00:00.98
    07:08:05 > select count(*), min(data_object_id), max(data_object_id), count(distinct data_object_id), count(data_object_id)
    07:09:06   2  from t3;
      COUNT(*) MIN(DATA_OBJECT_ID) MAX(DATA_OBJECT_ID) COUNT(DISTINCTDATA_OBJECT_ID) COUNT(DATA_OBJECT_ID)
        184456                   0             1526320                         12225                 70092
    1 row selected.
    Elapsed: 00:00:00.11
    07:09:41 > alter table t3 add (temp_data_object_id number(10,2));
    Table altered.
    Elapsed: 00:00:00.07
    07:10:27 > update t3 set temp_data_object_id = data_object_id, data_object_id = null;
    184456 rows updated.
    Elapsed: 00:00:04.49Notice that our column of interest is now entirely null, so the restriction against reducing its scale or precision will not longer impact us.
    07:11:00 >
    07:11:17 > select count(*), min(data_object_id), max(data_object_id), count(distinct data_object_id), count(data_object_id) from t3;
      COUNT(*) MIN(DATA_OBJECT_ID) MAX(DATA_OBJECT_ID) COUNT(DISTINCTDATA_OBJECT_ID) COUNT(DATA_OBJECT_ID)
        184456                                                                     0                     0
    1 row selected.
    Elapsed: 00:00:00.04
    07:11:51 > alter table t3 modify (data_object_id number(10,2))
    07:12:33 > /
    Table altered.
    Elapsed: 00:00:00.07
    07:12:35 > update t3 set data_object_id=temp_data_object_id;
    184456 rows updated.
    Elapsed: 00:00:04.01
    07:14:40 > select count(*), min(data_object_id), max(data_object_id), count(distinct data_object_id), count(data_object_id) from t3;
      COUNT(*) MIN(DATA_OBJECT_ID) MAX(DATA_OBJECT_ID) COUNT(DISTINCTDATA_OBJECT_ID) COUNT(DATA_OBJECT_ID)
        184456                   0             1526320                         12225                 70092
    1 row selected.
    Elapsed: 00:00:00.09
    07:14:49 > alter table t3 drop column temp_data_object_id;
    Table altered.
    Elapsed: 00:00:02.40
    07:15:11 > desc t3
    Name                                                              Null?    Type
    OWNER                                                             NOT NULL VARCHAR2(30)
    OBJECT_NAME                                                       NOT NULL VARCHAR2(30)
    SUBOBJECT_NAME                                                             VARCHAR2(30)
    OBJECT_ID                                                         NOT NULL NUMBER
    DATA_OBJECT_ID                                                             NUMBER(10,2)
    OBJECT_TYPE                                                                VARCHAR2(19)
    CREATED                                                           NOT NULL DATE
    LAST_DDL_TIME                                                     NOT NULL DATE
    TIMESTAMP                                                                  VARCHAR2(19)
    STATUS                                                                     VARCHAR2(7)
    TEMPORARY                                                                  VARCHAR2(1)
    GENERATED                                                                  VARCHAR2(1)
    SECONDARY                                                                  VARCHAR2(1)
    NAMESPACE                                                         NOT NULL NUMBER
    EDITION_NAME                                                               VARCHAR2(30)
    07:15:15 >

Maybe you are looking for

  • How to go back to calling screen???

    Hi experts, I had modified the Exit MV45AFZZ to display pop up message when we save a sales order. Now user after giving all the input in VA01 will go for SAVE button and after which pop up will occur. Now my problem is after displaying message it sh

  • Nokia E72 will a US model work in the UK?

    Hi, could anyone help me I was just wondering if I bought a nokia e72 from the US, would I be able to use it in the UK or would I have to unlock it or something?? Thanks

  • Dv9810us after recovery windows will not detect the wireless card that is bulit into the computer.

    After running the recovery (Vista 32) from the recovery partition my computer no longer sees the Wifi card installed. There is nothing in device manager, the hp wireless wizard doesn't detect anything. I went to HP's site and download the 3 different

  • Server error when trying to install midlet

    Hello I am trying to install the HelloWorld midlet on my phone (Samsung X105). I am using Tomcat 5.5 as the web server and I am able to connect to my wml page through the phone. The link to the jad file shows up and I get the install prompt when I se

  • How to get an event on Air Application uninstallation

    Hi Friends                  is there any way to get an event on Appliation uninstallation.Actually i want to cleared my shared object when i uninstall the application.Also want to remove the application from system tray during uninstallation of appli