increment and decrement variable

Hi guys

I m new in the Labview programming and I m working with the NXT module in Labview 2010, and I have a few problems, because I m used to programming in C

LabView is a kind of diferent than C

The thing is wath I want to do a speed controller using the NXT brick

Using the left arrow key increases the speed and by using the arrow button to the right the speed will decrease

I m usin the actuator connected to the PORT has the NXT brick,

Thank you

Diego

There is a communication i2c vi on the NXTI/O: Advanced palette that allows you to read/write the i2c data. You can take a look at the sensor ultrasonic VI, or saw HiTechnic sensors for examples of the use of this vi. You also need to configure the sensor i2c use port. You can use the VI 'Port of sensor installation' also in the palette of the advances to set the port for Lowspeed9V / RawMode

Tags: NI Products

Similar Questions

  • How to increment and decrement a counter with a single button

    Is there anyway you can increment and decrement a counter using only one button?

    I want this counter in place so that when I leave the stage and go back to it, the visibility of my button will remain the same because of being linked to the meter number.

    What would be the best way to implement that it doesn't work when I do it this way.

    function show_hide_MC(evt:MouseEvent):void {}

    MC.visible =! MC.visible;

    (Counter = 0) = (counter = 1);

    }

    btn.addEventListener (MouseEvent.CLICK, show_hide_MC);

    Thanks in advance!

    You can use a Boolean value (true/false) rather than a meter to keep track / affecting visibility.  You can use the counter simply to determine if you are starting the file or not.   When you click this button, you set the mc.visible property, and then assign the Boolean value of the visible property of the mc.

    var mcVisible:Boolean;    These two variables need to extend the length off the coast of the timeline
    var int count;

    if(Count == 0) {/ / you just started things so set up}
    mcVisible = mc.visible;
    Count += 1;
    } else {}
    MC.visible = mcVisible; you refer then set the visibility of the mc
    }

    function show_hide_MC(evt:MouseEvent):void {}
    MC.visible =! MC.visible; Toggle visibility
    mcVisible = mc.visible;    Remember how you left it
    }

    You can just use the number of establishments, incrementing every time that you click the button and using the module to determine if it has been clicked on an even number of times compared to an odd number of times, and then have a conditional that tests, which affects visibility... something like...

    var int count;           will start with a default value of 0

    We need to increase the length of the timeline

    If (count %2 == 0) {/ / this is the same value}
    MC. Visible = true;
    } else {/ / this is an odd value}
    MC. Visible = false;

    }

    function show_hide_MC(evt:MouseEvent):void {}
    MC.visible =! MC.visible; Toggle visibility
    Count += 1;

    }

  • Increment and decrement

    I want to do a simulation of increasing numbers and decrements up to a point. Let's say that I start with a constant of 10. I want to increment this 10 until it reaches 50. When he reached 50, I want to decrement, until the return to 10. And from there, it goes back to 50 and so on.

    I'm new to LabVIEW, and by looking at a few examples, I can do the part of the increment. However I can only stop the simulation when he reached 50, and it is not I want.

    Can someone help me with this?

    See attachment.

  • Increment and decrement with a Boolean value entered

    Hello Experts Labview (and in fact life savers!)

    I have a digital controller (button) in my VI, digital indicator, in addition to a Boolean of power input.

    As an initial state, the digital display will contain a certain value (zero for example) and will only receive the variation in the button entry as long as the Boolean is true, and then add it to this initial value.

    What is the change ? lets say that the button was on 8 before I touched the Boolean true, the value of the indicator is zero, and then I hit the Boolean true.

    Now, when I move the button from 8 to 18 years (variation of + 10) , I want to receive the indicator + 10 and add it to the zero, now the result is 0 + 10 = 10

    Now, the value is false, I move the button and nothing happens to the in the indicator 10.

    Now, the Boolean value is true once again, let's say the button was about 4 at the time, I hit the Boolean true and it spend 4 to 1 (change-3) , the indicator value will now be 10 + (-3) = 7

    I hope I explained the idea in a clear manner, I would be very grateful if someone could help me with this.

    P.S. I have attached only the vi to illustrate the idea.

    Thanks in advance

    You care only remarks how the button changed.  Therefore, you must subtract the old value and the new value to get how to change the button.  Then add inside the structure of the case, this difference to your value that belongs in the registry to offset.

  • HP first and true variable E

    HP first and true variable E

    Home view

    example 1:

    0.1 enter Sto Alpha E

    Enter 8 alpha E

    X ERROR: invalid exponent number

    Press OK

    example 2:

    0.1 enter Sto Alpha E

    8 * enter alpha E

    .8

    example 3:

    0.1 enter Sto G

    Enter alpha 8 G

    .8

    Why doesn't the first 8th?

    Thanks for the quick response.

    This means E as a variable is not consistent in the simple mathematical operations.

    Such as:

    5 b/C is ok

    5th/C not ok

    concerning

    RS

  • Share the expression in step.result.numeric and locals.variable

    Hello together,

    I'm new in the world of TestStand and I have a simple question.

    How can I share the output of a step between the expression step.numeric.result (NumericLimitTest) and a variable 'local '? I need the output of a time step value for the comparison of the limit and once to give to the next step.

    Thank you

    Dusan


  • What is the function? : 'increment and save '.

    increment and save / file / menu

    It allows you to save the project file while you work through various stages of the project.  If you want to return to an early stage of the project, you simply open it upwards.  None of the things done in the later stages of the project appears.

  • APEX 4.2 translate data 'function and Global Variable declaration '.

    Hello everyone,

    I use APEX 4.2.1.00.08 and I wonder if there is a way to translate "Function and Global Variable declaration" textarea. Any other script text box is available for translation, but not this one.
    I know what the code is loaded on the header, but may contain important alert messages of global functions.

    Thanks in advance.

    Hi Grandmaster,

    "Function and global variables declaration" contains the JavaScript code, that is why it is not wise to include in the standard translation process.

    In my opinion, you have several options to access your translated messages:

    -) Use Application-> Substitutions or
    -) Store your message in the form of component shared-> SMS and and assign it to an application with the APEX_LANG element. Api MESSAGE (http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_lang.htm#CHDBCEAB)

    In 'Function and Global Variable declaration' use substitution syntax to replace the value. For example:

    var myDeleteMessage = "&G_MY_DELETE_MESSAGE.";
    ...
    alert(myDeleteMessage);
    

    where G_MY_DELETE_MESSAGE would be a part of the application or the request for Substitution.

    Concerning
    Patrick
    -----------
    Member of the APEX development team
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Dynamic link with AE, increment and save?

    Hi all

    I am super frustrated.  I have a project of creation that is dynamically linked to a composition of AE.  I need to make the management of versions, and I prefer to use the method 'increment and save' in AE.  When I do, first refresh NOT the newest of the project folder.  I read online that there is a parameter "Dynamic Link with after effects uses project file name with as many ' in 'General', but I'm absolutely not that.  Can someone help me please?  I'm tearing my hair out here...

    This preference is in After Effects, first not Pro.

    See you soon,.

    The f

  • Migration 10g and 11g - Variables does not later

    If someone could give me some suggestions that would be great.

    My client has just migrated from 10g to 11g and aside from a few problems with the modules of knowledge Hyperion, which we managed to solve, we met one of the main problems we have not yet resolved, and we are not able to find something about this on the forums / Articles.

    The problem is that the variables used in the script do not hold their values after the migration.
    This is for variables position and refreshment. If you refresh, the scenario looks to be pleasantly refreshing value, but this value is not used in interfaces that need to use it.

    Where (re) generate the scenario, the problem has disappeared, but since we have different versions of scenario in Dev and Prod, just team all scenarios is not the preferred solution.

    Could there be some missing link (s) between the tables in the repo work, which contains the metadata for the scenario and the variable metadata?

    All suggestions are welcome!

    See you soon,.
    RO

    Hi Rudyo,

    It seems that an update of the repository is necessary. The setting of variables seems to be wrong. Referential ODI11g in the table snp_scen_step a column is added: var_long_value.

    It seems that during the migration, the original field (var_value) is not moved to the new var_long_value field.

    Copy the contents of the old column to the new column will solve the problem.

    Update snp_scen_step set var_long_value = var_value where var_long_value is null.
    commit;

    Kind regards
    Martijn

  • Histograms and bind variables

    Hi guys,.
    When a SQL using bind variables histograms afftect the excution plan how?

    For example
    There is a table 'TEST' a column a number, varchar2 (100) b, c. tank (100).
    100000 rows in this table and the 90000 column rows a value is 1, the other value is 2-10 by 100rows.

    Now this column a histogram and a btree index only has on a;

    Here is sample code
    number of a_v var;
    exec: a_v: = 10;

    Select * from test where a =: a_v.

    The plan of the excution is full table scan.

    If I don't use of variable binding. It will scan the index.


    I remember that a document mentioned that "do not use histograms using bind variables.

    But why?

    I disabled same bind variable peeking?


    Thank you guys. Looking forward to your response.

    Longfei Wei says:
    Thanks Centinul this article is useful for me, but it is not explained why histograms do not work well with bind variables.

    Thanks again.

    Longfei,

    Jonathan Lewis article is very good - another look at this article. Histograms peuvent work with bind variable, but the end result is usually not the desired result. Bind variables are used to reduce the number of different execution plans. The histograms are used to find what is supposed to be the best execution plan for the predicates provided and in the case of the bind variables, those are peeked from the bind variable values. Thus, if you have a histogram on a column and for hard analysis of a SQL statement and the most common value in this column is presented in the binding variable - this execution plan is considered by the optimizer to be the 'best' execution plan for the bind variable values provided. Suppose now that instead the less popular value in the column is specified - the optimizer peut produce a very different for the same SQL statement execution plan, which is optimized for the less popular value (this can be a scan of the index systematic range, rather than a full table scan). Now suppose the execution plan may not change when change of variable values bind - if you have a single popular value and many unpopular values, if the analysis lasts is performed with the popular single value, you might find that all subsequent runs of this SQL statement to perform full table scans, even if only a few rows in the table are selected.

    Here's a quick test on the Oracle 11.2.0.2 database to demonstrate:

    CREATE TABLE T1 (
      C1 NUMBER,
      C2 NUMBER,
      C3 VARCHAR2(300));
    
    INSERT INTO
      T1
    SELECT
      *
    FROM
      (SELECT
        ROWNUM C1,
        DECODE(MOD(ROWNUM,100),99,99,1) C2,
        RPAD('A',300,'A') C3
      FROM
        DUAL
      CONNECT BY
        LEVEL <= 1000000)
    ORDER BY
      C2;
    
    CREATE INDEX IND_T1_C2 ON T1(C2);
    
    EXEC DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=>USER,TABNAME=>'T1',CASCADE=>TRUE,METHOD_OPT=>'FOR ALL INDEXED COLUMNS SIZE 254')
    

    The foregoing has created a table with 1 000 000 lines where 99% of the lines have a value of 1 in C2 and 1% have a value of 99, and lines are inserted with a perfect setting in cluster factor because of the ORDER BY clause. A histogram has been created on the indexed column.

    Let's try a test, we'll search a unpopular value 2 for the connection variable:

    VARIABLE N1 NUMBER
    EXEC :N1:=2
    
    SELECT /*+ GATHER_PLAN_STATISTICS */
      C1,
      C2
    FROM
      T1
    WHERE
      C2 = :N1;
    
    no rows selected
    
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'ALLSTATS LAST'));
    
    SQL_ID  c7su63uw7nch6, child number 0
    -------------------------------------
    SELECT /*+ GATHER_PLAN_STATISTICS */   C1,   C2 FROM   T1 WHERE   C2 =
    :N1
    
    Plan hash value: 236868917
    
    ------------------------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  |
    ------------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |           |      1 |        |      0 |00:00:00.01 |       3 |      1 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T1        |      1 |   5957 |      0 |00:00:00.01 |       3 |      1 |
    |*  2 |   INDEX RANGE SCAN          | IND_T1_C2 |      1 |   5957 |      0 |00:00:00.01 |       3 |      1 |
    ------------------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       2 - access("C2"=:N1)
    

    Thus, there is no selected row, the optimizer predicts that 5 957 lines would be returned and a path to the index has been selected. Path of this index would also be appropriate for the value of the bind variable 1? We will continue the trial, this time by choosing the 99 for the binding variable value:

    EXEC :N1:=99
    SET TIMING ON
    
    SELECT /*+ GATHER_PLAN_STATISTICS */
      C1,
      C2
    FROM
      T1
    WHERE
      C2 = :N1;
    
    ...
    10000 rows selected.
    
    Elapsed: 00:00:05.35
    
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'ALLSTATS LAST'));
    
    SQL_ID  c7su63uw7nch6, child number 0
    -------------------------------------
    SELECT /*+ GATHER_PLAN_STATISTICS */   C1,   C2 FROM   T1 WHERE   C2 =
    :N1
    
    Plan hash value: 236868917
    
    ---------------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    ---------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |           |      1 |        |  10000 |00:00:00.02 |    1783 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T1        |      1 |   5957 |  10000 |00:00:00.02 |    1783 |
    |*  2 |   INDEX RANGE SCAN          | IND_T1_C2 |      1 |   5957 |  10000 |00:00:00.01 |     690 |
    ---------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       2 - access("C2"=:N1)
    

    Once more, the optimizer predicts 5 957 lines could be found even if 10,000 rows have been retrieved. Note also that the number of children is always 0. We will continue the trial, this time with the bind variable value of 1:

    EXEC :N1:=1
    
    SET AUTOTRACE TRACEONLY STATISTICS
    
    SELECT /*+ GATHER_PLAN_STATISTICS */
      C1,
      C2
    FROM
      T1
    WHERE
      C2 = :N1;
    
    990000 rows selected.
    
    Elapsed: 00:00:18.78
    
    Statistics
    ---------------------------------------------------
              1  recursive calls
              1  db block gets
         108571  consistent gets
              0  physical reads
             96  redo size
       21958348  bytes sent via SQL*Net to client
         726508  bytes received via SQL*Net from client
          66001  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
         990000  rows processed
    
    SET AUTOTRACE OFF
    

    Because I used AUTOTRACE to prevent 990 000 lines scrolling on the screen, I have to specify the SQL_ID and CHILD_NUMBER to retrieve the execution plan:

    
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR('c7su63uw7nch6',0,'ALLSTATS LAST'));
    
    SQL_ID  c7su63uw7nch6, child number 0
    -------------------------------------
    SELECT /*+ GATHER_PLAN_STATISTICS */   C1,   C2 FROM   T1 WHERE   C2 =
    :N1
    
    Plan hash value: 236868917
    
    ---------------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    ---------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |           |      1 |        |  10000 |00:00:00.02 |    1783 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T1        |      1 |   5957 |  10000 |00:00:00.02 |    1783 |
    |*  2 |   INDEX RANGE SCAN          | IND_T1_C2 |      1 |   5957 |  10000 |00:00:00.01 |     690 |
    ---------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       2 - access("C2"=:N1)
    

    Who can be the execution plan that was used because it shows that 10,000 rows have been retrieved. We will try again, this time with CHILD_NUMBER 1:

    
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR('c7su63uw7nch6',1,'ALLSTATS LAST'));
    
    SQL_ID  c7su63uw7nch6, child number 1
    -------------------------------------
    SELECT /*+ GATHER_PLAN_STATISTICS */   C1,   C2 FROM   T1 WHERE   C2 =
    :N1
    
    Plan hash value: 3617692013
    
    ------------------------------------------------------------------------------------
    | Id  | Operation         | Name | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    ------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT  |      |      1 |        |    990K|00:00:00.83 |     108K|
    |*  1 |  TABLE ACCESS FULL| T1   |      1 |    988K|    990K|00:00:00.83 |     108K|
    ------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       1 - filter("C2"=:N1)
    

    The foregoing shows the actual plan that has been used. Sharing the adjustment slider (first available with Oracle Database 11.1) is reached and forced to re-evaluate the execution plan to avoid a very slow recovery through the index - which won't happen before 11.1 database Oracle.

    Just to illustrate:

    ALTER SESSION SET OPTIMIZER_FEATURES_ENABLE='10.2.0.4';
    
    VARIABLE N1 NUMBER
    EXEC :N1:=2
    
    SELECT /*+ GATHER_PLAN_STATISTICS */
      C1,
      C2
    FROM
      T1
    WHERE
      C2 = :N1;
    
    no rows selected
    
    Elapsed: 00:00:00.00
    
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'ALLSTATS LAST'));
    
    SQL_ID  c7su63uw7nch6, child number 2
    -------------------------------------
    SELECT /*+ GATHER_PLAN_STATISTICS */   C1,   C2 FROM   T1 WHERE   C2 =
    :N1
    
    Plan hash value: 236868917
    
    ---------------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    ---------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |           |      1 |        |      0 |00:00:00.01 |       3 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T1        |      1 |   5957 |      0 |00:00:00.01 |       3 |
    |*  2 |   INDEX RANGE SCAN          | IND_T1_C2 |      1 |   5957 |      0 |00:00:00.01 |       3 |
    ---------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       2 - access("C2"=:N1)
    

    Note in the above that the CHILD_NUMBER is now 2.

    Continues:

    EXEC :N1:=99
    SET TIMING ON
    
    SELECT /*+ GATHER_PLAN_STATISTICS */
      C1,
      C2
    FROM
      T1
    WHERE
      C2 = :N1;
    
    10000 rows selected.
    
    Elapsed: 00:00:05.31
    
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'ALLSTATS LAST'));
    
    SQL_ID  c7su63uw7nch6, child number 2
    -------------------------------------
    SELECT /*+ GATHER_PLAN_STATISTICS */   C1,   C2 FROM   T1 WHERE   C2 =
    :N1
    
    Plan hash value: 236868917
    
    ---------------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    ---------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |           |      1 |        |  10000 |00:00:00.02 |    1783 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T1        |      1 |   5957 |  10000 |00:00:00.02 |    1783 |
    |*  2 |   INDEX RANGE SCAN          | IND_T1_C2 |      1 |   5957 |  10000 |00:00:00.01 |     690 |
    ---------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       2 - access("C2"=:N1)
    

    The CHILD_NUMBER is always 2.

    Continues:

    EXEC :N1:=1
    
    SET AUTOTRACE TRACEONLY STATISTICS
    
    SELECT /*+ GATHER_PLAN_STATISTICS */
      C1,
      C2
    FROM
      T1
    WHERE
      C2 = :N1;
    
    990000 rows selected.
    
    Elapsed: 00:00:16.91
    
    Statistics
    ---------------------------------------------------
              0  recursive calls
              0  db block gets
         175927  consistent gets
              0  physical reads
              0  redo size
       21958348  bytes sent via SQL*Net to client
         726508  bytes received via SQL*Net from client
          66001  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
         990000  rows processed
    
    SET AUTOTRACE OFF
    
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR('c7su63uw7nch6',2,'ALLSTATS LAST'));
    
    SQL_ID  c7su63uw7nch6, child number 2
    -------------------------------------
    SELECT /*+ GATHER_PLAN_STATISTICS */   C1,   C2 FROM   T1 WHERE   C2 =
    :N1
    
    Plan hash value: 236868917
    
    ---------------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name      | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    ---------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |           |      1 |        |    990K|00:00:01.63 |     175K|
    |   1 |  TABLE ACCESS BY INDEX ROWID| T1        |      1 |   5957 |    990K|00:00:01.63 |     175K|
    |*  2 |   INDEX RANGE SCAN          | IND_T1_C2 |      1 |   5957 |    990K|00:00:00.68 |   67932 |
    ---------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       2 - access("C2"=:N1)
    

    The foregoing is the execution plan for CHILD_NUMBER 2 - notice that this time he reports 990 000 recovered lines, it's the execution that was used - adaptive cursor sharing plan do not have take effect and force the re-evaluation of the implementation plan - implementation plan has NOT been changed for a full table scan. That's the risk you take if you allow histograms on columns that have an uneven distribution of values and bind variables are used in the WHERE clause that refers to the column.

    Charles Hooper
    Co-author of "Expert Oracle practices: Oracle Database Administration of the Oak Table.
    http://hoopercharles.WordPress.com/
    IT Manager/Oracle DBA
    K & M-making Machine, Inc.

  • literal and bind variables

    Hello

    What is the difference between literal and bind variables?
    What happens if I use
    literal variable has.
    variable b.bind

    who is suggested?

    Kind regards
    KKK

    There are two phases of any SQL performance.

    1. analysis (check Oracle this SQL syntax, also generates the implementation PLAN)
    2. execution (the real execution takes place)

    Below, SQL.

    Select * from emp where empno = 1234;

    I used literal in the SQL above.

    For each SQL type similar (average for empno modified value) oracle must analyze the SQL for each performance.

    Select * from emp where empno =: v_emp_no;

    I used the bind variable in the SQL above.

    In the oracle SQL above needs to analyze once, next time ehen this SQl will be executde with the value of the bound different variable, oracle will use the old execution PLAN and analysis will be not not happed. It will be a little fast.

    Also variable binding instead of literal use reduced use shared pool.

    HTH

    Best regards
    oratest

  • DLL and global variables

    OK, here's a strange problem.  I am very new to create the dll, so I don't know that I have just an installation problem.

    But I'm trying to pass a global variable of a host program to its attached DLL.  I got this job when I was the CVI 2014. I recently upgraded to 2015 and then started getting "undefined symbols" errors.  With some struggle I managed to compile again, but broke the variable connection in the process.

    I have compiled my DLL in debug mode so that I walk in from the test project.  Right now, my global variable exists in the test project, as well as in the DLL.

    Can I export the variable and the use of DLLIMPORT/DLLEXPORT?  Confused and curiously not to find anyone quite like this on the forums.

    EDIT: this post stack overflow described pretty well from my experience.  I am linking statically.

    Well, what do you know?  I found my problem.  This draft article and example WERE vital to the solution.  This article called, "using the Export method qualifier"was also useful.  I'll cut to the Chase...

    If you use a qualifier of export on the definition and the import on the declaration, LabWindows/CVI identifier export symbol.

    This is the right key.

    So in my example, it should look like this:

    DLL fichier.c

    int DLLEXPORT varName = 0;

    Header.h DLL

    int DLLIMPORT varName;

    Project that uses DLL.c

    #include "header.h DLL.

    varName! = 1 ;  a method to change this variable for local use

    Pretty easy, huh?  But wow, it took some time to find.

  • How to get the active directory and environment variables

    Hello

    1 - is there a global variable to get the real (project, where is ORD and DSQ files) directory?

    2.-y there a way to get the directory of the user as the reading of the operating system environment variables?

    Thanks in advance.

    PD: I use Dasylab12

    Yes, use ropes of system

    For example, ${DATA_FOLDER}.

    For a list, the simplest method is to right click and select global chains. The lower half of the dialog box lists the system strings, including the date, time, name of the worksheet, with or without a path, the DEFAULT folders for the spreadsheet, data, other, black box, etc.

  • Get local and global variables using API

    Hi, I do in LV a Publisher for TS. The user should be able to change the value of global variables and the inhabitants of file. Using the TS API, it is possible to get all files of Globals and locals without knowing the name of these variables have ts? I mean, if I knew the name I could use the value of property Get with the search string. But if the I do not know the name of the variable, can I get the list (and their values) of the variable?

    Thank you very much.

    Try the following link

    http://forums.NI.com/NI/board/message?board.ID=330&message.ID=3390&query.ID=6624776#M3390

    In summary:

    Use the GetNumSubProperties method to get the total number of inhabitants / FileGlobals.

    Use GetNthSubProperty to get sub properties using the index starting with 0 to GetNumSubProperties-1

    Use the Name property to get the name of the subproperty.

    Concerning

    Ray Farmer

Maybe you are looking for