What is it about data types of local variables?

Hey there!
I'm trying hard to access the booleans, whose refnums got stored into an array. As the example show, everything's fine unless I start using local variables: I can access the data in the topmost FOR loop. As soon as variables come into play, it seems as if I have to explicitly typecast the data. Is it just me? There has to be a less complicated way... can anybody give me a hint?
Kind regards,
Severin
Attachments:
data types of local variables.jpg ‏96 KB
data types of local variables_7.11.vi ‏39 KB

Hi Severin,
The output from that property node is of variant data type. You can convert it to boolean by using the Variant to Data VI. See attached example
Sarah
Applications Engineer | National Instruments | UK & Ireland
Attachments:
data types of local variables_7.11.vi ‏41 KB

Similar Messages

  • What should be the data type for a field in ztable?

    i am desing a ztable , wht should be the datatype for a field if i want to enter values like -1.5 and -2.5 , negative values with decimals what should be the data type???

    declare as P type. TYPE P DECIMALS 1
    Type P data allows digits after the decimal point. The number of decimal places is generic, and is determined in the program. The value range of type P data depends on its size and the number of digits after the decimal point. The valid size can be any value from 1 to 16 bytes. Two decimal digits are packed into one byte, while the last byte contains one digit and the sign. Up to 14 digits are allowed after the decimal point. The initial value is zero. When working with type P data, it is a good idea to set the program attribute Fixed point arithmetic.Otherwise, type P numbers are treated as integers.
    You can use type P data for such values as distances, weights, amounts of money, and so on.
    Also check this link.
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fd9358411d1829f0000e829fbfe/content.htm
    Regards,
    Maha

  • What is native Sql data types and does oracle support this?

    what is native Sql data types
    Does oracle support this?

    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14220/datatype.htm#g31099

  • What is the best data type to store XML string

    Hello all,
    If we want to store a XML string in oracle database table for some other program use what is the best data type that we can use in the table to store this XML string..
    Is it VARCHAR? or can we use BLOB type
    Anybody to help please
    Message was edited by:
    user483578

    If your XML data will not be larger than 4000 characters then use VARCHAR2 else CLOB. I don't see a need to use BLOB (unless your XML data contains binary information).

  • What is the best data type for wallet application?

    Hi Friends..
    I want to know what is the best data type for wallet application..
    Assume that, i want to the Total of money saved digitally in Applet Wallet..
    And then if there's any transaction the Total of money which saved digitally in Applet Wallet would be Subtracted or Added depends on how much money that spent or saved..
    Which one is the best implementation of these scenarios :
    1. I save the User ID and Total of money in the Java Card, and then if there's any transactions, it would be added or subtracted directly and then saved again in the Java Card
    2. Or.. I save the User ID in the Java Card whereas Total of money in the Database, and then if there's any transactions, the ID would be read from the Card, and then select the Database based on that ID, and then Add or Subtract the money depends on how much money spent in the Transaction
    Please help me regarding this
    Thanks in advance

    Hi,
    Personally I would choose to store the total amount stored on the card. You could use two shorts (short[] perhaps) to store an integer (add more shorts to increase precision) and simply handle overflow your self. You could even look into using a third party library (or class) that treats a byte array as a big integer etc. There were some posts recently on floating point arithmetic that could be helpful for you since you will probably want to use decimals and JC does not natively support floats.
    Cheers,
    Shane

  • Any idea what this errorr means? the data type of the reference does not match the data type of the variable

    I am using Veristand 2014, Scan Engine and EtherCat Custom Device.  I have not had this error before, but I was trying to deploy my System Definition File (run) to the Target (cRio 9024 with 6 modules) and it failed. It wouldn't even try to communicate with the target. I get the 'connection refused' error.  
    I created a new Veristand project
    I added the Scan Engine and EtherCat custom device.
    I changed the IP address and auto-detected my modules
    i noticed tat Veristand didn't find one of my modules that was there earlier. (this week)
     So, i went to NiMax to make sure software was installed and even reinstalled Scan Engine and Veristand just to make sure.
    Now, it finds the module, but when i go to deploy it getsto the last step of deploying the code to the target, and then it fails.
    Any thoughts?
    Start Date: 4/10/2015 11:48 AM
    • Loading System Definition file: C:\Users\Public\Documents\National Instruments\NI VeriStand 2014\Projects\testChassis\testChassis.nivssdf
    • Initializing TCP subsystem...
    • Starting TCP Loops...
    • Connection established with target Controller.
    • Preparing to synchronize with targets...
    • Querying the active System Definition file from the targets...
    • Stopping TCP loops.
    Waiting for TCP loops to shut down...
    • TCP loops shut down successfully.
    • Unloading System Definition file...
    • Connection with target Controller has been lost.
    • Start Date: 4/10/2015 11:48 AM
    • Loading System Definition file: C:\Users\Public\Documents\National Instruments\NI VeriStand 2014\Projects\testChassis\testChassis.nivssdf
    • Preparing to deploy the System Definition to the targets...
    • Compiling the System Definition file...
    • Initializing TCP subsystem...
    • Starting TCP Loops...
    • Connection established with target Controller.
    • Sending reset command to all targets...
    • Preparing to deploy files to the targets...
    • Starting download for target Controller...
    • Opening FTP session to IP 10.12.0.48...
    • Processing Action on Deploy VIs...
    • Setting target scan rate to 10000 (uSec)... Done.
    • Gathering target dependency files...
    • Downloading testChassis.nivssdf [92 kB] (file 1 of 4)
    • Downloading testChassis_Controller.nivsdat [204 kB] (file 2 of 4)
    • Downloading CalibrationData.nivscal [0 kB] (file 3 of 4)
    • Downloading testChassis_Controller.nivsparam [0 kB] (file 4 of 4)
    • Closing FTP session...
    • Files successfully deployed to the targets.
    • Starting deployment group 1...
    The VeriStand Gateway encountered an error while deploying the System Definition file.
    Details:
    Error -66212 occurred at Project Window.lvlibroject Window.vi >> Project Window.lvlib:Command Loop.vi >> NI_VS Workspace ExecutionAPI.lvlib:NI VeriStand - Connect to System.vi
    Possible reason(s):
    LabVIEW: The data type of the reference does not match the data type of the variable.
    =========================
    NI VeriStand: NI VeriStand Engine.lvlib:VeriStand Engine Wrapper (RT).vi >> NI VeriStand Engine.lvlib:VeriStand Engine.vi >> NI VeriStand Engine.lvlib:VeriStand Engine State Machine.vi >> NI VeriStand Engine.lvlib:Initialize Inline Custom Devices.vi >> Custom Devices Storage.lvlib:Initialize Device (HW Interface).vi
    • Sending reset command to all targets...
    • Stopping TCP loops.
    Waiting for TCP loops to shut down...
    • TCP loops shut down successfully.
    • Unloading System Definition file...
    • Connection with target Controller has been lost.

    Can you deploy if you only have the two 9401 modules in the chassis (no other modules) and in the sysdef?  I meant to ask if you could attach your system definition file to the forum post so we can see it as well (sorry for the confusion).  
    Are you using any of the specialty configurations for the 9401 modules? (ex: counter, PWM, quadrature, etc)
    You will probably want to post this on the support page for the Scan Engine/EtherCAT Custom Device: https://decibel.ni.com/content/thread/8671  
    Custom devices aren't officially supported by NI, so technical questions and issues are handled on the above page.
    Kevin W.
    Applications Engineer
    National Instruments

  • Want to find the Data type of a variable at runtime ?

    Hi,
    I Want to find the Data type of a variable at runtime ?
    I think there is a function module... But i forgot ..... Can you please help me out.
    Points are rewarded immediately.

    hi,
    do this way
    REPORT ysantest LINE-SIZE 350.
    DATA : v_num TYPE n,
    v_type(2).
    DESCRIBE FIELD v_num TYPE v_type.
    WRITE : v_type.

  • How to know the data type of a variable?

    Hi,
       Can anyone tell me which function can return the name data type of a variable?
        Thanks!
    Message was edited by: Long Zheng

    Hi long,
    1. I don't know whether this will serve your purpose.
    2.
    REPORT abc.
    DATA : components     LIKE     rstrucinfo OCCURS 0 WITH HEADER LINE.
    DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
    CALL FUNCTION 'GET_COMPONENT_LIST'
      EXPORTING
        program    = sy-repid
        fieldname  = 'T001'
      TABLES
        components = components.
    LOOP AT components.
      WRITE :/ components-compname , components-type.
    ENDLOOP.
    regards,
    amit m.

  • Explain about Data Types INT1, INT2, INT3, INT4 & NUMC

    could anyone explain about the data types and give examples.

    INT1: 1-byte integer between 0 and 255. The length is set to 3 places for this data type.
    INT2: 2-byte integer between -32767 and 32767. Fields of this type should only be used for length fields. These long fields are positioned immediately in front of a long field (type LCHR, LRAW). With INSERT or UPDATE on the long field, the database interface enters the length which was actually used in the length field. The length is set to 5 places for this data type.
    INT4: 4-byte integer between -2147483647 bis 2147483647. The length is set to 10 places for this data type.
    NUMC: Long character field in which only numbers can be entered. The length of this field is limited to a maximum of 255 places.
    Check this:
    http://help.sap.com/saphelp_nw70/helpdata/EN/cf/21f2e5446011d189700000e8322d00/frameset.htm
    Thanks...
    Shambhu

  • What are the corresponding Data Types of some MDM Data Types

    Hi Guys,
    The MDM ABAP API involves creation of a DDIC structure in SRM. This structure should have the same fields with the MDM table fields. We would like to ask the corresponding ABAP Data Types for the following MDM Data Types.
         MDM                                                         SRM
    1.  Look up (flat)
    2.  Look up (taxonomy)
    3.  Look up (heirarchy)
    4.  Look up (qualified flat look up)
    Any significant inputs on this?
    Thanks and regards,
    RE

    Hi,
    Refer the below link. This is from the MDM Reference guide and contains the sample source code as well for almost all the things like creating repository, creating tables and fields etc. It would be helpful to you.
    http://help.sap.com/saphelp_mdm550/helpdata/en/47/5fd3f7cbd75518e10000000a421138/frameset.htm
    Regards,
    Jitesh Talreja

  • About data type and cur/unit

    Hello Gurus,
         (1) in flat file data source,  all the data type are char originally.  should I change them to corresponding data type ?
        (2) for cur/unit, how to set ?
    Many thanks,
    Frank Zhang

    Hi...
    (1) in flat file data source, all the data type are char originally. should I change them to corresponding data type ?
    It depends on ur requirement...........Specify the data types according to the fields that you want to upload from the flat file.........If the data for your flat file was staged from an SAP system..... there are no problems when transferring data types into BI...........Please note that you might not be able to load the data types DEC and QUAN for flat files with external data............ Specify type CHAR for these data types in the transfer structure........... When you load...... these are then converted into the data type...... which you specified in the maintenance of the relevant InfoObject in BW.........
    2) for cur/unit, how to set ?
    U can define the unit/currency in the key figure............ Either the key figure has a fixed unit/currency  or the unit/currency  comes from a characteristic....... If the key figure does not have a fixed unit you can determine this........
    Suppose u r creating a keyfigure Amount.........In the Type/unit Tab........in Type/Data Type choose Amount..........Then in the Data Type ...........Choose Currency..........If u hav any Fixed Currency.....eg : EUR............put it in the firld.......Fixed currency.........otherwise if variable..........then put 0CURRENCY in the field Unit / currency..................same setting can be done for Quantity also.......
    Hope this helps.......
    Regards,
    Debjani........

  • Data Acquisition - using local variables to write data to a file

    Hello,
    I am running a Data Acquisition vi (currently in LabVIEW 7.1 but soon to be updated to 8.2) that collects ~100 parameters of data from several sources contained in a while loop. The current configuration (which I did not write) uses very few subVIs and writes to ~100 local variables to store each parameter. It then reads all the local variables and builds an array of all the strings, converts then to a spreadsheet string, then uses the write characters to file function to append to a datafile. I am trying to clean things up and have came up with subVIs to collect the data from the following sources:
    8 serial port sources collecting btwn 8 and 20 parameters each
    ~15 thermocouple readings
    ~10 analog inputs
    ~20 parameters read off an ARINC 429 bus.
    I have come up with a subVI to read each of the sources and have placed the subVIs in the while loop. Each subVI outputs the data that it collects in array or cluster form. I was wondering how best to write each parameter to a CSV file at between 1 and 10 Hz. Should I write each subVI output to a LV and then read them off as was done before (the difference being that I have reduced the # of LVs to ~10 vs >100?
    I should add that precise timing is not that important, so if all the subVIs are not collecting simultaneously (which I understand that they won't be), it does not really matter.
    Thanks.

    Hi jilla,
    jilla wrote:
    What I think that you are saying is to turn the outputs of the 4 subVIs into inputs of a 5th subVI that writes to the data file. Correct?
    Yes.  It may sound like a fine-point, but I beileve it's better to create a VI specifically for formatting data - in your example, 4 arrays IN, a single string OUT.  Then write the string to file as a seperate operation.  GUI-displayed data can go through a similar transformation, the four arrays wired to a subVI which builds output-structures specifically for display.  It's a beginner's mistake to put lots of individual controls and indicators on the screen when groups of them are naturally related (in an object-oriented sense.)  Use clusters to group related controls - this will keep the diagram much cleaner.
    One more question: at what point (either # of data points or frequency of data collection) does it become necessary to use queues? Thanks.
    Well, there's not really a clearly definable "point".  I'd say if your update-rate climbs above 100Hz, or you witness poor program or system performance, then it's time.  The scenario you've described is a fairly simple acquire/display&log loop - and simple is good.   Then-again people can't see/react-to updates faster than about 10Hz - so it doesn't make sense to sacrifice performance - if performance becomes an issue.
    Re: queues:  Queues are sometimes used to buffer data that's "produced" in one place and "consumed" in another.
    Here, if/when logging data, you're logging with every DAQ.  I wouldn't recommend using a queue to transport data from a "DAQ loop" to a "Logging-loop" - those functions can be in the same loop.  Should/could a queue be used to get data from a "DAQ loop" to update the GUI at a lower frequency?  Sure, but a Notifier might be a better choice.   Further, in the (simple?) program you've described, you might use a case structure (True/False) to only update FP indicators every "X" iterations - a simple solution that doesn't require Queues or Notifiers.
    Cheers!
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • Having trouble assigning the Data Type to Shared Variables

    I have some type definitions that I need to use as shared variables.  When making the shared variable, I create it and then name it.  I then select "From Custom Control..." in the Data Type field and select the applicable type definition.  The problem is that it displays some other type definition.  Am I doing something wrong?  I am using LV v.8.6. I don't recall having this problem with v.8.5.1.

    Hi Hunter,
    All the custom controls are set to Type Def.  Since sending my question, I noticed that the system uses the first similarly used custom control and it's name.  For example, I have several clusters that each have four numeric controls in them.  When creating a shared variable for each of the various clusters, it uses the first custom control that was set up as a shared variable.  I hope this makes sense to you.  I have not had a chance to see if the shared variables are working because I have other issues to deal with first. 
    What troubles me is that I don't recall seeing this with v.8.5.1.
    I suppose I could and perhaps should use a common type def for all similarly used shared variables.
    Dave

  • How to get the data type of a variable

    Hi
    I'm new to java and I'd like to put some variables with different data type into the HashMap. But when I'm going to get the value
    of the variable I want to know its data type (int,String,long,float etc.) before I do some processing.
    here's my sample code:
    //start...
    Map m = new HashMap();
    String s1 = "String1";
    String s2 = "String2";
    int i1 = 5;
    int i2 = 10;
    m.put(1,s1);
    m.put(2,i1);
    m.put(3,12);
    m.put(4,s2);
    //end...
    when I'm going to retrieve the variable, I'd like to assign it to another variable with the same data type. but the problem is, before
    I assign it I must know its data type so that I could not have an error.
    thanks in advance

    I don't think you will be able to put primitives (ints, floats, etc) in, without wrapping 'em first (java.lang.Integer, java.lang.Float...).
    You can get the type with
    Object biggles;
    // Get biggles
    if( biggles instanceof String )
       System.out.println( "Biggles is a string, yeah biggles" );or with refection
    Class bigglesClass = biggles.getClass();
    System.out.println( "Biggles is of type: " + bigglesClass.getName() );

  • Findind Data type of a variable in Run Time

    Hi Experts,
        I am trying to find the data type of variable in runtime with "DESCRIBE FIELD" statement.
        but it always shows data type C by default. i have written this code.....
        DATA: w_value TYPE d.
        DESCRIBE FIELD p_value TYPE w_value.
       My requirement is that if  i pass a variable of any type(like date, time , char, Integer , Decimal etc.) from selection screen i  will   give the correct data type of variable.
    Please let me know how to acheive this problem.
    Regards,
    Shri

    Hey Raj,
    In this code it always ask a date type variable.
    Still my problem i snot getting solve.
    check the below one which might give u a fair idea
    DATA: Desc_object         TYPE ref to cl_abap_typedescr.
    Parameters:   p_char           TYPE char10 ,
                  p_date           TYPE d,
                  p_int            type i.
    Field-symbols : <any_type> type any.
    START-OF-SELECTION.
      If p_char is not initial.
         assign p_char to <any_type>.
      elseIf p_date is not initial.
         assign p_date to <any_type>.
      elseif p_int is not initial.
         assign p_int to <any_type>.
      endif.
    IF <any_type>  is assigned.
      desc_object = cl_abap_typedescr=>describe_by_data( <any_type> ).
      WRITE: / desc_object->absolute_name.
      WRITE: / desc_object->type_kind.
    ENDIF.
    The Catch lies in assigning the variables to field symbol. I think you already have that part of code
    Edited by: A J Raj on Dec 9, 2009 7:12 PM

Maybe you are looking for

  • File paths and archiving (and referenced files).

    I've come to the stage where I need to start using referenced files (out of disk space on my laptop) and also start archiving projects. One of my plans was to start keeping an off-site backup of all the originals in case something really bad happened

  • I need to secure SOAP message sent into SOAP adapter, how to?

    Hi guys, My scenario uses SOAP and I need to secure this SOAP message sent into SOAP adapter. As I have read in the documentation, HTTPS is possible only on the SOAP receiver adapter. But my is SENDER. COuld you help me please, how to solve it? Or po

  • Problems with Booting Up after Apple Download

    The other day I received a message via my software update program that Apple had a download available to update 10.4.11 (Security Update). I began the download and near the end I received an error message that the download could not be completed and

  • Eclipse, netbeans, etc, how S-L-O-W software makes you more productive?

    M using JEDIT for java dev and its good because its MEDIUM slow, but I tried to use eclipse to see if that is really all that sht people say it its. Turns out the thing sucks big time, takes forever to load then I tried to 'make a project' with a exi

  • AWE (Approval Workflow Engine) Question

    I'm trying to implement AWE (Approval Workflow Engine) and am having a bit of a problem. I've been following the instructions on the Red Paper document concerning implementing AWE. I have the following code. When this code fires the cross reference t