How to load serial strings one at a time via loop?

Hi,
I am new to LV and programming in general.  I am using a VI to
communicate with an uP app that sends commands to my DUT to make it
enter certain test modes.  The app uses Hyperterminal and simple
keyboard commands to access menus.
The VI is basically working, but I want the serial string write
procedure to have a "load" button, so I can enter the string, then
click "load" or something like that.  After this works I can
expand from there, eventually creating a prompt-style app for each test
mode.
Is there an example of this (or something applicable) I can study? I am
trying to use a while loop, but am getting lost as to what to do next.
Thanks, Don

Don;
Here's another take on your problem. It doesn't have a load button because it "transmits" the data when you press enter. In addition, I added a window that lets you maintain a record of the commands and responses that have gone back and forth. When you run the VI type something into the command area and press enter. The command and the internally-generated "response" will appear in the window to the right.
If you look at the diagram you will see that it was built using event-driven progrmming. In the event for handling changes in the command string, you'll see the place where I have my demo serial io vi. Replace that VI with one that really sends commands to the external device and reads the response and you have a nice interactive interface for the device.
Note I have also added some error handling (always very important). Basically the little green icon to the left of the loop creates a user event for errors. The little bitty green icon at the right side of the loop looks at the error cluster coming out of the event structure after each execution. If it detects an error it fires the error user event to display the error to you. The green icon to the right of the loop is deinitialization.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps
Attachments:
LoadString2.llb ‏158 KB

Similar Messages

  • Can u give clear steps how to load 3 data target at a time by the help of p

    can u give clear steps how to load 3 data target at a time by the help of parllalesim

    hi,
    create the load infopackage type and give the infopack you need to load.
    create 3 similar process types.
    chain should have this flow
    start -> delet index(if cube is the target) -> load target(connect the load process to start process) parallel -> and process -> create index(if cube)/actiavtion of ods(if ods)
    Ramesh

  • I want to copy email from my mac to my pc. Forwarding one at a time via email works well, but when I try to forward several of them at a time I receive one large email. I want to receive the emails individually on my pc. Any suggestions?

    I want to copy email from my mac to my pc. Forwarding one at a time via email works well, but when I try to forward several of them at a time I receive one large email. I want to receive the emails individually on my pc. Any suggestions?

    Don't know any 'automatic' way - but, i have "Fetch Headers only" set on each of my 'secondary accounts'.
    With varying internet service, manual "Get Messages" is probably the "Best Practice" because you will know how good your service is before you even try.
    maybe set "Check for new messages every 'n' minutes" to different times
    (3 minutes, 6 minutes, etc.) on each 'secondary' account.

  • Dynamically loading images?One at a time :(

    codeworld....help...sos.....send in more troops....the titanic is sinking.....
    The problem:
    I am trying to load dynamic images in order without all of them attempting to load at once....
    I have an array of images that I loop through depending on the gallery that will load up....but when i loop through the images all of them try to load.
    What i need to happen is somewhere in the loop i guess....each image fully load....then goto the next image and fully load.....etc.....
    Basically each image load one at a time in order......and the list is dynamic so uhhhhh HELP ......????
    save narnia....save tinseltown.....awww hell sacrifice yo self and just save me .....

    ok ok......one of these i'm going to make work
    ....thanx for all the help....
    this is kinda the basics of how i got the method looking that i will change
    for(var i=0; i<listArray.length; i++)
                   //picListLoader is a custom class......its just the loaded picture and some variables attached to it.....
                    var picture:picListLoader = new picListLoader(pID, ptitle, pdesc, picURL, i );
                    picArray.push(picture);
                    addChild(picture);
    i think instead of calling the class to create the individual objects......
    i'm going to create a gallery object......and send in the info....and once all of the picture's urls and info is loaded into the object tell the gallery object to load each one of the pictures using one of the methods above......and that should cure my ills
    smallville was saved once again................byMe... ...selfGlory..... .......(ok....saved by yall) thx a million
    thelegendaryghost

  • How to download new podcasts one at a time?

    Hello,
    can anyone tell me how to download new podcast episodes one at a time? I have a slow 70k flatrate and iTunes starts all downloads at the same time, so most of them stop because they are too slow. So I have to klick each episode manually. Instead, I would like to leave my PC for one hour, and then all the podcasts should be there.
    Many thanks,
    Danny
    Acer Aspire 9500   Windows XP  

    You can't you will have to set it to manually update wheere you update each one manually

  • How to load several documents at the same time (PWA 2013)

    Hi
    In 2010 there was an option for that:
    In the document library of a project site, I want to load several documents at the same time.
    How can we do that in PWA 2013 ?
    Thanks

    Robert,
    Here is a video taht might help. if the Dragging does not work, you could also use the regular Explorer method.
    https://www.youtube.com/watch?v=7n4fP3YWYI4
    Cheers,
    Prasanna Adavi, Project MVP
    Blog:
      Podcast:
       Twitter:   
    LinkedIn:
      

  • How to load data from one Infobject into another in the same system??

    Hello All,
       i need to load hierarchy data (already existing in 1 Infobject) into another newly created Infobject in the same BW system.Is there a way to do it without involving flat files??
    Thanks soo much in advance
    Regards,
    Priya

    hi
    say there are two infoobjects X  and Y.
    X is existing infoobject and Y in new one.
    go to infosurce-search for X-create export datasource - map the rules and load the data.
    This is one way.
    Other way is u can use X as a reference object of Y so that both of them have same structure and both objects will share common database tables in BW which are exsting for X.
    Hope this helps.
    Kindly assign the points if it helps.

  • How to load  a tables one partition of data in to OWB target table

    Hey ,
    I want to load only one partition data from source (size in Tera bytes) in OWB tables. I used filter condition as per the partition done on a key value. But Its take so much time to load the data into the target table.
    I feel to configure the source table as well as target table and give some HINT command in operator settings . Is it right to improve the performance of loading .
    Can I use PEL option in source as well as target .
    suggest me please
    thanks
    murari

    Hi Andreas,
    This error has not been documented yet, but I got the information from the other forums.
    Error Name                            Error Code (hex)    Description
    LinBusErrorTxSyncTimeout         1040                  The LIN interface master task attempted to send a
                                                                               sync byte and did not self not receive the sync byte
                                                                               within the timeout period.
    This is the description. The problem is solved, the baud rate i was giving was higher than the slave units baud rate. Now it seems to be functioning correctly.
    Thank you.

  • How to load model from one DC to other ?

    Hi ALL,
    I have created a WebDynpro DC (say A) , and created a EJB Model (in this case , but can be any Model) and exposed the same as public part.
    How do i use this from some other WebDynPro DC (say B)?
    I need to load that model created in A from the B and use it for creating the model nodes at runtime and using it for getting the data (All through Dynamic programming )?
    Regards,
    Madhusudhan

    Hi madhusudhan,
                               Hope this will help
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cef4f43e-0d01-0010-db84-ede25c874115">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cef4f43e-0d01-0010-db84-ede25c874115</a>
    <a href="/people/sap.user72/blog/2006/07/27/arfc-without-model-nodes-you-must-be-joking-right:///people/sap.user72/blog/2006/07/27/arfc-without-model-nodes-you-must-be-joking-right
    regards
    Sumit

  • How to draw 2 Strings one after the other?

    Hello,
    I have this code, and I would like to know how can I draw the string "s2" right after the first string "s1" on this panel, so that it comes right behind it while they're moving?
    Also, how can I make some of the strings drawn clickable (Like links) so that when I press on them some action is performed?
    Thanks a lot.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class VertMovingTextPanel extends JPanel implements ActionListener {
        Timer t = new Timer(5,this);
        int x = 10 , y = 0 ;
        public VertMovingTextPanel()
        public void paintComponent (Graphics g){
            super.paintComponent(g);
            String s1 = "Alert number 1";
            String s2 = "Alert number 2";
            g.drawString(s1, x, y);
            //g.drawString(s2, x, y);
            t.start();
        public void actionPerformed (ActionEvent e)
            if (y < 0 || y > 600 )
                y = 0;
            y ++;
            repaint();
        public static void main(String[] args) {
          JFrame frame = new JFrame("Alerts");
          VertMovingTextPanel vp = new VertMovingTextPanel();
          frame.add(vp);
          frame.setVisible(true);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setSize(600,600);
    }

    Use g.getFontMetrics().stringWidth(s1) to get width of the s1. Add the number to the x2.
    To have it clickable create Rectangle(s) for the string bounds. When user clicks use x and y position and check if the rectangle contains the point.

  • How to load data from one Infocube to another request by request using DTP

    Hi All,
    I have a scenario where we are maintaining backup Infocube B for Infocube A.  User loads data from a flat file many times a day in different requests.  We need to maintain backup of the Infocube A on weekly basis.  i.e data to be refreshed with delta update from cube A to cube B.  There are some situations where user deletes some of the requests in Infocube A randomly after use.  Will this change effect in back up cube B when performed data refresh from cube A to cube B.  i.e. this functionality is similar to reconstruct in BW 3.5.  Now we are running on BI 7.0 SP 9.
    Can anyone answer this ASAP.
    Many Thanks,
    Ravi

    You cannot load request by request, " Get Data By Request " DTP loads request by request on " First In First Out " basis. You can run some Pseudo/Fake DTP's if you dont want to load data from a particular request.
    If the user deletes a request from Cube A, it wont be loaded to Cube B but if it is already loaded in Cube B and later the user deletes the request from Cube A you have to delete the request frm Cube B. Inorder to monitor request by request run DTP with   " Get Data By Request set.

  • Infopath: How to load data in one field based on value selected in another field

    We have a drop down list field in the infopath form and we have some more fields that should change depending on the dropdown selection. 
    How can we achieve this please ?
    Thank you !

    Hi Prajk, sounds like you want to do cascading dropdowns. If so, see the link below. If you're just trying to enter information into a field (not a dropdown) based off the value of the dropdown, then set a rule so that if dropdown = "this," set
    the field's value to "this."
    http://blogs.msdn.com/b/bharatgupta/archive/2013/03/07/create-cascading-dropdown-in-browser-enabled-infopath-form-using-infopath-2010.aspx
    cameron rautmann

  • How to load files up one step from local working directory

    Good afternoon,
    I have a project assigned to me that has some Ni TestStand code written to read files from a fixed directory and I would like to change this directory to be the directory where the TestStand seqeunce file is located.
    Furthermore, I would like to be able to step back one directories and forward into a different directory. Is this possible? I know in linux his is done with ..\ preceeding the directory location
    I want ot do this for variables in TestStand and also for pats in LabView.
    Cna somebody provide me with the correct syntax, for example if
    my seq file is C:\User\Test\myseq.seq
    and I want to open an ini file located in
    C:\Config\config.ini
    Should I save the path for the variable as
    ..\..\Config\config.ini ?? 
    Thanks,
    -D

    1) If you want to use a relative path that is resolved the same way as a module path (i.e. using the teststand search directories where looking in the same directory as the sequence file is one of the default possibilities) you can do something like the following:
    FindFile("..\\Config\\Config.ini", True, Locals.absolutePath)
    2) RunState.SequenceFile.Path actually includes the sequence file's name, so if you want to build a path from that you would need to do something like the following to parse out the part of the path you care about (though maybe an extra ".." instead of doing this parsing works to get past the file name too, I've never tried that. Perhaps either way is fine.):
    Locals.absolutePath = Left(RunState.SequenceFile.Path, Find(RunState.SequenceFile.Path, "\\", 0, False, True) + 1) + "..\\Config\\Config.ini"
    3) Whether or not you need to build an absolute path or can use a relative path depends on what you are doing with the path, if you provide more details on what you are doing with the path we can let you know. In general, you should not use a relative path when calling a win32 API.  See the remarks section of the following where it says, "Multithreaded applications and shared library code should not use the GetCurrentDirectory function and should avoid using relative path names.":
    http://msdn.microsoft.com/en-us/library/windows/de​sktop/aa364934%28v=vs.85%29.aspx
    Though if you are calling a TestStand API then a relative path might be ok, depending on the API call, because some teststand APIs can use the TestStand search directory algorithm to resolve the path (basically the equivalent of 1 above).
    Hope this helps,
    -Doug

  • How to load dynamically String into a VI using LabVIEW Run-time Engine Version 7.0?

    I would like to be able to traduce string into my application using import string method. I create an program with my VI to translate. When I use the import method, I get this error: the VI is locked. WHY ? because it works well in the edit mode but not using LabVIEW Run-time Engine Version 7.0 .

    Hello loup,
    If you call dynamically a VI in your LabVIEW application you must add this VI when you build the .exe file.
    To add this VI, go to the Tab "Source Files" when you build application and click on "Add Dynamic VI..." then chose the VI you call.
    It should solve your problem.
    In the attached file you can found an example of LV program that translate front panel.
    Try to build exe file and add "Languages.vi" as dynamic VI and .txt files as "Support files".
    I test it, it works.
    I hope that this will help you.
    Best Regards,
    Sanaa T
    National Instruments
    Attachments:
    Translation.zip ‏69 KB

  • How do you copy music one at a time without syncing to a usb drive or from phone to itunes?

    How do you only copy a few songs I dont get it! Please help!!

    Syncing it's one way street, computer iTunes to iPhone (except content bought from the iTunes & App Stores).
    To sync muisc from computer iTunes to iPhone:
    1> Connect and select iPhone in computer iTunes left sidebar
    2> Select the Music tab, and select all the songs you want to sync to iPhone (As many or as few, you don't have to load all 30 GB of music)
    3> Click the Sync button.
    If the music on iPhone is not from/on your computer iTunes, you need a 3rd party software to upload it to the computer.
    On a Mac: http://www.ecamm.com/mac/phoneview/
    On a PC: http://www.wideanglesoftware.com/touchcopy/index.php

Maybe you are looking for