tables dynamic thread-safe

Hi all

trying to convert my application single-threaded for multithreading, that I met a new obstacle:

I would like to have a global data structure. This structure must be dynamically allocated and reallocated as the number of threads (and thus the size of the structure) depends on the program execute / user.

The main thread as long as secondary threads should be able to access this structure, so I need to use a variable in thread safe, somehow. All the samples I've traveled so far, either use a single variable using the DefineThreadSafeScalarVar macro, or an array of size fixed by using the DefineThreadSafeArrayVar macro.

I haven't found an example of this type of a dynamic array, unfortunately... Some kind soul would be willing to teach me how to proceed?

Thank you

Wolfgang

In your case, you must use a TSV scalar that contains the pointer is allocated/re-allocated. See the following example of a TSV that mimics a dynamic array of integers. In some cases, a better solution would be to have a TSV scalar that contains a list, say, box tools ListType.

#include

DefineThreadSafeVar (int *, DynMem);

void main (void)
{
int * pDynMem, i.;
   
Initialize the TSV
InitializeDynMem();
   
Define HSV 'table' to hold 10 integers
SetDynMem (malloc (10 * sizeof (int)));
   
Set and get the 'elements' of TSV
pDynMem = GetPointerToDynMem();
for (i = 0; i< 10;="">
{
(* pDynMem) [i] = i;
printf ("DynMem [%d] = %d\n", (* pDynMem) [i], i);
}
ReleasePointerToDynMem();
   
Resize the TSV "array".
pDynMem = GetPointerToDynMem();
* pDynMem = realloc (* pDynMem, 20 * sizeof;)
for (i = 10; I)< 20;="">
(* pDynMem) [i] = i;
for (i = 0; i< 20;="">
printf ("DynMem [%d] = %d\n", (* pDynMem) [i], i);
ReleasePointerToDynMem();
   
Free TSV "array".
pDynMem = GetPointerToDynMem();
Free(*pDynMem);
ReleasePointerToDynMem();
   
Cancel initialization of TSV
UninitializeDynMem();
}

Tags: NI Software

Similar Questions

  • Are thread-safe queues

    Hi all

    Are secure i.e. thread queues are enqueue, dequeue Atomic etc?

    I'm looking to use queues to transfer objects between concurrent loops States, but am worried if I need to protect the access via a semaphore.

    Thank you

    Phill

    Yes.  Queue operations are atomic.  It is safe to assume that everything in LabVIEW is thread-safe, unless otherwise stated, it is since always a language designed for operation in parallel.

  • Thread Safe variables - several symbol at link definitions

    I'm going through the tutorial "Multithreading in LabWindows/CVI.

    The following line is in the tutorial about the variables in Thread-Safe:

    "If you need to access the variable in thread-safe from more than one file source, use the macro DeclareThreadSafeScalarVar or DeclareThreadSafeArrayVar in an include (.h) file for create statements for the accessor functions."

    OK works with a source file, but when I include the header file in a second file from the source, I have "Several definitions for symbol" errors when link for all functions of accessor in the two source files.

    It's probably something simple, but after a few hours I'm at a loss. Any ideas are appreciated.

    Scott T

    You should have DefineThreadSafeXXX in exactly a source file and a DeclareThreadSafeXXX in any number of source files (or in a file header included in the source files). The following works for me in 2012 of the CVI:

    / * temp.h * /.

    #include

    DeclareThreadSafeScalarVar (double, Num);

    void test (void);

    * Temp.c * /.

    #include "temp.h".

    DefineThreadSafeScalarVar (double, Num,-1);

    void main (void) {}

    InitializeNum();

    test();

    }

    / * temp2.c * /.

    #include "temp.h".

    void test (void) {}

    SetNum (1.0);

    }

  • BBM SDK Thread Safe?

    Anyone know if the messages sent/received are thread-safe, or do we do us our own synchronization to ensure that a new message does not come before the end of the old?

    In this case messages would be delivered in the order they are received.  Each call is on the same thread.

  • Does container managed entity manager is thread-safe in stateless session bean?

    Hello

    I have read JEE6 doc and confused with

    Manager managed entity containing does (injected by PersistenceContext annotation) is thread-safe in bean of stateless session in env mutiple-thread?

    See code below, if there are 2 requests to stateless session bean in 2 concurrent threads, is it using the same Instance of the managing body or not?

    @Stateless (name = "HRFacade", mappedName = "HR_FACES_EJB_JPA-HRFacade-HRFacade")

    / public class HRFacadeBean implements HRFacade, HRFacadeLocal {}

    @Resource

    SessionContext sessionContext;

    @PersistenceContext (unitName = "HRFacade")

    Private EntityManager em;

    public places (places sites) persistLocations {}
    EM. Persist (rentals);
    return places;
    }

    public places (places sites) mergeLocations {}
    Return em.merge (rentals);
    }

    {} public void removeLocations (places sites)
    location = em.find (Locations.class, locations.getLocationId ());
    EM. Remove (rentals);
    }

    / * < code > o selection of the places where < code > * /.
    @TransactionAttribute (TransactionAttributeType.NOT_SUPPORTED)
    public list < location > getLocationsFindAll() {}
    Return em.createNamedQuery ("Locations.findAll", Locations.class) .getResultList ();
    }

    }

    Yes its safe. Stateless beans would be useless if it wasn't the case. That's the bit of "controlled container" description, as long as you leave the container do its job, you don't have to worry about such details.

  • OTMQ + JCA - it is thread-safe?

    Hello

    Currently, we are conducting a doubt in our minds regarding using the OTMQ with a JCA component. We build into our architecture a component in order to call by a java bean that is deployed inside a WL server, an OTMQ instance that is running on the same machine. This OTMQ instance is the platform independent (not Tuxedo + OTMQ) OTMQ and on the side of Java, we would use a mixture of JCA and, if necessary, JNI calls to establish a connection between these two components.

    My question here is, because WL will have multiple instances of this bean, are there problems I should be aware with respect, using multiple threads in such a component? In my view, that should we not we have no problem with that, given that OTMQ works similar like Tuxedo/q, but I was wondering if there is something you miss here.

    If you could just help me understand if I am having trouble with this architecture, I would be very grateful.

    Thank you

    brunno Attorre

    Hi Brunno,

    The JCA adapter is thread-safe, and if you find any problems associated with the JCA adapter threads, report it to the Support of Oracle.  About OTMQ, in my opinion, that these libraries are thread-safe, you can create an OTMQ multi-threaded server, but we do not support the use of JNI to call one of our libraries.  Why would you use JNI?  You can simply use the JCA/waiting for Message Queuing adapter.

    Kind regards

    Todd little

    Chief Architect of Oracle Tuxedo

  • Is JTextArea append() method thread-safe?

    It was noted in another ad that in JDK 7, the JTextArea append() method is more explicitly described as being thread-safe:

    http://download.Java.NET/jdk7/docs/API/javax/swing/JTextArea.html#append
    I do not use JDK7, but here is the code for the method append in JDK6_7 (I guess that he has not changed in JDK7?):
    public void append(String str) {
        Document doc = getDocument();
        if (doc != null) {
            try {
                doc.insertString(doc.getLength(), str, null);
            }
            catch (BadLocationException e) {
            }
        }
    }
    As you can see the code simply calls the insertString (...) method of the Document. JDK7 documentation, the insertString (...) method is still marked as being thread-safe:

    http://download.Java.NET/jdk7/docs/API/javax/swing/text/PlainDocument.html#insertString

    I always confused when you work with Threads. A few questions:

    (1) if the append() method eventually calls insertString (...), which is a safe method of thread that does the method append() safe thread?

    (2) assuming that the code in the method append has not changed in JDK 7 documentation has been bad for the first 6 versions of the JDK? Or is the documentation for JDK 7 lack instruction thread safe?

    (3) I know in the past I've suggested append() is thread-safe. It seems I should change my advice to wrap this method in a SwingUtilities.invokeLater (...). Is this a safe approach in any case to avoid confusion?

    camickr wrote:
    The PlainDocument does not use a lock. Here's the code for the JDK6:

    The lock is #insertString AbstractDocument. The additional filter of PlainDocument #insertString code is thread-safe, because it uses only local variables and GetFilter() reading is true or false/null.

    Even if filtering is not done, is it not theoretically possible that change of threads can occur before the super.insertString (...) is running?

    I guess what I'm asking is that if a single line of code runs before the writeLock() method is called is there way for there to be threading issues?

    Yes, but it's similar to the way in which a synchronized map is thread-safe, you can call containsKey (k) followed by get (k), and these methods are "thread-safe", but if you want to combine you need to do an extra lock. The only thread safe object is immutable.
    One difference here is that a card will return NULL but AbstractDocument launches a BadLocationException. Also if you want to get the lock, the only option is to subclass since writeLock() is protected and final.

  • Rename the name of the table dynamically in a loop

    Hi all

    It might not be the best solution, but it is a starting point for me. I have tables: x1_old, x2_old... x1_new, x2_new...
    When I receive new tables, it's x 1, x 2... You need 3 things:
    1 x1_old, x2_old must be removed
    2 x1_new, x2_new must be renamed to x1_old, x2_old
    3 x 1, x 2 tables can be renamed to x1_new, x2_new.

    I hope this makes sense.

    I managed to drop the tables dynamically(step 1). But impossible to apply a similar approach to rename (step 2 and 3).

    Following the code gives an error: ORA-00900: invalid SQL statement

    DECLARE
    x NVARCHAR2 (50): = ";
    y NVARCHAR2 (50): = ";
    BEGIN

    -Rename tables ending in 'NEW' for 'OLD '.
    FOR x IN (SELECT table_name
    From all_tables
    Owner WHERE to = "OWNER_X."
    AND SUBSTR (table_name,-3) = 'NEW')
    LOOP
    y: = SUBSTR (x.table_name, 1, INSTR (x.table_name, 'NEW') - 1) | 'OLD ';
    EXECUTE IMMEDIATE 'Rename ' | x.table_name | « à » || y;
    END LOOP;
    END;
    /

    I read that I can't use DOF with Execute imeediate. No work around? Or different approach?

    Thank you

    I had where you went wrong.

    SQL> ed
    Wrote file afiedt.buf
    
      1  DECLARE
      2  x NVARCHAR2(50) := '';
      3  y NVARCHAR2(50) := '';
      4  BEGIN
      5  --Rename tables that end with 'NEW' to 'OLD'
      6  FOR x IN (SELECT table_name
      7  FROM all_tables
      8  WHERE owner = 'HR'
      9  AND SUBSTR(table_name, -3) = 'OLD')
     10  LOOP
     11  y := SUBSTR(x.table_name, 1, INSTR(x.table_name, 'OLD') - 1) || 'NEW';
     12  dbms_output.put_line('ALTER TABLE ' || x.table_name || ' rename to ' || y);
     13  EXECUTE IMMEDIATE 'ALTER TABLE ' || x.table_name || ' rename to ' || y;
     14  END LOOP;
     15* END;
    SQL> /
    ALTER TABLE X1_OLD rename to X1_NEW
    DECLARE
    *
    ERROR at line 1:
    ORA-00900: invalid SQL statement
    ORA-06512: at line 13
    

    Now updated the code

    SQL> ed
    Wrote file afiedt.buf
    
      1  DECLARE
      2  x VARCHAR2(50) := '';
      3  y VARCHAR2(50) := '';
      4  BEGIN
      5  --Rename tables that end with 'NEW' to 'OLD'
      6  FOR x IN (SELECT table_name
      7  FROM all_tables
      8  WHERE owner = 'HR'
      9  AND SUBSTR(table_name, -3) = 'OLD')
     10  LOOP
     11  y := SUBSTR(x.table_name, 1, INSTR(x.table_name, 'OLD') - 1) || 'NEW';
     12  dbms_output.put_line('ALTER TABLE ' || x.table_name || ' rename to ' || y);
     13  EXECUTE IMMEDIATE 'ALTER TABLE ' || x.table_name || ' rename to ' || y;
     14  END LOOP;
     15* END;
    SQL> /
    ALTER TABLE X1_OLD rename to X1_NEW
    ALTER TABLE B_OLD rename to B_NEW
    ALTER TABLE A_OLD rename to A_NEW
    
    PL/SQL procedure successfully completed.
    
  • is NamedCache thread-safe?

    Hello

    I use coherance NamedCache (say "TradeCache"), to store objects in the cache.

    My application is designed so that multiple threads can place data in "TradeCache" at the same time.

    What kind of thread safety, we need to take care of?

    Hi user 1696.

    With regard to your questions:

    (a) what kind of locking is used, is that they lock the entire map?
    (b) or basic locking key is made?

    Coherence use essential basic locking.

    (c) if by default all implementations are thread-safe, which is the use of namedcache.lock () api

    NamedCache.lock () is provided so that applications that make use of coherence can have some control over several readers and/or authors using the same object in space of the application. This is not to prevent corruption in the cache store. It must provide a way for applications to control the race as conditions have several operations on the same object at the same time. So that the application can control which of the puts should occur for example.

    Can you please me to any document (short & concise) cohernace good.

    You can find pointers to official documentation and white papers, among others to the OTN on Oracle coherence page following

    http://www.Oracle.com/technology/products/coherence/coherence_suite.html

    and there is also a wealth of information on the site of the Oracle coherence Knowledge Base at:

    http://coherence.Oracle.com

    In regards to your 2nd question about 2 java clients using the same NamedCache and do put and remove operations, you can provide more details on your example? Java clients 2 performing put or remove on the same object or different objects?

    Patrick

    Published by: P Fry on April 30, 2010 12:09

  • SimpleParser consistency class is not thread-safe?

    Coherense has the utility class to XML very convinent which we use it a lot in our coherence-related applications.

    But meet us some lock mysterious question (dead end, maybe?) and have identified that it would be that the com.tangosol.run.xml.SimpleParser class is not thread-safe.

    We use tomcat 6 and Spring 2.0.6.

    Application Web has 2 bean that implements the InitializingBean interface.

    Bean A afterPropertiesSet() method will use com.tangosol.run.xml.XmlHelper.loadXml method to parse a XML file.
    Method of Bean B afterPropertiesSet() will acts as a tcp expand clients and retrieve data from a cluster of coherence. Which, I think, consistency will also use XML class useful during parsing of the configuration files.

    We meet randomly blocking of tomcat (which never end starting webapp deployment alternation) as 1 on 2 or 3 tests.

    Use of jconsole and tomcat connection we can see that the main thread stuck in the class SimpleParser. Here's the thread dump.

    Name: main
    State: EXECUTABLE
    Blocked in total: 156 Total expected: 0

    *************************************************************************************************

    Stack trace:
    com.tangosol.run.xml.SimpleParser.instantiateDocument(SimpleParser.java:150)
    com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:115)
    -locking com.tangosol.run.xml.SimpleParser@f10c77
    com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:71)
    com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:84)
    com.tangosol.run.xml.XmlHelper.loadXml(XmlHelper.java:109)
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
    org.springframework.beans.factory.support.AbstractBeanFactory$ 1.getObject(AbstractBeanFactory.java:251)
    org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
    -locking java.util.concurrent.ConcurrentHashMap@dee55c
    org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
    org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
    org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
    org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
    -locking java.lang.Object@d21555
    org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
    org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
    org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
    org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
    org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
    -locking org.apache.catalina.core.StandardContext@1c64ed8
    org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    -locking java.util.HashMap@76a6d9
    org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
    org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
    org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
    org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
    org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    -locking org.apache.catalina.core.StandardHost@1c42c4b
    org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    -locking org.apache.catalina.core.StandardHost@1c42c4b
    org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    -locking org.apache.catalina.core.StandardEngine@37fd24
    org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    org.apache.catalina.core.StandardService.start(StandardService.java:516)
    -locking org.apache.catalina.core.StandardEngine@37fd24
    org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    -locked [Lorg.apache.catalina.Service;@1cc55fb
    org.apache.catalina.startup.Catalina.start(Catalina.java:566)
    sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
    java.lang.reflect.Method.invoke (unknown Source)
    org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:413)

    *************************************************************************************************

    After we have add the tag is based on applying bean B wait on A bean to complete initialization, we encounter is no longer blocked when starting tomcat.

    We suspect that maybe SimpleParser class is not thread-safe and will cause potential deadlock issue.

    Published by: user639604 on June 22, 2009 10:36

    It seems that the 'hand' thread comes to the point that he is responsible for the class of SimpleDocument around the same time as the thread "Timer-0"comes to the point where he is in charge of the class ExternalizableHelper. According to what son get on-demand, if the loading of the class ExternalizableHelper happens point of needing to SimpleDocument after the main thread starts to load SimpleDocument, then a deadlock (inside the JVM loading infrastructure class) happen.

    While you are correct that it is our fault (we shouldn't have used a subset of the ExternalizableHelper static initializer), there is probably a simple solution; Just do the following in an initializer static for your first loads or the classes related to the coherence, for example ClusterConfigurator and OPCacheManager:

    static
      {
      // this should force the ExternalizableHelper class to be loaded
      ExternalizableHelper.makeTrint(0L);
      }
    

    Peace,

    Cameron Purdy | The Oracle coherence

  • Thread safe operations on the table in the pl/sql procedure?

    I develop java application that will run in N locations simultaneously, each application will be of the sons of Mr. each thread takes a unique ID with the NOT_TAKEN State of the queue table and changes its status to TAKEN.
    Problem:
    How to prevent situation like this thread:
    1 get a first select ID with NOT_TAKEN status
    2. at the same time thread B select first (so it will be the same ID chosen thread A) ID have the status of NOT_TAKEN.
    3 put on a status of changes of identity and
    4 thread B status of the TAKEN ID changes
    After this thread A and B using the same ID.

    What I did:
    I've written pl/sql procedure that queue table in exclusive mode lock, selects the first ID, changes its status to CATCH and unlocks the table. Because it is lock in exclusive mode for a single thread can run this procedure at the same time.

    Question:
    Optimal how must it be resolved, because mine solution prevents to perform all the other updates on the queue table, while it is locked, as the change in status of OPERATION_DONE TAKEN so there performance problem.

    As Centinul said, you need to lock just one line.
    I would just add NOWAIT to the select statement to let the Java thread go and try again, rather than wait for other threads.
    Example: (not tested)

    
    --
    -- Assuming structure of your QueueTable: ( IDCol is PK , StatusCol is VARCHAR2, ... )
    --
    --
    -- or make it part of the package....
    CREATE OF REPLACE
    FUNCTION updateQueue( nQID QueueTable.IDCol%TYPE) RETURN VARCHAR2 AS
       eLocked EXCEPTION;
       PRAGMA EXCEPTION_INIT(eLocked,-54);
       CURSOR curQueueTable IS SELECT 1 CNTR FROM QueueTable WHERE IDCol=nQID AND StatusCol='NOT_TAKEN' FOR UPDATE OF StatusCol NOWAIT;
       recQueueTable curQueueTable%ROWTYPE;
       cRtn VARCHAR2(1); 
    
    BEGIN 
    
       cRtn := 'Y';
       BEGIN 
    
          OPEN curQueueTable;
          FETCH curBuffSummary INTO recQueueTable;
          CLOSE curQueueTable; 
    
          IF recQueueTable.CNTR IS NOT NULL AND recQueueTable.CNTR = 1 THEN
              UPDATE QueueTable SET StatusCol = 'TAKEN' WHERE IDCol=nQID;
          ELSE
              -- Already updated
              cRtn := 'N';
          END IF; 
    
             -- You can control your transaction here as well
             -- COMMIT;
             -- But if realy should be done in the Java thread. 
    
        EXCEPTION
           WHEN eLocked OR STANDARD.TIMEOUT_ON_RESOURCE THEN
           -- Thread could not get exclusice row lock. Ignore error.
             cRtn := 'N';
             NULL; 
    
          WHEN OTHERS THEN
             -- Handle other errors...
             -- NULL; just kidding...
             RAISE;
       END;
       RETURN cRtn; 
    
    END; 
    

    Published by: thomaso September 18, 2009 10:30

  • Complete a teststand thread safe

    Hello

    I created a vi using the audio wizard and vibrations. He simpply plays a tone of 1 kHz. I start it to use a new thread execution in TestStand (generate the audio wire)

    I then proceed to route the audio from my USE speaker R - the operator must then select the pass/fail if hear sound out of the speaker.

    Then, I continue to send the sound to the speaker L and provide a pass/fail another popup.

    I wonder how I can kill the audio thread 'generate' without including a timeout routine in my vi?

    Not sure if this is possible or safe?

    Thanks & best regards,

    Shane.

    Hey Don1,.

    It seems that this could be an easy fix if I understand your problem. The idea is to have the operator, click go, and then a tone is played on the right side, they confirm / deny hearing it and then it moves on the left side and confirm or deny. The best way to take care of this would be to use only one step for each audio side, for a total if you want, but the idea is to have the LabVIEW to hold the popup of user until the user interacts with it. This could be accomplished with separate vi have by a dialog box pop-up in a while loop when the right audio is running, once the user confirms audio, it stops the loop and returns the result to TestStand. They can then move to the left audio in the same way. If you prefer this in one step, you could use consecutive while loops to hold the user up to the interaction operator dialog box and then move on to the next audio side and then pass the results back as needed.

    Thanks again,

    Nick

  • Select items in a table dynamically

    Hello...

    I am writing a program where you can choose the elements of the array dynamically from the Panel when the VI is in run mode.

    So far, that ic_opendevice.VI gives me different video formats [it is a 1 d array], at the moment, I guess as the penultimate among this table as an example. But, I want to design the program so that the user can select any Format of video of the façade. How to achieve this?

    Block diagram:

    Front panel:

    Why you did not update in video format in the structure of the event?  You can use the 'video 2' Format: value change event.  Then, everything is in a single loop.

    And you don't need to wait in your upper loop because the event structure will take care of your timing.

  • table dynamic allocation labwindows CVI

    LabWindows CVI there a way to create a dynamic table? A table that contains a variable amount of memory.

    calloc () can be used in CVI to dynamically create a table of desired size, or a standard data type (int, double...) or a data type custom as a struct.

    Dynamically allocated memory must be released with free () when it is no longer used.

    Double * array = NULL;    Set the table pointer

    Array = calloc (numElements, sizeof (double));    Allocate memory and elements of al inizialize 0

    ... to use the elements in the array

    free (matrix);     Allocated dynamically free memory

  • How to make my tables not threadding to a new page up to filling the page that I am?

    HEADHACE.jpg

    After the 1st row, 2nd row supposed to be on the bottom of the 1st page... but it is happen otherwise it's keep threadding to a new page... This is also happening to the 3rd row... Anyone here know how to fix it...? I use already 5 hours just to solve this prob, but nothing happens... x_X

    Hello h,

    It's the way you have structured the table.

    The first column is merged for a number of lines, making it a very "high" line ID split the line automatically...

    / G

Maybe you are looking for

  • After sorting the bookmarks are not sorted. Why?

    After finding the sort under view feature not organize, I have them sorted by alphabetical order. I did this several times using the alphabetical feature and functionality from A to Z, but they come back in a random order in the bookmarks Show menu a

  • How to program a remote adjustent with a Laser sensor and a pressure valve

    Hallo, I'm looking for a solution set a monostable pneumatic cylinder via a laser sensor and a pressure valve. The Laser sensor and the valve has a domain controller as a signal input/output. The position of the cylinder is controlled by the laser se

  • color faded with MG 7120

    I'm finally moving to pix to print color on my MG7120 (with Mac Photoshop Elements file 10.6.8}. The picture is bright, saturated and contrasty. Printing is flat and unsaturated almost to be a monotonous. I use glossy photo paper and have chosen high

  • AO725 Netbook - poor youtube / netflix performance

    Hey guys.  Bought a netbook Acer AO725-0826 in November last year and I had some problems with it. There the processor C-70, a dual-core 1.0 (apparently up to 1.3, but I never see on 1.3 GHz).  The problem is that this thing can't even steam netflix

  • Need drivers for Dell Latitude E6520 "Broadcom USH" &amp; "Mass storage controller" Windows 7 64 bit

    Need the drivers mentioned above.  I installed virtually every driver available in the download for the driver page Inc. Control Vault and cannot get the two driver mentioned. Any help would be appreciated