A result of sending the data to a while loop through another loop of TCP communication

Hi all

I have 2 screws

1 matching model (using the method of Grab) which is put inside a while loop. This VI works correctly and returns a string in a specific format (position and the angle of the object).

2 TCP server who always listens to a specific port, if it receives a correct command string, it sends the string above VI - 1 (position and angle).

The two 2 screws works if they are in separate VI. But I want to combine them into 1 single VI and I get the problem: Pattern matching doesn't work anymore (the video has only first frame then stops).

I tried to put the two while loop in parallel or put the TCP while loop inside while loop Pattern Matching. Nothing has worked.

Pls see my attached VI and the TCP module.

What is the solution for requirement?

Thank you all!

What I would do, is be your two screws at the same time.  Given that you do not send the last result, store the result in a global variable.  Your comparison models written VI the global variable of the results of each iteration of the loop and the TCP bed module global variable results when it receives the right to order and then send it.

Tags: NI Software

Similar Questions

  • storage of the data output of while loop

    Hello

    I have a data acquisition system set up to read the couple of a transducer. The output needs to be fed with an excel document, once the program stops running, or when a key is pressed.

    with the current code attached, the excel document is created, but it only shows the most recent series of data. How to make the table to store all the data coming from while loop?

    Ive only been programming with labview for two weeks, so chances are that it is something simple, but please help us in any case.

    JM

    To get what you expect, the Terminal output of table a while loop right click and select the option activate Indexing. Usually if you want to save data use queue to pass data inside the while loop to another loop/VI and perform data recording. For all that you have examples, please do a searc in LabVIEW help > find examples.

  • Save all the data for a while loop

    I already asked a similar question, but it is perhaps not very clear, and there are a few concepts that I did not understand.

    1. I have a keyboard to generate flow DTMF signal (I call it stream because it contains several shades that consist of a full phone number)

    2. I would like to save it as a wav file, but I guess that another format is correct and because the writing on a wav file does not support add so for this particular case, I use writing waving instead of writing to wav format

    My approach is to have a structure of queue so that I can write each iteration results in a file.

    (i) when I try to retrieve the data, there's nothing but 0.

    (II) my intention is to get 8000 samples per second (fs = 8 000) but he back up data so fast

    I have attached the file so if there is a way to solve problems, please help me.

    This vi includes many elements discussed above. There are no provisions for the intervals 'no signal '.

    Changes: Replaced with native features of LabVIEW Mathscript node. Mechanical Action to latch release button.  Cluster to array replaces Unbundle and table to build. Reshape the table to match the shape of the keyboard. Separate searches for frequencies of line and column. Note that this is easily extensible to handle the 4 x 4 keyboard. Structure of the event added. Added the stop command (but not implemented stop to the loop of the file). Added indicators for diagnostic purposes. Added FFT spectrum and graphic.

    I disabled writing to part of the file for testing.

    Lynn

  • How to send the value of inside while loop outside

    Hello

    The goal of my project is to control the height of a ball in a tube (there is a fan down low to lift the ball to the top and bottom) and a Top ultrasound sensor read the distance of the ball.

    I am currently using a PWM signal to control the speed of the fans (which works fine) and I use the VISA blocks read/write to communicate to my sensors (which works also very well - I can get the distance to the ball - when I move the ball up and down changing the duty cycle).

    My problem:

    Now, to create a control problem, I need read the distance of the ball, have some sort of controller and feed in this output as my new duty cycle for the fans... However, I need loops I have (running fans and continuous sensors to run (I guess? unless there is a way around it.) so the fans continue to work and sensors keep reading.) I need to get the measure of the distance of the loop of the sensor (after its been read) passed out of the loop and to be updated of course - then calculations can be made on that and then can be used as my duty.

    Someone in a way that I can do this? Its all tied to your reference, version of labview 8.6.

    Thanks heaps!

    Nick.


  • should which product I buy to be able to save and send the data entered in a form?

    Hello, should what product I buy to be able to save and send the data entered in a form?

    Hi clarka14179614,

    If you are referring to record and send after filling out a form, you can either use an Adobe Reader or Acrobat application.

    Adobe Reader is a free service and you can install it here: Adobe - Adobe Acrobat Reader DC Distribution

    Let us know if you need additional assistance.

    Kind regards

    Meenakshi

  • Sends the data backend Java

    What is the best way to send a flex object to a java backend and then do something about this on the server? I have a table that contains a custom class. When the user clicks on send, I want to send the picture to Java, then get the content of the table to handle the content and write it to a file.

    I have a remote Java object I want to send the data, in order to manipulate it. I don't think that I need a remote object to represent the purpose of flex, but because that would mean that whatever changes I do object in flex continually is sent to the back-end right? I want to just send it in one appointment once the user has finished editing on the front-end server.

    I found XML serializers that people did that recursively go through the object and create XML. It must then be deserialized on the coast of Java. I thought that there must be an easier way. Is there a library or something for this?

    Perhaps, I do not understand the reason for your implementation so don't take no not this personally.  But why would you send a Canvas object, which is part of the view on the server?  If you are only wanting to send the data contained in the text to the server for processing objects you want to do is create a ValueObject (TransferObject for some) and send it to the server, as well as perhaps instructions you want to send.

    On the other hand (and this is just a blind guess at what you're trying) If you are wanting to send the objects so that you can implement some sort of compilation side server, then you want to send the object to plain text for the Web as one of the settings contained in your ValueObject.  Alternatively, you can use Adobe AIR and zip all of the defined object and send the file to the server where it can be decompressed and compiled.

    Here is a blog post on data transfer between Java and Flex using RemoteClass.

    ATA-transfer-objects-from-Java-to-Flex/ http://pachamuthu.wordpress.com/2009/07/15/using-BlazeDS-to-Send-User-Defined-Data-types-d

    I hope this helps.  If this isn't the case, then perhaps a little more information on what you are trying to accomplish might help.

    -Joe

  • Sharing data between multiple while loops, competitor rates

    Hello

    I am trying to Exchange data between competitor while loops running at different speeds.  What is the recommended way to do this?    In practice, I have 12 indicators and 3 cards I would update (on screen) in the slower loop, although the data acquired and stored on disk in the fastest loop.  The image below is a simplified version of what really works my candidacy.

    I currently use local variables and shared to achieve this.  I heard however that local variables are evil because of their use of memory (data are copied instead of who passed by reference).

    Thanks for your suggestions,

    Adam

    Hi Adam,.

    Yes, here you go.

    Mike

  • Send the data stored in the variable clob as an attachment

    Hello

    Im trying to send an email with an attachment usinng UTL_SMTP. The following code queries data in the table and stores it in a variable of clob. But he throws ORA-06502: PL/SQL: digital error or value every time that I run it. The data is greater than 32 k. Can someone help me with this

    Create or replace procedure MAIL AS

    BEGIN

    DECLARE

    l_clob CLOB.

    BEGIN

    l_clob: = ' FIRST_NAME, LAST_NAME, ARRANGE_DATE, SLOT_FROM, SLOT_TO, Address1, WORKNUMERO, HOMENUMBER, LAPTOP, employe_id, COST_CENTER;

    FOR c1 IN (SELECT *)

    RESULTS)

    LOOP

    l_clob: =.

    l_clob

    || CHR (10)

    || C1. FIRST NAME

    || ','

    || C1. LAST_NAME

    ||','

    || C1. ARRANGE_DATE

    ||','

    || C1. SLOT_FROM

    ||','

    || C1. SLOT_TO

    ||','

    || C1. ADDRESS1

    ||’,’

    || C1. WORKNUMERO

    ||','

    || C1. HOMENUMBER

    ||','

    || C1. PORTABLE

    ||','

    || C1. EMPLOYEE_ID

    ||','

    || C1. COST_CENTER;

    END LOOP;

    SEND_TRANSPORT_MAIL (p_to = > ' [email protected]', )

                p_from        => ' [email protected] ',

    p_subject = > "Dump."

    p_text_msg = > ' Hi

    p_attach_name = > 'DUMP.csv. "

    p_attach_mime = > "text/plain",

    p_attach_clob = > l_clob,

    p_smtp_host = > 'a.b.c.d');

    END;

    END;

    /

    SQL>begin
      2    dbms_output.put_line( length( rpad( ' ', 32767 ) || 1234 ) );                        -- result in clob with length 32771
      3    dbms_output.put_line( length( rpad( to_clob( ' ' ), 32767 ) || 1234 ) );             -- result in clob with length 32771
      4    dbms_output.put_line( length( rpad( to_clob( ' ' ), 32768 ) || to_char( 1234 ) ) );  -- result in clob with length 32772
      5    dbms_output.put_line( length( rpad( to_clob( ' ' ), 32768 ) || 1234 ) );             -- ORA-06502: PL/SQL: numeric or value error
      6  end;
      7  /
    

    32771

    32771

    32772

    Start

    *

    ERROR on line 1:

    ORA-06502: PL/SQL: digital error or value

    ORA-06512: at line 5

    It looks like to the | default operator using varchar2.

    In line 3 the clob and number are implicit cast to a varchar2, and both are concatenated in a clob

    In line 4 the clob cannot be cast to a varchar2 because it is in the long run, so Oracle varchar2 (with the number) caste implied on the clob type too, that succeeds

    In line 5 the clob cannot be cast to a varchar2 because it's for a long time, so Oracle is trying to get the number to a clob to-online error

  • Why convert? What is the advantage? Why convert it before you send the data over the network?

    Hello everyone.

    I have a question quite simple and intuitive. Yet Google does not seam to get the answer.

    Basically, I'm curious why should we catalogued something? It seems to me that it's just a little like a "band-aid" for editing data in conversion to a new data type, when it is not properly declared with an appropriate data type. What would be the advantage of this?

    Furthermore, I see a lot of data type casting to U8 programs before sending it over the network. Various reviews say it's for speed, but I can't understand how it improves speed. The same amount of data is still sent, just in a different type of data. This is overcoming a limitation of the network. The network somehow send smaller data types faster?

    I've been curious about this for a while and have yet to find an answer. Any help is appreciated.

    Thank you
    Taylor S. Amarel

    tsa256 wrote:

    Basically, I'm curious why should we catalogued something? It seems to me that it's just a little like a "band-aid" for editing data in conversion to a new data type, when it is not properly declared with an appropriate data type. What would be the advantage of this?

    It really depends on the specific situations.

    For example, some functions explicitly require certain types of data as inputs if they are not polymorphic.

    This means that if you do not convert the data yourself and you will see a red dot forced LabVIEW will do it for you.

    As to why the data was not the correct data type in the first place, it is sometimes inevitable.

    A few examples

    -What happens if you just read a text file as a long string.

    If there is digital data in this file, you need to analyze, and then convert it to a usable type (int, sgl, dbl, etc.)

    -you are given a 3rd part VI, dll, etc. that returns a numeric value as a double, but you need the value to I8.

    You cannot change the output of the function given to you, so what you can do to remedy this situation is cataloged data.

    tsa256 wrote:

    Furthermore, I see a lot of data type casting to U8 programs before sending it over the network. Various reviews say it's for speed, but I can't understand how it improves speed. The same amount of data is still sent, just in a different type of data. This is overcoming a limitation of the network. The network somehow send smaller data types faster?

    Somehow, this is my first response, but in a more general sense.

    Many functions down to the level of the OS run in binary.

    If your data are not already in binary, the sending computer must convert it to binary, and then send it, have the receiving computer convert in return.

    Two conversions on each side of the transmission add unnecessary delays.

  • Sends the data sequentially to the FPGA to a file during playback

    Hi all

    I am a new user of the Labview FPGA module, and I need your help.

    I have a huge file in my computer and I want to treat my FPGA Module. I have a VI divided into small files first, but to my FPGA I do not know how. My idea is to create two blocks of memory in the FPGA in order to have a structure of Ping-pong, module while the second memory is written the first memory was read and the data is processed.

    The first problem is to forward these data to my blocks (as text and the FPGA does not accept it).

    The second problem is that I don't know if as it is made of wiring will work. Can you help me it wiring? I don't know if data should I wire in the host of the read method will go directly to the data items in the FPGA VI.

    Created memories are 64 MB each. I work with FlexRio.

    Thanks in advance.

    Greetings from King,
    Miguel.

    What you want to do, is create a DMA FIFO to send data down to the FPGA.  Make the data type of the DMA a U8.  Thus, on the side of the host, you just read your data from the file, use the array of strings of bytes and write to the DMA FIFO.  On the side of FPGA, you read DMA FIFO inside a loop TO make your table and then treat.  You may need to use a different DMA FIFO to send data to the host computer.

  • Custom DataGridColumn sends the data to the ItemRenderer

    I use the as3 syntax to create a few advancedDataGridColumns and specify to use cusItemRenderer

    by "col.itemRenderer = itemRenderer;". ""

    I have replace the function set the ItemRenderer in the class of AdvancedDataGridColumn customed.

    But the itemrenderer is unable to get the data.

    Is there anyway to get the 'datafield' and 'headerText"DataGridColumn properties in the itemRenderer?

    This is my code:

    / / I create an ItemRenderer to pass to all DataGirdColumns

    var itemRenderer:cusItemRenderer = new cusItemRenderer();

    / / I create some columns

    Col = new AdvancedDataGridColumn (flatColumns [i]. Label);
    col.dataField = "@" + flatColumns [i]. Field;

    col.itemRenderer = itemRenderer;

    public class cusAdvancedDataGridColumn extends AdvancedDataGridColumn
    {
    override public function set itemRenderer(value:IFactory):void {}


    var itemRenderer:cusItemRenderer = value as cusItemRenderer;

    itemRenderer.parentField = this.dataField;
    itemRenderer.parentLabel = this.headerText;


    super.itemRenderer (itemRenderer);

    }


    }

    public class cusItemRenderer extends AdvancedDataGridItemRenderer implements IFactory
    {

    / / They are always null ~!
    public var parentField : String = null;
    public var parentLabel : String = null;

    function public newInstance(): * {}
    return new cusItemRenderer();
    }

    }

    The itemrenderer set went from an Ifactory, not the actual converter class

    or an instance.

    If the rendering engine implements the IDropInListItemRenderer, it should have a

    property columnIndex in the listData which can be used to find the column.

  • mirror of the data in a table separated through trigger

    Oracle 11g r2.

    Table_account holds public user and professional info for registration (public username, name, address, logo)

    (this table can contain 1 million records)

    Table_skill(Technician Name), table_skill_child, table_skill_grand_child, table_skill_ext

    When the search for technical info, the sql will be executed against the Table_skill.  However, given that I also need to get the company name, address and information of logo with the technician information, there are two approaches:

    (1) join Table_account and Table_skill, table_skill_child, table_skill_grand_child, table_skill_ext

    Select the name of the technician, name, address, company logo

    Table_account Table_skill, table_skill_child, table_skill_grand_child, table_skill_ext

    where the...

    PRO: simple join

    CON: public user info is not necessary at all (this could potentially slow down the query speed?)

    (2) reflect the data, that is when the company data to the Table_account, use relaxation to copy the name of the company, save him address and logo on the Table_skill.  When looking for technicians, it will be fast, no need to exclude the public user names the table_account

    Select the name of the technician, name, address, company logo

    of Table_skill.

    table_skill_child, table_skill_grand_child, table_skill_ext

    where the...

    PRO: table_account, which contains the unwanted public modules is eliminated

    CON: deduplication of data for example, the logo in several tables

    Want to hear your opinion.

    Thank you

    Scott

    Hi, Scott.

    scottjhn wrote:

    Oracle 11g r2.

    Table_account holds public user and professional info for registration (public username, name, address, logo)

    (this table can contain 1 million records)

    Table_skill (name)

    When the research is done, the sql will be executed against the Table_skill.  However, given that I also need to get the company name, address and logo information, there are two approaches:

    (1) join Table_account and Table_skill

    Select the name of the technician, name, address, company logo

    of Table_account Table_skill

    where the...

    PRO: simple join

    CON: public user info is not necessary at all (this could potentially slow down the query speed?)

    (2) reflect the data, that is when the company data to the Table_account, use relaxation to copy the name of the company, save him address and logo on the Table_skill.  When looking for technicians, it will be fast, no need to exclude public usernames

    Select the name of the technician, name, address, company logo

    of Table_skill

    where the...

    PRO: a table involved

    CON: duplicate data, such as the logo in several tables

    Want to hear your opinion.

    Thank you

    Scott

    Another "con" is the difficulty of maintaining the data.  As you say, the performance will be better when doing a query that contains the replicated data, but DML will be slower.  Depending on how often you are DML and how many times you make queries that would benefit the denormalization, the benefit may or may not justify the costs.

    There are many problems involved with triggers, in addition to the performance.  A materialized view can be a better option, especially if you can tolerate slightly obsolete results (i.e. ' stale').

    This sort of thing is often done in Data Warehouse applications, where DML is frequent.  Search for the words "Data Warehouse", "Denormaliztion" and "Réplication" to learn more about the subject.

    Most of the time, people join in situations like yours.

  • How to control the rate of acquiring data in a while loop

    I'm trying to use a digital trigger to collect data on the rising and falling edge. The design is displayed as below. Now, I save the measured voltage 1 & 2 to the local variable in the while loop. Hoever, the while loop runs at a frequency of more compared to the structure of the case triggered. So I had a lot of repetitive data.  If I record data directly from structure of the case, it will be recorded as data-0-date-0 because of the ongoing case of fake wire.

    I wonder how to revise to save the measured voltage 1 & 2 at the same frequency of up/down edge triggered? Thank you! I have also attached my current version of Labview program, which takes place in time real Labview 2013.

    Mcdullna wrote:

    Thank you for the answer. Could you be more specific about the use of the shift register?

    The case of false just past the value through.  With this configuration, you agree that the data remain in the son, avoiding race conditions.  It is also more effective than the use of local variables.

  • Transfer the data to one Compact Z5 to another by using a backup

    Simple question really:

    My back to the top of a compact Z5 be usable an another new compact Z5? (to add all the data saved on a new phone)

    Hi @KevinBaykr,

    You happen to already have a backup made in Companion Xperia? If you do, use the Xperia transfer function inside the software to transfer the backup to your new Z5 Compact.

    If you have not already backup, use an OTG adapter to connect a wired USB mouse to navigate with your broken screen. Go to settings > phone > press the Build number down 7 times, once it is said that you are a developer go to settings > Developer options > enable USB debugging, then choose USB configuration and make sure that it is on the PSG.

    When you now connect your device to your computer, it must be recognized so that you can create a backup in Xperia companion and later use Xperia transfer.

  • Help! Lost all the data and contacts while Hotsync-ing

    OK - I'm a fool.  I have a Treo 650 and have had problems of synchronization - lying there.  Today, I had the brilliant idea to delete all my contacts and calendar on my computer and starting over.  I put the phone hotsync and after a few minutes received an error message saying that the sync-ing process was interrupted.  Then I discovered that all the data of contacts and the calendar on my palm has been eliminated.  I thought that I had made a backup, but, just, did a search on my computer (XP Home) and couldn't find any file with .aba.

    Help Help Help

    Paul

    I had hotsynced.  There seems not to be problems with the settings on the computer, but the hard reset was eliminated my cable/dock setting.  I've recreated in this regard, hit hotsync on the 650, and he ran through the whole process.  Data on 650 and PC.  Now, to re - create my calendar

    Thank you very much!

    Message is about: Treo 650 (Cingular)

Maybe you are looking for