Using LabView to serial interface my microscope how I make a user interface to make the stage move by pressing buttons?

I have used LabView very little and am trying to write a program to control a microscope. I want to be able to give it commands such as to get the stage to move left, right, forward, back, and return to zero. I'm having trouble implementing the code into my block diagram. I've been reading LabView 8.6 tutorials for a couple of weeks and I'm still learning. What I know that  is that I need a event structure inside a while-loop for the user interface but I've been stuck.
Thanks for any help! If you need me to try and provide more information please say so.
Attachments:
Button.vi ‏21 KB

Alright so my serial port code should be inside a while loop unfortunately it doesn't work whenever I enter a command to move the stage. It sits there maybe I'm missing something.
So let me give you an overview to what happens in my code, so the configure serial port is very crucial. The VISA Write writes the bytes to the port. The first VISA Write takes the string to write command. I connected the second VISA write to make it easier whenever I enter a command, the \r will iniate the command as a whole. Example L\r will move the stage to Left once, ending up at VISA Read then closing. All of this found in separate case structures.
Now the user interface to control the the movement of the microscope is one of my issues, making several attempts to make it work yielded no results. My best work not the best but a attempt is attached, also one of the things with this I'm having trouble with is getting the button to talk to the stage. On previous buttons I worked on I could press the button and light up an LED on the front panel, I thought the same principle would relate to the movement of the stage, no such luck.
I hope I cleared up some misconceptions on my part, I appreciate your patience.
Attachments:
OptiScan.vi ‏14 KB

Similar Messages

  • How to avoid long user interface response time in long measurements ?

    Hi
    I tried to find more information regarding techniques how to avoid long user interface response times in case of extremely long measurement times with an external instrument communicating over GPIB, so I post this hoping to get some hint or a link to a guideline. I guess this is quite normal problem.
    Problem is that when I want to measure long time in order to get an average result from the instrument, I have to wait until the result is returned from the instrument. Obviously that makes the user interface response very slow in traditional technique. 
    My restriction is the old GPIB 488 instrument driver that I would not want to modify, but I have source code to it.
    What would be the best way to improve the response time for user interface ? I have looked into the few things:
    * multithreading
    * callback in main program for GPIB events
    * modifying instrument driver e.g. to support VISA and creating a VISA callback
    regards,
    Petri

    Several ways to do this:
    If you're getting several measurements, you could have the instrument generate an asynchronous interrupt (an "SRQ" in GPIB terms), then collect the data in response to the SRQ callback.  While you're waiting for the SRQ's, you can have your main thread running the interface so responsive GUI.  You don't have to spinlock on the GPIB read waiting for instrument data.
    Or, as you mentioned, you could spawn a thread to manage the measurements, and use a timer in the main thread to periodically allow you to check the status of the measurement thread.  Again, the main thread mostly just runs the user interface.
    Either way, the idea is to keep the main thread freed up most of the time to run the GUI, and have it periodically check for completion of your measurement sequence.  While you're waiting in the main thread, you may want to make sure the user can't inadvertently re-trigger another measurement sequence until the active one is complete.
    If you do find yourself doing a dead wait, you'd want to break this up into a series of shorter waits, and in between each wait, do a ProcessSystemEvents from the main thread to keep the GUI active.
    Menchar

  • I just purchased a movie from the iTunes store using iTunes ver. 11.0. The movie downloaded correctly is there on my hard drive but does appear in the iTunes library. How do I get it to appear in the iTunes Movie Library?

    I just purchased a movie from the iTunes store using iTunes ver. 11.0. The movie downloaded correctly is there on my hard drive but does appear in the iTunes library. How do I get it to appear in the iTunes Movie Library?

    Try Handbrake (http://handbrake.fr/), it's good and free

  • Using an iPad wi-fi 3G. How do I save received email documents in the my device? Really hate having to go through my emails to find a document. And where do I save it?

    Using an iPad wi-fi 3G. How do I save received email documents in the my device? Really hate having to go through my emails to find a document. And where do I save it?

    triplembm wrote:
    I downloaded a PDF from an email and have been trying to save the file in my document file.  When using Snow Leopard I used to hit Command S and it would ask me where I wanted to save the document.  i just got an iMac with Lion and when I hit Command S I get nothing.
    Welcome to Lion's new feature: Versions
    How do I save a document using Lion? 
    To save a NEW copy in Preview:
         File->Export
    You said that you d/l'd a PDF in Mail, so why not just click the "Save" button in Mail?
    (Make sure that you click the "Details" button in Mail)
    In Mail:
    BTW, I'm very happy with Lion.  (In regard to all the negative Lion posts, ask yourself if you're more likely post a comment here telling us how happy you are with features of Lion, or to complain about something that's changed).

  • I have written a binary file with a specific header format in LABVIEW 8.6 and tried to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I have written a binary file with a specific header format in LABVIEW 8.6 and tried  to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I can think of two possible stumbling blocks:
    What are your 8.6 options for "byte order" and "prepend array or string size"?
    Overall, many file IO functions have changed with LabVIEW 8.0, so there might not be an exact 1:1 code conversion. You might need to make some modifications. For example, in 7.1, you should use "write file", the "binary file VIs" are special purpose (I16 or SGL). What is your data type?
    LabVIEW Champion . Do more with less code and in less time .

  • HT1390 how can i view a list of only the rentable movies in itunes?

    how can i view a list of only the rentable movies in itunes?

    you mean using itunes for windows or from the ipad

  • If I get a user to enter their name as a variable and I am linking one movie to another using a button, is there a way to carry the user name forward into the second movie?

    If I get a user to enter their name as a variable and I am linking one movie to another using a button, is there a way to carry the user name forward into the second movie?

    Hi there
    See if the link below helps
    Click here
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • How to link two user interfaces together through networking using java??

    Im doing an java assignmet...the entry system...
    I have to create two interfaces ..
    one is a interface which is a keypad and let user key in their password
    for accessing...
    another interface is receive the password and determine whether it is valid or not...
    Two interfaces is on different computer.....
    I have to link these interfaces together using java....
    PLS HELP!!!!!!

    It sounds like you should probabally use RMI.That is, remote method invocation...these guys are doing a more complicated version of what you want to do:
    http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_20680356.html#8935218
    Be sure to check out Sun's RMI tutorial:
    http://java.sun.com/docs/books/tutorial/rmi/
    Happy coding! Sounds like a fun little project...I want to do some RMI sometime when I get a chance...

  • I just bought a new iMac and I am using a apple air port router.  How do I connect mt windows PC to the air port router do I can move files

    I Just purchased a 21.5 iMac and connected it to the Internet using a apple air port router.  How do I connect my windows PC to my air port router so I can transfer files.

    It makes life easier to install the airport utility for windows.. which has a couple of different apps in it.. if you airport is new type then the utility is too old.. but is still valuable for Bonjour which provides network information for shared devices in the apple world to windows.. and a disk access agent..
    It will also help the Apple computer access shared directory in the windows computer.. nowadays this is pretty easy.

  • If AME 2014 no longer allows .flv export, how am I supposed to import videos to the stage for use in Flash CC?

    Flash CC will notimport .mp4 videos for use on the stage, only .flv. This seems like an ENORMOUS oversight, so maybe I am missing something. But if I'm not missing anything, WHEN THE **** WILL ADOBE UPDATE FLASH TO MATCH THE STUPID FORCED WORKFLOW UPDATE THEY'VE DONE WITH AME AND AFTER EFFECTS? I HAVE TO USE SOME RANDOM 3RD PARTY WEBSITE TO CONVERT .MOV OR .MP4 FILES TO .FLV FOR USE IN FLASH!?!?!?!?!?!!?!?!? ARE YOU KIDDING ME?!?!?!?!?!?!!?!?

    This forum is for Flash Media Server Developers so most likely you migth get much traction here. I would recommend you to post your query on Flash Builder forum: http://forums.adobe.com/community/flash_builder/using_flash_builder
    Also you can try posting here:
    Flash Platform Services For Promotion - http://forums.adobe.com/community/promotion
    Flash : http://forums.adobe.com/community/flash/flash_general

  • HT4085 How do I lock my ipad screen so the swipe action and side button on screen don't work? My cats do these things and the game disappears.

    How do I lock my ipad screen so the swipe action and the side button on the screen do not work?  When my cats play a game on my ipad, they regularly swipe the screen and push the side button and the game disappears.

    The button on the top that you use to lock and unlock or put to sleep is the power button.  The button lower center of the screen is the home button...can be used to also wake from sleep and switch to the base home screen.
    Good to hear you are now able to lock rotation, even if you are not sure how you did it
    If you go to the iBook icon, tap Store in the uppper left side of the screen, you can search for the iPad User Guide...a free download that will place the guide in your iBooks library as a great source of background information.

  • How do I get my iPad to have the same movies as my mac?

    I just got iMovie for my iPad and I have several movies on my MacBook pro but I don't know how to get them to my iPad. I heard there was this thing with iTunes but I don't know how to use it.
    Thanks!!!

    Yeah, I think you want to go to the Share Menu > Share to iTunes for each of your movies on the MacBook. Then connect your iPad to the Macbook and in iTunes sync the Movies up to the iPad:
    http://macgroup.org/blog/2010/05/10/sync-your-iphone-ipad-or-ipod-touch-with-mul tiple-computers/

  • How to create a user that can login the LDAP?

    I want to create a user that can login the OID/LDAP. I know how to create a user, it is allowed to login OIDDAS, but I also want the user to grant access to ldap directly. How do i do that?
    And how can I give it read rights and or update/delete rights on a specific tree?
    Regards
    Eelco

    Eelco,
    did you see the OiD developers guide? Here you find some examples how to create users in OiD using pl/sql or java.
    http://download-west.oracle.com/docs/cd/A97329_03/manage.902/a95193/smplcode.htm#637294
    how to use directory access control can be found in
    http://download-west.oracle.com/docs/cd/A97329_03/manage.902/a95192/access.htm#1054232
    --Olaf

  • How to enable multiple users logging in to the same client machine?

    Hi,
    We have our home directories shared from the server (using AFP) and this allows our users to log in to any machine via the normal console login.
    But if you try to remotely login to a machine with ssh, and another user is already logged in at the machine, then you get the error message:
    Could not chdir to home directory /Network/Servers/machinename/Users/keith: No such file or directory
    I can connect (via) ssh, only if no user is logged in at the console. If I connect with ssh when no users are logged in, and then a user logs in at the console, then this unmounts the home directory for the ssh user.
    I have read about the mnthome command, and if I try running this (from my ssh login whilst there is a console login) then I get the error message:
    Error: Mount failed with error 1 Operation not permitted
    I'm assuming that multiple ssh logins must be allowed somehow? Can you only do this if you share your home directories with NFS (in this case, I understand that all home directories always appear mounted on each client)???
    Any help appreciated,
    Keith
    Server and all clients running 10.4.3
    iBook & PowerMac G5   Mac OS X (10.4.3)  

    Thanks for the info. I really thought that this would be a fixable problem. I also thought that it might work when two different users both logged in using ssh only (i.e. when there is no console login). But this also causes problems for the second ssh login.
    What practical work-arounds have people tried? The respondent to your other post (linked to above) suggested that NFS sharing might work, only that ssh logins still don't mount the home directory. Is this the case?
    Thanks for the speedy answer.
    Keith

  • How to effectively remove a loaded SWF from the stage?

    I can not figure out a proper coding to remove a loded SWF from the stage.
    Here is my set up.
    I have a layout segmented into labeled section. In the section labeled "products" I have a layout consisting of product images acting as buttons which bring a user to another labeled section "prdctsPopUps"
    In the "prdctsPopUps" section I have placed an instance of LoaderMax placed into an mc container. Placing LoaderMax into an mc container automatically resolved an issue of clearing loaded SWFs from stage when I come back to "products" section.
    I specified the variable in the "products" section with the following set up:
    var sourceVar_ProductsPopUps:String;
    function onClickSumix1PopUp(event:MouseEvent):void {
                        sourceVar_ProductsPopUps="prdcts_popups/sumix1-popup_tl.swf";
                        gotoAndPlay("prdctsPopUps");
    So each button has its own "....swf" URL and they all open fine and I can come back to "products" section without any issues.
    However inside the swf (which loads through LoaderMax which is placed into an mc) there are other buttons which bring a user to labeled section "xyz". Which also functions properly. It opens as it is supposed to be and without any previously loaded "...swf" on the stage.
    At the labeled section "xyz" there is a limited set of buttons repeating from section "products" which has to bring a user back to the same set up in the "prdctsPopUps" labeled section and open a corresponding "...swf" .
    However only the last opened "...swf" will appear in that section. Effectively the one which was originally opened from the "prdctsPopUps" section and not the one which was supposed to be opened from the "xyz" section.
    I can not understand why it would work from one labeled section and not from another. I can not figure out on which section which code/function needed to be placed.
    Here is the set up from a button from the "xyz" section whcih supposed to bring a user to the same "prdctsPopUps" section but to load a different "...swf"
    var sourceVar_ProductsPopUps_fromXYZ:String;
    function onClick_floralytePopUp_fromXYZ(event:MouseEvent) :void {
                        sourceVar_ProductsPopUps_fromXYZ="prdcts_popups/floralyte-popup_tl.swf";
                        gotoAndPlay("prdctsPopUps");
    Here is the code set up for the LoaderMax from the "prdctsPopUps" section:
    var loaderProductPopUps:SWFLoader = new SWFLoader(sourceVar_ProductsPopUps,
                                                                                                        estimatedBytes:5000,
                                                                                                        container:holderMovieClip,
                                                                                                        onProgress:progressHandler,
                                                                                                        onComplete:completeHandler,
                                                                                                        centerRegistration:true,
                                                                                                        alpha:1,
                                                                                                        scaleMode:"none",
                                                                                                        width:540,
                                                                                                        height:730,
                                                                                                        crop:true,
                                                                                                        autoPlay:false
    function progressHandler(event:LoaderEvent):void{
              progressBarPopUp_mc.gradientbarPopUp_mc.scaleX = loaderProductPopUps.progress;
    function completeHandler(event:LoaderEvent):void{
              var loadedImage:ContentDisplay = event.target.content;
              TweenMax.to(progressBarPopUp_mc, 1.5, {alpha:0, scaleX:0.25, scaleY:0.25});
    loaderProductPopUps.load();
    Is there something which needs to be imported, or specific function needs to be specified in a specific labeled section?

    actually, i think you'll need to use something like:
    var loaderProductPopUps:SWFLoader;
    if ((loaderProductPopUps){
    if(loaderProductPopUps.content)){
       loaderProductPopUps.unload();
    loaderProductPopUps= new SWFLoader(sourceVar_ProductsPopUps, //the value of sourceVar_ProductsPopUps allows to load mulitple SWFs from the products page.
                                                                                                         estimatedBytes:5000 ,
                                                                                                         container:holderMov ieClip,// more convinient and easier to manage if to place the LoaderMax into an empty mc (holderMovieClip)
                                                                                                                                                                         // if not will work as well. Then the line container:holderMovieClip, has to be replaced with container:this,
                                                                                                                                                                         // can be any size, can not be scaled as it distorts the content
                                                                                                         onProgress:progress Handler,
                                                                                                         onComplete:complete Handler,
                                                                                                         centerRegistration: true,
                                                                                                         //x:-260, y:-320, //no need for this is if used: centerRegistration:true,
                                                                                                         alpha:1,
                                                                                                         scaleMode:"none",
                                                                                                         //scaleX:0, scaleY:0,
                                                                                                         //vAlign:"top",
                                                                                                         width:540,
                                                                                                         height:730,//scales proportionally but I need to cut off the edges
                                                                                                         crop:true,
                                                                                                         autoPlay:false
    function progressHandler(event:LoaderEvent):void{
              progressBarPopUp_mc.gradientbarPopUp_mc.scaleX = loaderProductPopUps.progress;
    function completeHandler(event:LoaderEvent):void{
              var loadedImage:ContentDisplay = event.target.content;
              //TweenMax.to(loadedImage, 1.5, {alpha:1, scaleX:1, scaleY:1});//only need this line if corresponding values are changed in SWF loader constructor
              TweenMax.to(progressBarPopUp_mc, 1.5, {alpha:0, scaleX:0.25, scaleY:0.25});
    loaderProductPopUps.load();

Maybe you are looking for

  • How do I remove an icloud account from my iphone??

    I don't have the password...I set this icloud account when I was in college...I have since set up my icloud account with a more current email contact, but when I synced my new phone it shows the old college email on my icloud. I tried to recover my p

  • I am very disappointed with the new ipod touch

    So apple adds all of this new stuff to the iphone 4s, dual core a5 chip, all new 8MP camera and optics, and siri. Yay, every iphone customer is happy. This is what you added to the new ipod touch, wait its not new, its the 4th generation with the opt

  • Extreme with LaCie ED Mini Issues

    I have a LaCie Ethernet Drive connected to my new AirPort Extreme. I have to MBP's and an HP Tablet connected to the network. No issues with the HP Tablet recognizing the ED Mini. The MBP's with connect to the ED Mini, but won't recognize any files.

  • Working with images - Rotation and Movement

    Hello there, I have this problem that I cant seem to solve: I need to be able to move an image arround and there are restrictions to where image should be able to move: at any given time, when dragging, image should always cover whole body of a given

  • Get rid of the google search bar??

    I want net neutrality. Google must go. I loaded Firefox on windows-xp and the Google search bar still comes up within Firefox. How do I GET RID OF GOOGLE?? I have used Firefox on Linux also on the same machine.