Write to clusters - WebServer

Hallo,

I m trying to use a webserve for data sharing.

When I m using simple variables or small groups the system works without any problem using JSON to make the transformation (cluster to a string).

The problem is when I need to use a huge amount of data (FAT cluster), resembles the input string (when Im trying to write data to the server) a of the limitations for this (max length).

Could someone let me know how I should work this case? or any example for this?

Thank you and best regards,

I can't open your project because I do not have LV2014 (I 2013), but here are a few tips:

Let's say you have a method of VI web service as follows:

You can read in the VI, the POST data using a number of screws:

It will return the data POST-ed to the web service URL.

The HTTP Client POST VI will display either a string of data or to your Web Service key-value pairs:

If you use a web browser... is using jQuery/AJAX to VALIDATE the data (http://api.jquery.com/jquery.ajax/) on the web service URL or create a simple HTML form:

Tags: NI Software

Similar Questions

  • Can LabWindows libraries call function inherited from read the Datalog file?

    We are currently updating some old software written in LabVIEW 6.0.3 to Java. One of the features of the original software is to create data files using the function "Write Datalog" and also remind these databases later using 'Read Datalog'.  To maintain backward compatibility with old data users, we want that new software to also be able to read and display the old datalogs.  I have read several posts here about how the only way to get data off datalogs uses the function 'Reading Datalog' of the same version of LabVIEW to write the paper in the first place. I have the original LabVIEW code so I don't know the structure of the data that has been written.

    I want to know if there is the same function in LabWindows libraries.  Specifically is there is no support for a 6.0.3% version of the function of reading Datalog to support interfacing with a call to java?

    To knock out a possible solution, this software is shared with clients.  We want to avoid the way of compiling an executable separated from LabVIEW to be distributed with the main Java software which batch processes all the old data files in reading them with the old function of LabVIEW and spitting out files in a new format.  We would prefer for the old files to be transparent open into the new software.

    WARNING: I use LabVIEW for dark days before the invention of the button cancel, but never touched LabWindows/CVI. Please enter slowly so I will understand

    Thank you all!

    I guess that is not a built-in library capable of reading files datalog LabVIEW simply because they do not have a fixed format... Even in LV, you will need to pass the data structure for the opening function in order to be able to read the data back.

    Searching the forum I found this discussion that can give you useful to begin with.

    Apparently, you need detect the beginning of the section of the data file after the initials "DTLG" and rest of the header (which is the part not documented). After this point, read the file should be simple if you know the data structure the program writer used. The data > storage section of LabVIEW help can give you information about the content of the memory of each type of data used.

    A simple test, I did write the clusters with a string and an integer shows that: 1. section of data begins at offset 0x22F; 2. the cluster is poured into the file preceded an int with the length of the string; 3. documents may have a variable length according to the length of the string; 4. There are no bytes of padding between elements of the cluster; 5. records are packed in the file consecutively.

    I did this test using LabVIEW2009: it is possible that older files of LV are structured differently.

    An alternative to this is to generate a DLL in LabVIEW that reads files datalog and passes their content to the appellant. Since you are experienced in LV, you are certainly more comfortable than me by doing this.

  • Select name

    Hello

    When I use get-cluster | Select name

    I get this result:

    Name
    ----
    Name_of_cluster

    When I put

    $clusters = get-cluster | Select name

    Write-host "$clusters".

    I get this result:

    @{Name = Name_of_Cluster}

    Is it posible to make "pretty" output when I use it in a script?

    The Select-Object cmdlet returns an array of PSCustomObjects objects.

    That's why you see the ' @{...}', which indicates a table.

    And 'name = Name_of_Cluster', which is the property of the PSCustomObjects object.

    Looking for the value of the Name property in the output, not the entire article.

    You could do

    $clusters = get-cluster | select Name $clusters | %{$_.Name}
    

    or maybe even better, do not use the Select-Object when you store your objects inside.

    $clusters = get-cluster $clusters | %{$_.Name}
    
  • Unable to write to the directory root on cRIO

    I need to create a folder in the root directory of my cRIO but when I try to do it via the web interface (Silverlight) it gives me an error 403 (refused).  I can create and edit files and directories in existing files located in the root directory.

    The seller has managed to create a new folder in the directory root on our previous cRIO, but now we are trying to set up another one on our own.  They told me that they don't have to do something special that they do not forget to create this folder.

    Any ideas as to why I wouldn't be able to do this, even if I have all permissions on the device?

    It's confusing, but "all permissions" web interface are only "all permissions for the web server has permissions for things", that's not all. See http://digital.ni.com/public.nsf/allkb/4EBE45E8A816B19386257B6C0071D025 - more precisely:

    Write access

    (ETS, VxWorks) Your target provides write access to its folders and files.

    (OR Linux in real time) If you want to modify or create new folders and files on your target, you can only do in the following directories:

    • /home/webserv

    • /home/lvuser

    • /tmp

    Note: Your target deletes the content in the temporary folder /tmp on target restarts.

    Restricting access to the root directory makes the system more robust (prevents the change of important system files).

  • Shared data varying variable published network write error

    In my project in real time, on the VI host running on my Windows PC, I try to write in a number of published network shared variables.  All these write operations are successful (which means that I can read them on the RT target, then a cRIO-9012), except for these shared variables network-published with data type defined as Variant.  I'm not sure what is causing the problem.

    I take the table of clusters shown here...

    .. .and going through one "in Variant' VI and then subsequently in writing to the shared variable (data type: Variant).  Diagnosis of the failure of the VI in real-time to read the data, I found that variable writing shared on the host VI produced the following error:

    Error - 2147467259 appeared to Variable shared in the PC host TTS CTRL.vi

    Possible reasons:

    LabVIEW: Unspecified error (Hex 0x80004005).
    =========================
    System OR Configuration: Various operating default (Hex 0x80004005).

    This error or warning occurred when writing the following shared Variable:
    Shared \\My Computer\Network Variables\TC trust Array Group - network
    Shared \\128.144.90.143\Network Variables\TC trust Array Group - network

    .. where 128.144.90.143 is the IP address of the PC.

    Any thoughts?

    Sean

    I saw this post, and when I found myself with no other option, I have redefined the variables in question to the string data type and replaced all the "to variant" and "given Variant of ' functions with functions 'Flatten channel' and"The string Unflatten"respectively.  Initially, it did not work - functions "Chain Unflatten" would produce error 74, until I realized that the "data includes array or string of size? (T)"input on each 'string Unflatten" function must be set to FALSE. Wiring a constant false for each instance of "Unflatten to the string" seems to have corrected the problem.

    I have still no idea why wouldn t Variant.  Shared variables Editor allows to define a variant data type, so I guess it's supposed to?

    Sean

  • Use to write key VI with a table of cluster

    Hello

    I wanted to use an array of clusters to define certain configuration settings for an application. Unfortunately, 'Write key VI' does not support the type of cluster. Has anyone modified this function ('write key VI') in support of cluster and cluster table? Otherwise, no idea to keep it as simple as possible?

    My clusters include boolean, path, U32 and string.

    Thank you

    Olivier

    FYI, I have eventually save the cluster as a binary ("Write to binary function') file and a VI to read/write it. Is the easiest way for me as the other functions seem to have a limit on the complexity of the clusters they can handle.

    Thnaks for your suggestions,

    Olivier

  • global variable functional to read and write data from and to the parallel loops

    Hello!

    Here is the following situation: I have 3 parallel while loops. I have the fire at the same time. The first loop reads the data from GPIB instruments. Second readers PID powered analog output card (software waveform static timed, cc. Update 3 seconds interval) with DAQmx features. The third argument stores the data in the case of certain conditions to the PDM file.

    I create a functional global variable (FGV) with write and read options containing the measured data (30 double CC in cluster). So when I get a new reading of the GPIB loop, I put the new values in the FGV.

    In parallel loops, I read the FGV when necessary. I know that, I just create a race condition, because when one of the loops reads or writes data in the FGV, no other loops can access, while they hold their race until the loop of winner completed his reading or writing on it.

    In my case, it is not a problem of losing data measured, and also a few short drapes in some loops are okey. (data measured, including the temperature values, used in the loop of PID and the loop to save file, the system also has constants for a significant period, is not a problem if the PID loop reads sometimes on values previous to the FGV in case if he won the race)

    What is a "barbarian way" to make such a code? (later, I want to give a good GUI to my code, so probably I would have to use some sort of event management,...)

    If you recommend something more elegant, please give me some links where I can learn more.

    I started to read and learn to try to expand my little knowledge in LabView, but to me, it seems I can find examples really pro and documents (http://expressionflow.com/2007/10/01/labview-queued-state-machine-architecture/ , http://forums.ni.com/t5/LabVIEW/Community-Nugget-2009-03-13-An-Event-based-messageing-framework/m-p/... ) and really simple, but not in the "middle range". This forum and other sources of NEITHER are really good, but I want to swim in a huge "info-ocean", without guidance...

    I'm after course 1 Core and Core 2, do you know that some free educational material that is based on these? (to say something 'intermediary'...)

    Thank you very much!

    I would use queues instead of a FGV in this particular case.

    A driving force that would provide a signal saying that the data is ready, you can change your FGV readme...  And maybe have an array of clusters to hold values more waiting to be read, etc...  Things get complicated...

    A queue however will do nicely.  You may have an understanding of producer/consumer.  You will need to do maybe not this 3rd loop.  If install you a state machine, which has (among other States): wait for the data (that is where the queue is read), writing to a file, disk PID.

    Your state of inactivity would be the "waiting for data".

    The PID is dependent on the data?  Otherwise it must operate its own, and Yes, you may have a loop for it.  Should run at a different rate from the loop reading data, you may have a different queue or other means for transmitting data to this loop.

    Another tip would be to define the State of PID as the default state and check for new data at regular intervals, thus reducing to 2 loops (producer / consumer).  The new data would be shared on the wires using a shift register.

    There are many tricks.  However, I would not recommend using a basic FGV as your solution.  An Action Engine, would be okay if it includes a mechanism to flag what data has been read (ie index, etc) or once the data has been read, it is deleted from the AE. 

    There are many ways to implement a solution, you just have to pick the right one that will avoid loosing data.

  • Remove the cluster of clusters table

    Hi I have this program where you have an array of clusters and when you press a Boolean 'Add' button, you can add clusters to the table up to a certain limit, and it is written in a spreadsheet file. I would like also to such a function when you click on 'Remove' Boolean you can remove the cluster from the table so that the new table takes place 1 old and cluster information are removed from the worksheet so file. How can I do?

    It does not need to have the cluster, use instead to build table (for best performance initialize the array and use replaces primitive subset of table). You cannot delete items in a file, but you can read the file and remove the item and he write to the file. If it is a sub VI, you add/remove items and writing to a file each time that the sub vi is called? Do not write to the spreadsheet VI file in this case, use instead write to text file primitive. See examples of LabVIEW for some useful examples on file i/o.

  • How to change the items in a drop-down list box that is part of an array of clusters

    Hello

    In the attached vi, I have an array of clusters and each cluster contains two drop-down list boxes. How can I edit the items in the drop-down list box 1 for all elements in the array? (All elements of list box 1 has the same elements.)

    By way of illustration, I have also included the case of trivila, for example, edit the items in a separate drop-down list box that is is not part of an array of clusters (combo box 3). Please notify. Thank you.

    Peter

    Right click on the drop-down list box and select Create-> Node-> String() property. Place it on the block diagram. Change to write (right click) and then feed him an array of strings.

  • write class data

    Hello

    I am looking for a solution to write a programming data to a class of LabVIEW.
    I want to create a method that reads an ini file and writes the data of the keys in the class data during execution. The method must be flexible. So I don't want to code for key cases.
    With the normal clusters I would do that with vi server. I have not found a way to do this with the classes.

    I hope someone has a solution for this.

    Thanks in advance.
    D. Ackermann


  • Write to the Cluster size in binary files

    I have a group of data, I am writing to you in a file (all different types of numeric values) and some paintings of U8. I write the cluster to the binary file with a size of array prepend, set to false. However, it seems that there are a few additional data included (probably so LabVIEW can unflatten on a cluster). I have proven by dissociation each item and type casting of each, then get the lengths of chain for individual items and summing all. The result is the correct number of bytes. But, if I flattened the cluster for string and get this length, it is largest of 48 bytes and corresponds to the size of the file. Am I correct assuming that LabVIEW is the addition of the additional metadata for unflattening the binary file on a cluster and is it possible to get LabVIEW to not do that?

    Really, I would rather not have to write all the elements of the cluster of 30 individually. Another application is reading this and he expects the data without any extra bytes.

    At this neglected in context-sensitive help:

    Tables and chains in types of hierarchical data such as clusters always include information on the size.

    Well, it's a pain.

  • Problem updating a table of clusters that contain some gauges

    Hello

    I have problems when I write to an array of clusters that contain some gauges.

    I wrote an example program to illustrate the problem.

    [I create a digital, digital picture].

    I have complete 4 elements of the array with the data.

    If I shoot each element with a function Index Array and write the data in 4 indicator groups independently, I have no problem.

    If I have the wiring of the table of 4 elements in an array of clusters, the needles on the gauges redraw correctly.

    However, simply by moving the mouse on the element table causes the display to redraw this element.

    I played a bit with synchronous display and reporter Panel updates, but they do not seem to affect this behavior.

    Any thoughts?

    A picture of the problem and the VI are attached.

    When something like this pops up I usually try covering the incriminated with a transparent 2D image control.  Controls overlapping sometimes cause problems, sometimes they solve them.

  • Cannot write the FFT of the integrated double data

    I am a beginner to Labview environment.
    I have acceleration Vs time dat file .lvm
    Can I get the double integration of this
    acceleration data for trip data.
    Can I get FFT of displacement and displayed on the graph.
    Up to this point VI works
    But now if I connect this FFT of moving to 'write the measurement file' then it displays error.
    Please help me... and correct the error...  All I want is two column data, frequency and

    the other of the amplitude of movement.
    I have attached all files
    I ask you to correct the VI please...
    Thanking you!

    The concepts that you'll want to research are"matrices", "indexing of tables", 'automatic indexing', 'cluster' and 'type of waveform data'.

    The loop IN the first VI I sent used the automatic indexation to take each element of a table 1 d of the clusters and perform operations on them separately to convert them to a waveform.  Exit tunnel also uses automatic indexing so that the end result is a table 1 d of waveforms.  I used the loop, so that no matter how many items appear in the table, you get a corresponding number of signals to the "writing on a file of measures."

    In this case, because the output of the FRF is a single cluster (and not an array of clusters), the loop FOR was not necessary.  The VI attached this time takes the output of cluster of FRF and maps the cluster to a single components build the wave function and you get a result of unique waveform.

    I have no sound and Vibe loaded on my computer at the moment, so I can't run your VI and see the result of the integration of the snout to the Cloaca VI.  The output data type is "Table 1 d of waveform" and your indicator and your two FRF can accept only waveforms.  I put a function between integration and the indicator/FRF array index, but if there is more than one waveform in the table, it would be the wrong solution.  My solution corrects the broken wires but throws waveforms 2,3,4... If they exist.

  • Save as default clusters

    Hi all
    I'm stuck in a small problem and need a bit of help from you.
    In my application, I have a Subvi, which will have the parameters required for the user to run the program. These settings, I want to store it in a file (or other format) so that when the user restarts the program, the saved settings is updated on the Subvi parameters.
    The Subvi parameters consists of Clusters which includes Radio, Enums, rings, buttons etc.

    I enclose the photo of front panel of the VI settings.
    Pls have a look and let me know how to save these settings in an effective way.

    Thank you
    Ritesh

    Hi Ritesh,

    You can write your own function to read and write data, or you use "Flatten for XML" and "Unflatten from XML" to store and restore your data.

    Mike

  • How to write the table 2d 2D table of cluster of 2 elements

    I want to write table 2D and a string in a 2D cluster table having two different elements. an element is of numeric type for 2d and another element of the string table. Please help me on this problem

    Hello

    You can do the following. A Vi with control is also attached.

    And about the insertion of a string and digital in the 2d table, I don't think that you can do. A table can only use a data type. You can use the clusters for the holding of different data types.

    Kind regards

    Amine31

    (Give congratulations to good answers and Mark as a Solution If your problem is resolved)

Maybe you are looking for