Setting Values in an Array of Clusters via COM

Hello everybody,
I need some help concerning LabView and COM (ActiveX).
I'm working on NT 4.0 with LabView 5.1 and I've written a COM-Client in Visual
C++ 6.0 which controls LabView.
I can set the values of normal Controls, Arrays and Clusters.
But I'm not able to set values for an array of clusters.
Does anybody know how to do this ?
Or is it impossible ?
Many thanks in advance,
Ralf Erdmann

>> I need some help concerning LabView and COM (ActiveX).>> I'm working on
NT 4.0 with LabView 5.1 and I've written a COM-Client in Visual>> C++ 6.0
which controls LabView.>> I can set the values of normal Controls, Arrays
and Clusters.>> But I'm not able to set values for an array of clusters.>>
Does anybody know how to do this ?>> Or is it impossible ?>> >>With no more
information, the my answer is, I'm not sure. It is generally>possible to
set controls by constructing a matching Variant. Make the>array a safe-array,
the cluster a safe-array, and the elements of the>cluster be variants of
compatible types to what is in the array.>>If you can't get it to work from
this, you may want to include the>LV datatype in an email and contact support.>>
Please allow
me to get more precise.
For my testings I used a cluster with just one element (type double)
in an one-dim array with just this cluster as only element.
A LV-Cluster is represented as an array of variants in COM.
So I have an array of arrays. With an array beeing no datatype
I don't know how to put an array into an array to
construct a variant to pass to LV.
How can I solve this?
Thanks for help.
Ralf Erdmann

Similar Messages

  • How can I modify the cluster values in an array of clusters?

    Hi all - I can't believe that I am having trouble with this but for some reason I am completely wrapped around the axel with it. I have an array of clusters, they are all strings but with different names. I am using key configuration VIs to setup a readable text file for the user. I also want the user to be able to load up the array of clusters with the values that are in the text file. So I am reading the keys and trying to populate the array of clusters to show what is in the text file and then run the test using those values. However I am not able to get the clusters populated correctly. Does any one have an example of what I am trying to do? Basically I am trying to populate an existing array of clusters with new values. That is what it comes down to. Thanks in advance for any help.

    Go to jki and dowload VIPM (VI Package Maager). From there you ca install OpenG. Lot's of useful stuff.
    Also if you cosider XML to be readable you can use flatten to/from XML.
    =====================
    LabVIEW 2012

  • How to display updated values in an array of clusters?

    Hi all!
    I am designing and coding a LabView application. In one of the modal dialog boxes of the application, I have to dynamically create an array of a cluster in the front panel. The array of the cluster is one dimensional. The number of rows of the array control containing the clusters is dynamic, depending on the user input. I have selected number of rows of the array as 4 in the test vi. The number of columns is fixed to 1.
    The cluster comprises of two elements - a numeric indicator labeled "Machine #" and a radio button control with three choices. The three choices are "Pump", "Compressor", and "Fan". I am assigning a machine number to the numeric indicator in the cluster during initialization of the screen. Similarly, I am assigning a default selection - "Compressor", among the three choices of the radio buttons of the cluster. This is done for each element of the array.
    As far as I can figure out, I am assigning these values correctly. However, I am unable to see the changes on the front panel in the values of the elements within the cluster during the run time. What am I doing wrong? How can I solve this problem?
    I am uploading the test vi that I have written till now. Any help is much appreciated. Thanks a lot in advance.
    Sincerely,
    Aninda

    Hi!
    Maybe, I forgot to attach the VI in my previous posting. Here it is.
    Sincerely,
    Aninda
    Attachments:
    SetupScrn2.vi ‏59 KB

  • How to set values in 2D-Array?

    Hello,
    I need some help in creating a 2D-array from some input-arrays
    1) The string-array with three values should be in first postion
    2) Then there is another 2D-array that contains 3 times 10 values.
    I want to show now these ten values in the three columns.
    How can this be done?
    Thank you
    Solved!
    Go to Solution.

    Personally, I would use a table with the colum headers visible.  You can then set your headers to be your first array.
    As far as your numbers, use one of the functions in the String->Number/String Conversion palette to change your numbers into a string.  Choose whichever conversion you need based on the format you want.  You can then have a 2D array of strings to pass into your table.
    Or if you insist on using an array, use Build Array to conbine your header array with your data array.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Different set of values for two rings in an array of clusters

    Hi, people.
    Is it possible to do what it's shown in the attached picture?
    I have an array of clusters. Two elements of the cluster are rings. Can I define a different set of values in the second ring (the one at the right) depending on the value selected in the first ring (the one in the middle)?
    If not, could you give me a good alternative?
    Thanks,
    FranciscoMensaje editado por Porras
    Attachments:
    Rings.jpg ‏270 KB

    I'm trying to do something very similar to your example but populate the comboboxes (or Rings) programmatically.    What you have is so, so close but it seems to require input from the mouse to get the correct control.    I don't really understand why you can change the String[] parameter in your program and it works fine but mine changes all the elements throughout the array.    The Refnum for the control does not change regardless of what cell is selected.   So, I'm a little puzzled how the correct cell or element is updated with the new combobox string.   
    Ultimately, I want to have an array of variables with an associated combobox (ring) of options.     So, for variable Temperature, the options are Cold, Cool, Warm, and Hot.   Then, variable 2 is Pressure, which might be Low, Medium and High.    Yes, this is for a fuzzy logic controller (not part of the NI Controls Toolkit).
    Any help is greatly appreciated!!!
    Attachments:
    TestRing.vi ‏19 KB

  • Type defined array of clusters for holding configuration data - setting default values for each array element

    Hi,
    I was wondering if I could get some information and opinions about using a type defined array of clusters to hold configuration data.  I am creating a program to test multiple DUTs and wanted to have a type defined control for each DUT containing the information needed to create the DAQmx tasks for all of the signals for that DUT.  I am wanting to do this so that the data is hard-coded and not in a file that the user could mess up.
    The type def controls are then put in a subVI that chooses the appropriate one based on the DUT Type enumeration wired to a case structure.  
    I am having problems with the type defined control.  I am seeing issues when attempting to save a unique configuration to each array element in the array of clusters.  Somehow it worked to begin with, but now clicking "Data Operations --> Make Current value default" on individual elements of the cluster or the entire cluster (array element) is not saving the data when I re-open the type def control.  What am I doing wrong?  Am I trying to do something with arrays of clusters that I should not be doing?
    I have attached one of the type defined controls for reference.  I tried changing it to Strict to see if that helped, but no luck.
    To reproduce, change the resource string for array element 0 and make the new value the default value.  Then close the type def, and re-open it.  The old value is still present in that element.  The VI is saved in LabVIEW 2012.
    Solved!
    Go to Solution.
    Attachments:
    CM_AnalogInputs.ctl ‏11 KB

    Values of a typedef are not proprigated to instances of the control. THey will pick it up if created AFTER the data values have been changed. THey will not get updated with future changes. You should either create a VI specifically for hardcoding your values or implement a file based initialization. The file based would be much better and more flexible. If you don't want users to modify the data simply encrypt it. There is a noce blowfish library you can download.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • How to set the value of an array element (not the complete array) by using a reference?

    My situation is that I have an array of clusters on the front panel. Each element is used for a particular test setup, so if the array size is three, it means we have three identical test setups that can be used. The cluster contains two string controls and a button: 'device ID' string, 'start' button and 'status' string.
    In order to keep the diagrams simple, I would like to use a reference to the array as input into a subvi. This subvi will then modify a particular element in the array (i.e. set the 'status' string).
    The first problem I encounter is that I can not select an array element to write to by using the reference. I have tried setting the 'Selection s
    tart[]' and 'Selection size[]' properties and then querying the 'Array element' to get the proper element.
    If I do this, the VI always seems to write to the element which the user has selected (i.e. the element that contains the cursor) instead of the one I am trying to select. I also have not found any other possible use for the 'Selection' properties, so I wonder if I am doing something wrong.
    Of course I can use the 'value' property to get all elements, and then use the replace array element with an index value, but this defeats the purpose of leaving all other elements untouched.
    I had hoped to use this method specifically to avoid overwriting other array elements (such as happens with the replace array element) because the user might be modifying the second array element while I want to modify the first.
    My current solution is to split the array into two arrays: one control and one indicator (I guess that's really how it should be done ;-) but I'd still like to know ho
    w to change a single element in an array without affecting the others by using a reference in case I can use it elsewhere.

    > My situation is that I have an array of clusters on the front panel.
    > Each element is used for a particular test setup, so if the array size
    > is three, it means we have three identical test setups that can be
    > used. The cluster contains two string controls and a button: 'device
    > ID' string, 'start' button and 'status' string.
    >
    > In order to keep the diagrams simple, I would like to use a reference
    > to the array as input into a subvi. This subvi will then modify a
    > particular element in the array (i.e. set the 'status' string).
    >
    It isn't possible to get a reference to a particular element within an
    array. There is only one reference to the one control that represents
    all elements in the array.
    While it may seem better to use references to update
    an element within
    an array, it shouldn't really be necessary, and it can also lead to
    race conditions. If you write to an element that has the
    possibility of the user changing, whether you write with a local, a
    reference, or any other means, there is a race condition between the
    diagram and the user. LV will help with this to a certain extent,
    especially for controls that take awhile to edit like ones that use
    the keyboard. In these cases, if the user has already started entering
    text, it will not be overwritten by the new value unless the key focus
    is taken away from the control first. It is similar when moving a slider
    or other value changes using the mouse. LV will write to the other values,
    but will not rip the slider out of the user's hand.
    To completely avoid race conditions, you can split the array into user
    fields and indicators that are located underneath them. Or, if some
    controls act as both, you can do like Excel. You don't directly type
    into the cell. You choose w
    hich cell to edit, but you modify another
    location. When the edit is completed, it is incorporated into the
    display so that it is never lost.
    Greg McKaskle

  • Event Structure's value change, not detecting changes when tabbing thru array of clusters

    Hi!  I have an array of clusters (int, int, string, int) control, and want to detecting changes made to the it.  I used the Event Structure's value change case on the array, it works excellent except that it'll only detect the changes when you click out of the element or press the enter key (the one by the numbers, not carriage return).  I want it to detect the changes when I tab thru the cluster or array too, but I can't figure it out... Does anyone have any ideas?
    Thanks!

    mfitzsimons wrote:
    altenbach
    Tried Value Change with my example done in 7.1 and it doesn't trgger an event.  That is why I suggested Mouse Down.
    Curious. I did a few minor edits in 8.0 before saving as 7.1, but the simple value change event got triggered just fine when the value vas terminated with a tab in 7.1. Every time.  Strange....
    Are you on 7.1 or 7.1.1? Maybe there's a difference (I am using 7.1.1).
    LabVIEW Champion . Do more with less code and in less time .

  • Keyboard "tab" control in Array of Clusters

    I'm trying to polish some of my LabVIEW user interfaces so that my users can work faster in them and so that they follow more "Windows UI Standards" (or whatever).
    I have an array of clusters.  The cluster has 3 numerics.
    When a user "focusses" on the first numeric within a cluster and hits the tab key, it moves the focus to the second numeric.  Hit tab again, and it jumps to the 3rd numeric.  Hit the tab key a 3rd time and it jumps back to the first numeric in the cluster.  What I want to happen is for the focus to move to the first numeric in the next element of the array.
    I've started to play around with the "Key Down" event case that has a conditional looking for "TAB" and then checks the "FindCtrlWithKeyFocus" with the last numeric.  My probes within this event show that the "TAB" key detection is working, but the "FindCtrlWithKeyFocus" never has a TRUE output from the "CtrlFound?" output of the Invoke Node.
    Even if I did know if tab was pressed in the last element, I'm not real sure how to move focus to the first numeric within the next cluster element of the array.
    A numeric array behaves in the correct way.  I could get the program working the way I want with a 2d array of numerics.  However, each numeric has different data entry parameters and there is also a lost of "self documentation".  I would like to find a solution because this has come up with other, more complex, array of clusters that would not be solveable with a 2d array of a base type.
    Seems overly complicated to me.
    Bonus Question: The default value of my numerics is 0.  When my user clicks a numeric the cursor is on either side of the 0 and the user has to delete the 0 prior to their data input.  When a numeric is entered via the Tab key, the whole field is selected.  When the whole field is selected, whatever the user inputs will replace the original "0" that was in the field.  Anyway to have the whole field selected when the user uses the mouse?
    Sorry for the wall-of-text post (and the preposition hell).  Thanks for your input.
    Solved!
    Go to Solution.

    Well I've gone and gotten the tabbing behavior you're looking for.
    -the key is to set "skip when tabbing" on the controls inside the clusters to true, and leave it false for the array elements.  Now when keyfocus is on one of the cluster controls and Tab is pressed, LV will put the keyfocus on the next visible array element.
    -then use a "key down?" filtering event to check and see if any of those controls have keyfocus when Tab is pressed.  If so, and it's not the last control in the cluster, discard the keypress and programmatically advance keyfocus to the next item.  
    -Finally if the Tab press was not discarded, use a normal "key down" UI event to check if one of the array elements now has keyfocus and if so, set KF to the first control in its array.
    So in short, this setup turns off tabbing along a row so that every tab will move to the next row.  Then it filters out Tab if it's not yet at the end of the row.  Finally, it automatically puts the cursor in the first column when the row has advanced.
    One significant drawback is that it only tabs between visible array elements.  You can probably make it auto scroll.
    I'll leave it as an exercise for the reader to handle the shift+Tab (reverse tabbing) key presses.
    To me, this runs up against three holes in LV UI programming:
    1) Array Element events should be available.     The Array:Key Down event only handles key presses when the array has keyfocus, not when things inside it do.  Any kind of key filtering has to be done at the VI level (!!!).
        The data source for these events should include the element index (eg what cell was clicked on?)
    2) There aren't effective ways in VI server to deal with individual array elements.  I recognize that some of it is the basis that array elements have the same properties, but there are display and selection properties that do differ between cells.  I ought to be able to specify that a particular cell index has keyfocus.  Arrays, why can't you be more like Tables?
    3)Tab order should be flat, not hierarchical.
    edit: in case the snippet messes things up, file is attached.
    -Barrett
    CLD
    Attachments:
    Tab through cluster array elements.vi ‏28 KB

  • Array of clusters and in the cluster is a bar meter, how can I change the color individually?

    Array of clusters and in the cluster is a bar meter, how can I change the color of the bar meter individually for each element of the array?  I have just figured out that you can't change properties of one element of the array without all elements changing.  For the scaling I had to make numeric indicators for each tick of the scale so that each bar meter in the clustered array would have individual scales.  I also had to do some math to scale each barmeter to display correct proportions from 0 to 100%.  Now I'm stumped on the color of the bar meter.  Basically, if the value goes over a setpoint, the bar meter needs to turn red.  It has to be in an array to be infinitely scalable.
    Thanks
    Matt
    Solved!
    Go to Solution.

    You can't do that-
    without a little trick.
    You could consider laying a custom color box over the bar graph in the cluster you can set the color based on the value of the bar graph or even make a "Pseudo"- bar graph using a series of color boxes stacked to look lie a bar and changing values of the Color boxs from empty to full to red.
    Here is an example to demonstrate
    Jeff
    Attachments:
    Pseudo bar.vi ‏12 KB

  • Call library function node with array of clusters using array data pointer

    Hello all.
    I am writing a LabVIEW wrapper for an existing DLL function.
    The function has, as one of its parameters, an array of structs.  The struct is very simple, containing two integers.  I am using the call library function node to access it.
    In Labview I created an array of clusters, where the cluster has two 32-bit integers as its members.  So far, so good.
    Now I have to pass this in to the Call Library Function Node.  Here I am running into trouble.
    I have used The topic in LAVA and The topic in the knowledge base as my primary sources of information, though I have read a bunch of forum topics on the subject too.
    I do understand that I could write a new function which takes as a parameter a struct with the size as the first member and an array as the second, and I might just do this and have it call the regular function, but I was hoping to do it more simply.
    According to the C file which LabVIEW generates for me from the CLFN when I choose "Adapt to Type" and "Array Data Pointer", the prototype it is expecting is:
    int32_t myFunc(uint32_t handle, uint16_t channel,
    int32_t FIFOnumber, void data[], int32_t numWords, int32_t *actualLoaded,
    int32_t *actualStartIndex);
    And the prototype of the function in my DLL is
    int borland_dll myFunc(DWORD handle, usint channel,
    int FIFOnumber, struct mStruct *data, int numWords, int *actualLoaded, int *actualStartIndex);
    This looks like a match to me, but it doesn't work (I get garbage in data).  From the topic in LAVA referenced above, I understood that it would work.  It does not.
    If I cast data to the pointer-to-pointer I get when I generate c code by wiring my struct to a CIN and generating, then I seem to get what I expect. But this seems to work when I choose "pointers to handles" too, and I would expect array data pointer to give a different result.
    Is there any way to get this to work directly, or will I have to create a wrapper?  (I am currently using LabVIEW 2011, but we have customers using 2009 and 2012, if not other versions as well).
    Thank you.
    Batya
    Solved!
    Go to Solution.

    OK, here is more detailed information.
    I have attached the VI.
    This is the code from the  "C" file created by right-clicking the CLN and creating a "C" file. 
    When the parameter in the CLN is set to "array data pointer":
    /* Call Library source file */
    #include "extcode.h"
    int32_t Load_Transmit_FIFO_RTx(uint32_t handle, uint16_t channel,
    int32_t FIFOnumber, void data[], int32_t numWords, int32_t *actualLoaded,
    int32_t *actualStartIndex);
    int32_t Load_Transmit_FIFO_RTx(uint32_t handle, uint16_t channel,
    int32_t FIFOnumber, void data[], int32_t numWords, int32_t *actualLoaded,
    int32_t *actualStartIndex)
    /* Insert code here */
     When the parameter is "pointers to handles":
    /* Call Library source file */
    #include "extcode.h"
    /* lv_prolog.h and lv_epilog.h set up the correct alignment for LabVIEW data. */
    #include "lv_prolog.h"
    /* Typedefs */
    typedef struct {
    int32_t control;
    int32_t data;
    } TD2;
    typedef struct {
    int32_t dimSize;
    TD2 data[1];
    } TD1;
    typedef TD1 **TD1Hdl;
    #include "lv_epilog.h"
    int32_t Load_Transmit_FIFO_RTx(uint32_t handle, uint16_t channel,
    int32_t FIFOnumber, TD1Hdl *data, int32_t numWords, int32_t *actualLoaded,
    int32_t *actualStartIndex);
    int32_t Load_Transmit_FIFO_RTx(uint32_t handle, uint16_t channel,
    int32_t FIFOnumber, TD1Hdl *data, int32_t numWords, int32_t *actualLoaded,
    int32_t *actualStartIndex)
    /* Insert code here */
     When the parameter is set to "handles by value":
    /* Call Library source file */
    #include "extcode.h"
    /* lv_prolog.h and lv_epilog.h set up the correct alignment for LabVIEW data. */
    #include "lv_prolog.h"
    /* Typedefs */
    typedef struct {
    int32_t control;
    int32_t data;
    } TD2;
    typedef struct {
    int32_t dimSize;
    TD2 data[1];
    } TD1;
    typedef TD1 **TD1Hdl;
    #include "lv_epilog.h"
    int32_t Load_Transmit_FIFO_RTx(uint32_t handle, uint16_t channel,
    int32_t FIFOnumber, TD1Hdl *data, int32_t numWords, int32_t *actualLoaded,
    int32_t *actualStartIndex);
    int32_t Load_Transmit_FIFO_RTx(uint32_t handle, uint16_t channel,
    int32_t FIFOnumber, TD1Hdl *data, int32_t numWords, int32_t *actualLoaded,
    int32_t *actualStartIndex)
    /* Insert code here */
    As to the DLL function, it is a bit more complicated than I explained above, in the current case.  My VI calls the function by this name in one DLL, and that DLL loads a DLL and calls a function (with the same name) in the second DLL, which does the work. (Thanks Rolfk, for helping me with that one some time back!)
    Here is the code in the first ("dispatcher") DLL:
    int borland_dll Load_Transmit_FIFO_RTx(DWORD handle, usint channel, int FIFOnumber, struct FIFO_DATA_CONTROL *data, int numWords, int *actualLoaded, int *actualStartIndex)
    t_DispatchTable *pDispatchTable = (t_DispatchTable *) handle;
    int retStat = 0;
    retStat = mCheckDispatchTable(pDispatchTable);
    if (retStat < 0)
    return retStat;
    if (pDispatchTable->pLoad_Transmit_FIFO_RTx == NULL)
    return edispatchercantfindfunction;
    return pDispatchTable->pLoad_Transmit_FIFO_RTx(pDispatchT​able->handlertx, channel, FIFOnumber, data, numWords, actualLoaded, actualStartIndex);
    borland_dll is just "__declspec(dllexport)"
    The current code in the DLL that does the work is:
    // TEMP
    typedef struct {
    int control;
    int data;
    } TD2;
    typedef struct {
    int dimSize;
    TD2 data[1];
    } TD1;
    typedef TD1 **TD1Hdl;
    // END TEMP
    int borland_dll Load_Transmit_FIFO_RTx(int handlertx, usint channel, int FIFOnumber, struct FIFO_DATA_CONTROL *data, int numWords, int *actualLoaded, int *actualStartIndex){
    struct TRANSMIT_FIFO *ptxFIFO; //pointer to transmit FIFO structure
    usint *pFIFOlist; //pointer to array of FIFO pointers to FIFO structures
    int FIFOentry, numLoaded;
    usint *lclData;
    usint nextEntryToTransmit;
    // TEMP
    FILE *pFile;
    int i;
    TD1** ppTD = (TD1**) data;
    TD1 *pTD = *ppTD;
    pFile = fopen("LoadFIFOLog.txt", "w");
    fprintf(pFile, "Starting Load FIFO with %d data words, data pointer 0x%x, with the following data&colon; \n", numWords, data);
    for (i = 0; i < numWords; i++) {
    fprintf(pFile, "%d: control--0x%x, data--0x%x \n", i, data[i].control, data[i].data);
    fflush(pFile);
    fprintf(pFile, "OK, using CIN generated structures: dimSize %d, with the following data&colon; \n", pTD->dimSize);
    for (i = 0; i < numWords; i++) {
    fprintf(pFile, "%d: control--0x%x, data--0x%x \n", i, pTD->data[i].control, pTD->data[i].data);
    fflush(pFile);
    // END TEMP
    if ((handlertx) <0 || (handlertx >= NUMCARDS)) return ebadhandle;
    if (cardrtx[handlertx].allocated != 1) return ebadhandle;
    pFIFOlist = (usint *) (cardrtx[handlertx].segaddr + cardrtx[handlertx].glob->dpchn[channel].tr_stk_ptr​);
    pFIFOlist += FIFOnumber;
    ptxFIFO = (struct TRANSMIT_FIFO *)(cardrtx[handlertx].segaddr + *pFIFOlist);
    //use local copy of ptxFIFO->nextEntryToTransmit to simplify algorithm
    nextEntryToTransmit = ptxFIFO->nextEntryToTransmit;
    //on entering this routine nextEntryToLoad is set to the entry following the last entry loaded
    //this is what we need to load now unless it's at the end of the FIFO in which case we need to wrap around
    if ( ptxFIFO->nextEntryToLoad >= ptxFIFO->numEntries)
    *actualStartIndex = 0;
    else
    *actualStartIndex = ptxFIFO->nextEntryToLoad;
    //if nextEntryToLoad points to the last entry in the FIFO and nextEntryToTransmit points to the first, the FIFO is full
    //also if nextEntryToLoad == nextEntryToTransmit the FIFO is full and we exit without loading anything
    if (( (( ptxFIFO->nextEntryToLoad >= ptxFIFO->numEntries) && (nextEntryToTransmit == 0)) ||
    ( ptxFIFO->nextEntryToLoad == nextEntryToTransmit)) && (ptxFIFO->nextEntryToLoad != INITIAL_ENTRY)){
    *actualLoaded = 0; //FIFO is full already, we can't add anything
    return 0; //this is not a failure, we just have nothing to do, this is indicated in actualLoaded
    numLoaded = 0;
    lclData = (usint *)data; //must use 16 bit writes to the module
    //conditions are dealt with inside the for loop rather than in the for statement itself
    for (FIFOentry = *actualStartIndex; ; FIFOentry++) {
    //if we reached the end of the FIFO
    //if the module is about to transmit the first element of the FIFO, the FIFO is full and we're done
    //OR if the module is about to transmit the element we're about to fill in, we're done - the
    //exception is if this is the first element we're filling in which means the FIFO is empty
    if ((( FIFOentry >= ptxFIFO->numEntries) && (nextEntryToTransmit == 0)) ||
    ((FIFOentry == nextEntryToTransmit) && (FIFOentry != *actualStartIndex) )){
    *actualLoaded = numLoaded;
    //set nextEntryToLoad to the end of the FIFO, we'll set it to the beginning next time
    //this allows us to distinguish between full and empty: nextEntryToLoad == nextEntryToTransmit means empty
    ptxFIFO->nextEntryToLoad = FIFOentry;
    return 0;
    //we reached the end but can continue loading from the top of the FIFO
    if ( FIFOentry >= ptxFIFO->numEntries)
    FIFOentry = 0;
    //load the control word
    ptxFIFO->FifoData[FIFOentry * 3] = *lclData++;
    //skip the high of the control word, the module only has a 16 bit field for control
    lclData++;
    //now put in the data
    ptxFIFO->FifoData[(FIFOentry * 3) + 2] = *lclData++;
    ptxFIFO->FifoData[(FIFOentry * 3) + 1] = *lclData++;
    numLoaded++;
    //we're done because we loaded everything the user asked for
    if (numLoaded >= numWords) {
    *actualLoaded = numLoaded;
    ptxFIFO->nextEntryToLoad = FIFOentry+1;
    return 0;
    //if we reached here, we're done because the FIFO is full
    *actualLoaded = numLoaded;
    ptxFIFO->nextEntryToLoad = FIFOentry;
    fclose (pFile);
    return 0;
     As you can see, I added a temporary diagnostic with the structures that were created in the "Handles by value" case, and print out the data.  I see what is expected, whichever of the options I pick in the CLN!  
    I understood (from the information in the two links I mentioned in my original post, and from the name of the option itself) that "array data pointer" should pass the array of data itself, without the dimSize field.  But that does not seem to be what is happening.
    Batya
    Attachments:
    ExcM4k Load Transmit FIFO.vi ‏15 KB

  • Initializing data in an Array of Clusters

    First, thanks in advance for reading this request.
    Second, the situation:
    I am using an array of clusters for process control.
    The cluster contains a boolean, a typedef ring control, and two numeric controls (doubles).
    Depending upon the user-requested operation I need anywhere from four to 20 cluster elements in the array.
    Raw data for the two numeric controls are contained as elements in three different input clusters.
    Each numeric control in each array cluster can use from none to four elements from the input clusters with various additions and subtractions (no mults or divs).
    The boolean and ring can be set as constants for each element based on the user request.
    Third, the request:
    Is there a simple way to initialize the values in the cluster (and hence the array) without having to run wires everywhere?
    I have been writing embedded code and PC applications for many years and am only recently tackling LabView.
    In C, I would create a structure of the four elements and then create and array of structures.
    The initialization would require a few lines of code.
    I have tried using formula nodes (perhaps incorrectly).  All they do is remove the Numeric blocks (like + and -), but they don't create the cluster.
    I am sure that there is an easier way of accomplishing what I need to do, I am just too inexperienced to know what it is.
    Any help or suggestions is welcome.
    Thanks in advance.

    Create a cluster with the desired default values as diagram constant, wire it to "initialize array" and wire the desired array size.
    The output will be the desired construct that you could write to e.g. a local variable of the target.
    I hope I understood you correctly. If not, attach a small VI containing your array.
    LabVIEW Champion . Do more with less code and in less time .

  • Change properties of a cluster element withing an array of clusters

    Hello all,
    I have an array of cluster that is shaped as a line with different display elements.
    A list or a tree wouldn't have made it, so I had to use a cluster and make a table.
    The problem is that I want to change not only the text but also the text color.
    Individually.
    I found this :
    http://www.ni.com/example/30904/en/
    But it change the property in all the clusters in the array, not just the one I need.
    Some people have the same problem :
    http://forums.ni.com/t5/LabVIEW/Reference-to-Array-of-Clusters-with-an-array-element/td-p/1006427
    http://forums.ni.com/t5/LabVIEW/Different-set-of-values-for-two-rings-in-an-array-of-clusters/m-p/10...
    http://forums.ni.com/t5/LabVIEW/array-of-clusters-get-references-to-all-the-clusters/td-p/1079456
    http://forums.ni.com/t5/LabVIEW/How-can-I-reference-the-properties-of-a-control-in-a-cluster-in/m-p/...
    http://forums.ni.com/t5/LabVIEW/Writing-only-to-certain-cluster-elements-in-an-array-by/m-p/2200728
    http://forums.ni.com/t5/LabVIEW/Update-Properties-Of-One-Control-In-An-Array/m-p/3015501
    http://forums.ni.com/t5/LabVIEW/Array-of-clusters-and-in-the-cluster-is-a-bar-meter-how-can-I/m-p/15...
    http://forums.ni.com/t5/LabVIEW/Property-node-of-a-control-inside-of-cluster-inside-an-array/m-p/946...
    Obviously, while in a list/table or tree you can change the property of an individual
    cell (font, color) you cannot do it within an array of cluster, by some sort of magic,
    the property of a cluster element (font, color) are all linked together, hence rendering
    the use of an array worthless.
    A possible hack is proprosed by using control masking, setting one visible and the
    other invisble, swapping their position, whatever. It's a hack you have to perform,
    hence add another code to maintain.
    Is that still the case or is there now a more official way to handle individual cluster
    properties, not just its data ? After all that's a common real-life example that should
    be handled by Labview. In my opinion.
    David Koch
    Solved!
    Go to Solution.

    altenbach wrote:
    One of the elements could be a 2D picture indicator of about the same size. You can write text in any color using picture functions.
    Here's what I had in mind. Seems to work just fine (I would fine-tune the font, picture border, etc. but this should get you started).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ColorText.png ‏13 KB
    ColorText.vi ‏9 KB

  • Pass list of values in an array to the IN statement of SELECT in Oracle 10g

    Hi,
    This is what I have done so far...
    I have loaded the main array array_number_1 using BULK Collect. Within the loop I am filtering the data from this array and writing to another array array_number_2.
    I want to use the values from array_number_2 in the SELECT statement.
    Eg: SELECT sum(x_amount) charges
    FROM x_table
    WHERE id IN (array_number_2).
    Could you provide a solution to this preferrably with an example.
    thanks

    I'm not entirely following you, Visakh, but I have a SQL Task setup in which I have an expression that makes a call to a db2 database such as the abbreviated set example below.  The list of IDs in the IN statement must come from another  SQL Server
    database.   In the past I have  gotten the list of IDs, put them in a recordset and then put that in a for loop to iterate and make one call to db2 for each and every ID.   The single ID example can literally take days to run for 100,000 IDs.
     Therefore, I want to pull the entire set of results back at one time via a single (or at least fewer calls than there are IDs) DB2 call using 'in' instead.  Maybe I am overlooking something but I don't quite see how your example will get me where
    I want to go.  
    Set Example
    SELECT 
       A,
       B
    FROM 
        Table 1, 
        Table 2, 
    WHERE 
        Joins   
        AND PRSNEUP.ID in  ( This is where I want a list of IDs )
    Single ID Example
    SELECT     A,  
     B
    FROM   
      Table 1,      Table 2, 
    WHERE     
    Joins        AND PRSNEUP.ID =  ( VariableContainingASingleID

  • Dynamic Form in Tabular Form i.e SET VALUE

    Hi,
    I have an tabular form ,
    In which two column are there i.e username and department
    Just I wnt to know can dynamic action i.e SET VALUE CAN BE USED IN TABULAR FORM.
    AS I CHANGE THE USERNAME THERE PERSPECTIVE DEPARTMENT SHOULD CHANGE.
    can anyone help.

    Hello Trent,
    I too, am attempting to set the value of an item when another item is changed.
    I need to capture the APP_USER changing the row for each row changed in the tabular form when submitted.
    My table is in a remote database that is not allowed to have APEX loaded directly in the instance (or db link TO the APEX instance).
    Can’t get the APP_USER making the change at this level, as the APEX code is not there.
    The instance that hosts the APEX installation accesses the table via a view through a db link.
    Can’t use a trigger on the view to set the APP_USER using APEX functionality.
    Not desirable to re-invent the IUD wheel using instead-of triggers.
    The example you posted on http://apex.oracle.com/pls/apex/f?p=45448:11 is exactly what I need (even though your example sets the value on Lose Focus and I Set value on Change).
    I am attempting to implement the dynamic action for the item using your javascript, and am almost there....but not quite. The dynamic action is updating the target item in ALL the rows in the tabular form, not just the one that is being changed.
    This, I am sure, is due to my inexperience with Dynamic Actions, jquery syntax, and the javascript API’s for APEX. I believe I know what the issue IS, I’m just not sure how to work around it.
    Please note: I attempted to download your example at the above website (turning off popup blockers), but had no success (I got the thank-you for downloading message, but have no clue what was downloaded to where). I was hoping to compare your form Dynamic action with mine to see where I went wrong.
    If you could please, review the following and:
    1)     let me know what might be different from your working example?
    2)     provide info on how to get your working form downloaded (such a tease to have the download link there and not get it to work ;0} ) , please?
    The following shows the html from view source for a row in my tabular form. This will help you get an idea of the items. The actual number of rows in the form is about 50.
    <table cellpadding="0" border="0" cellspacing="0" summary="" class="report-standard">
    <tr class="highlight-row">
    <td headers="CHECK$01" class="data">
    <label for="f01_0002" class="hideMe508">CHECK$01</label>
    <input type="checkbox" name="f01" value="2" class="row-selector" id="f01_0002" />
    </td>
    <td headers="JOBNO_DISPLAY" class="data">X111Y2222</td>
    <td align="center" headers="DEPR" class="data">
    <label for="f03_0002" class="hideMe508">DEPR</label>
    <input type="checkbox" name="f03_NOSUBMIT" value="1" id="f03_0002_01"
    onClick="if (this.checked) {apex.jQuery('#f03_0002').val('1');}
    else {apex.jQuery('#f03_0002').val('');}" />
    <input type="hidden" name="f03" value="" id="f03_0002" /></span>
    </td>
    <td headers="UPDUSER" class="data">
    <label for="f04_0002" class="hideMe508">UPDUSER</label>
    <input type="text" name="f04" size="16" maxlength="2000"
    value="MOMSDAT" id="f04_0002" />
    </td>
    <td headers="DERIVED$01" class="data">MOMSDAT</td>
    <td headers="UPDDATE" class="data">13-DEC-11
    <label for="f02_0002" class="hideMe508">JOBNO</label>
    <input type="hidden" name="f02" value="X111Y2222" id="f02_0002" />
    <input type="hidden" id="fcs_0002" name="fcs"
    value="DB31F7B9ED99E6A2F7295F6B7D236409">
    <input type="hidden" id="frowid_0002" name="frowid"
    value="AAATI3AAGAAAAIXAAo" />
    <input type="hidden" id="fcud_0002" name="fcud" value="U" />
    </td>
    </tr>.....
    <tr>.....</tr>
    </table>
    To help explain:
    I have a checkbox associated with array name f03_NOSUBMIT,
    This checkbox OnClick updates a hidden item associated with array name f03. The hidden item is linked to the depr column of my view/table (this functionality is straight from Oracle’s tabular checkbox wizard – works great, no problems).
    When the check box is changed, I need to capture the APP_USER value in the UPDUSER field associated with the f04 array (nice that the array names matched up with your example :0} )
    To do so, I created a dynamic action:
    Name: Set_Upduser
    Sequence: 10 (it’s the only DA)
    Event: Change
    Select Type: jQuery Selector
    jQuery Selector: input[name=”f03_NOSUBMIT”]
    --note: the event does not fire if I use f03
    --since that value is not actually
    --changed until submit with this
    --method.
    Condition: - No condition –
    True Actions:
    Sequence: 10
    Action: Set Value
    Fire When Event Result is: True
    Fire On page Load: Unchecked
    Stop Execution On Error: Checked
    Set Type: JavaScript Expression
    JavaScript Expression:
    var row = $x_UpTill(this.triggeringElement, 'TR');
    var otherElement = $('input[name="f04"]',row)[0];
    otherElement.value = '&APP_USER.';
    Selection type: jQuery Selector
    jQuery Selector: input[name="f04"]
    This ALMOST works...
    When I run the page and click on just one check box, the UPDUSER fields are updated with the APP_USER for ALL the records, not just the row for the checkbox I clicked. And, if I submit the changes, ALL the records in the table now have the APP_USER in the UPDUSER column. Not just the column where the check box was changed (Which would be expected since all the values are changed in the form – hey, the submit part works :0} ).
    Your example at http://apex.oracle.com/pls/apex/f?p=45448:11 works, setting the value for the target field only for that row. If I can get mine to work the same way, I will be good to go (as in hog-heaven, doing the Snoopy Supper-Time dance).
    I am thinking my issue is with the row identification in the
    --- var otherElement = $('input[name="f04"]',row)[0];
    I seem to not be picking up the row value in the row var.
    Am I reading line correctly where 'input[name="f04"]' is pNd, and row is pValue? Read the description of the $x_UpTill API, not sure how this is working to identify pValue (Row?).
    Additionally, I am not sure what the [0] is for at the end of the otherElement var definition. I don’t see that listed with the $ JavaScript API parameters (Google wasn't much help there either).
    OR, am I missing something else?
    Once again, if you could:
    1) let me know what might be different from your working example? (What does yours have that mine doesn’t)
    2) Provide any info on how to get your working form downloaded at http://apex.oracle.com/pls/apex/f?p=45448:11. Please, please?
    As always, your assistance is greatly appreciated!
    Edited by: amckinne on Dec 27, 2011 5:29 PM
    Edited by: amckinne on Dec 27, 2011 5:33 PM

Maybe you are looking for

  • Problem with audio in 11.5.502.110, with a kiosk application from 2004

    Hi, In 2004 we developed a large scale elearning with games to assist kids in learning to read. We wrapped the flash into kiosk application and distributed it to schools on cd's. (we used flashplayer 6, for a windows executable). Now we are getting s

  • Usb device not recognized...cannot restore or access drive on two computers

    I cannot restore my ipod on two different computers and I am receiving the "cannot recognize" error message on both. Do I have a hardware damage issue? Replacing or updating the usbstor does nothing to alleviate the problem and when I attempt to rest

  • Adobe Application Manager not Loading

    Adobe Application Manager not loading and stuck in continuous web page loading mode. Mac OS 10.7

  • Blank browser page when viewing html/swf exported from Indesign

    We've created a 'flip book' in Indesign and exported it as a swf and html docs. These docs both view correctly locally, but when uploaded into the same directory on our server and viewed via safari or chrome, they both appear as blank browser pages.

  • Duplicate quarantine messages

    Hello all, We recently just configured and put into production a C150, upgraded from a C10. Ironport Spam Quarantine has been activated. We received our first batch of quarantine messages and there appear to be duplicates. Example: [email protected]