Series of commands by visa

Hi all. 
I am trying to control a Corvus microscope stage controller and have had luck in sending individual commands to do what ever I want the controller to do.  I want the controller however,  to move the stage in a scanning motion and to perform this I have to send multiple commands in the proper order.  I have set up my VI a couple of different ways and have got the same results.  The run starts out fine but then the controller must not be able to keep up with the commands from the computer as the stage acts erratically and stops.  The most commands that function properly in a row are 4.  With the x movement command repeated 10 times in a "for loop" and then a y move followed by a x move in the -x direction repeated 10 times then another y movement.  This needs to continue so I can cover as much area as possible.  This is just an initial scan vi as I what to get it to function first before a complicate the movement later.
At first I thought I should buffer the data or add wait periods.  I don't really understand buffers but I added the wait periods in the same frame and in different frames as the Visa write.vi and these execute as expected but do not solve the problem.  I will attach the vi so you can see my set up.  If more information is needed say the word.  I am newer to Labview 7 but I think my set up will work as soon as this bug is worked out.
Solved!
Go to Solution.
Attachments:
compressed scan control2.vi ‏255 KB

never mind I figured it out or at least I figured out how to get it to work within my limits.  If you are interested in the vi it is below.
Attachments:
compressed scan control2.vi ‏273 KB

Similar Messages

  • Can not send command via VISA test panel in MAX

    Hello all,
    I am having a small issue using the VISA test panel in MAX.  I am trying to send a simple command to a device and then retrieve the response data.  I am able to do this successfully via Labview, but for whatever reason I can not get a good response in MAX.  The command that I am sending is simply a letter (address of the device) followed by an end of line character (\r\n in ascii).  In MAX, I simply append the \r\n onto the string sent in the buffer (Send End on Writes == FALSE).  All serial settings are the same as what I have in LV (19.2, 8-n-1).  Does anyone have any thoughts?  This is kind of frustrating as I just want to do something simple and don't want to have to build a whole routine in LV to do this.
    Cheers, Matt
    Matt Richardson
    Certified LabVIEW Developer
    MSR Consulting, LLC
    Solved!
    Go to Solution.

    Thanks, Broken.  I am getting a time out error.  Clearing the buffers doesn't seem to be making a difference. This is baffling to me.  I must be missing something fundamental.
    Something that I didn't add before is that I seem to be able to send the command via labview without a read, and then read it via MAX.  This must have something to do with way it is sending the command.  Arrrrgh!
    Matt
    Matt Richardson
    Certified LabVIEW Developer
    MSR Consulting, LLC

  • Stopping a series of commands once they've begun

    sometimes with a large file in Photoshop, I hold down the forward arrow to move myself forward in my timeline--and as my animation inches forward, i realize i've reached a point at which i'd like to stop.  i want to cancel out the remaining "forward" commands.  But photoshop just keeps moving forward, turtle-like. unresponsive to a "backward arrow."  Is there any way to stop a series of "move forward" commands once it's been set in place?

    It's serial communication and i have been using the basic read write serial command vi already, except i only enter 1 command like at a time.  These are what my command lines that my motors takes looks like:
    @16 145\r
    @16 154 11 50000\r
    @16 165 10\r
    @16 165 532\r
    @16 165 1802\r
    Obviously, the 5 strings are of different sizes.  Mroeover, where exactly is this "string array" that you are referring to?  i guess i have to build it myself but i just looked through the array menu and string menu and i'm not sure which one to use.  Here are th eones that i fuond that i think could be possible: spreadsheet string to array (but i;m not sure where the spreadsheet string is).  Any help?? thanks

  • 1400 Series IOS Command

    Does anyone know what is the command I can use to show me the signal strength of the antennas during the installation process?
    What I have been doing is to do a linktest and then show log to see what happenned.  I think there should be a better way that the screen will update with all the data when there is a change in signals strength.
    Thank you.

    If they aren't assocaited and the bridges are in Install Mode you can use the LED's
    http://www.cisco.com/en/US/partner/docs/wireless/bridge/1400/installation/guide/higch3.html

  • A better way to execute a series of external commands?

    Hi,
    Consider the code snippet...
    Process proc1 = rt.exec("Some external command");
    Vector vecOutput = outputGobbler.getOutput() ;
    String[] strAlterCmds = new String[vecOutput.size()];
    for ( int k = 0 ; k < vecOutput.size() ; k++ )
    strAlterCmds[k] = new String();
    strAlterCmds[k] = "cmd.exe /c blah.... " +(String) vecOutput.elementAt( k )+ " ;
    Process proc2 = rt.exec(strAlterCmds[k], null);
    StreamGobbler errorG = new
    StreamGobbler( proc2.getErrorStream(), "Error") ;
    StreamGobbler outputG = new
    StreamGobbler( proc2.getInputStream(), "Output") ;
    errorG.start() ;
    outputG.start() ;
    int exitVal1 = proc2.waitFor();
    The second part of the execution is taking AGES and I am not sure forking a new process for runtime execution is the best alternative here.
    I would be glad if someone can point me to a smarter solution.
    In short: I intend to execute a series of commands using RTE depending on the values I get in the loop.
    Thanks.

    Jared,
    Thank you for responding to my posted message. Rendezvous is a new concept to me, maybe
    it's the solution to my problem. I have been trying to read the on line manual and
    example VIs from National Instruments website. I still have a hard time to understand
    the concept.
    One of the example I saw is using rendezvous to run some sub VIs. But in my case, I have
    only one VI that is a while loop. Inside the while loop, there are a few tasks running
    simultaneously. I don't know whether it will serve my purpose.
    Guangde Wang
    Jared O'Mara wrote:
    > Guangde,
    >
    > Referring to your 2nd method, use rendezvous (under advanced>>synchronize
    > on function palette) to synchronize two processes. There are good examples
    > that come with labview. basically, you cre
    ate a rendezvous, giving it a
    > size. Using the wait on rendezvous vi, a function will not continue until
    > all rendezvous have reached that point. Using this method, you can synchronize
    > your 2 while loops.
    >
    > Jared
    >
    > Guangde Wang wrote:
    > >I tried two ways to control the tempo of my program.>>One is to use the
    > While Loop's counter and a wait. The drawback of this>method is the cycle
    > length is dependent on the measuring load. So if the>program runs for days,
    > it will be significent off the real time.>>The other way is to use the difference
    > of the Tick Count. It provides>accurate timing but the problem is the sychronization
    > of the clock cycle>and the While Loop cycle. I can try to put a little bit
    > wait but still>can not sychronize them very well. So after a while, there
    > will be two>measures get together.>>I don't know whether there are some better
    > ways to control the program>or whether we have some ways to improve either
    > or both of the above
    two>methods to make them work better. Please let me
    > know if you have any>suggestion.>>Thank you in advance,>>Guangde Wang>

  • VISA, envoi automatique de commandes à la suite...

    Bonjour à tous,
    Je souhaite envoyer des commandes en VISA les unes à la suite des autres avec une attente de réponse ( quasi immédiate ) d'un nombre d'octets indéfini. Auriez vous une idée de la façon de faire ? 
    Ma façon de faire ne fais passer la seconde commande qu'une fois sur 100.... 
    Merci de votre aide.

    Bonjour,
    et merci d'avoir posté sur nos forums.
    Quel moyen de programmation utilisez-vous pour automatiser vos écritures/lectures ?
    Est-ce que vos commandes envoyées sont identiques ? Si c'est le cas, vous pouvez simplement cadencer vos fonctions VISA Write et VISA Write dans une boucle while.
    Dans le cas contraire, vous pouvez gérer l'envoi de vos diverses commandes par une séquence, ou par une machine à état. Je vous renvoie ici pour cette dernière méthode, supposant que vous développez sous LabVIEW.
    Par ailleurs, concernant le nombre d'octets à lire, il peut être indéfini en détectant par exemple la fin de la lecture sur un caractère de terminaison (\r ou \n).
    Cordialement,
    Eric M. - Application Engineering Specialist
    Certified LabVIEW Architect
    Certified LabWindows™/CVI Developer

  • Send series of SPI commands from DAQ

    I have created my SPI waveforms and then split them up and sent them to 5 different lines on my DAQmx (I have two CS lines). 
    The slaves here are two PGAs and the MOSI line is setting the gain to one of 11 programmable gains; I have a Ring (drop-down menu) set up for the user to select the gain which is fed in to the MOSI data port on the SPI swap VI. My problem: I need to send initial commands to the slave to configure a pin on the slave (PGA), before I use the Ring to select the gain. How can I send initial commands on the MOSI line to "set" the slave, and then use my Ring to select/change the gain? How can I send a series of commands via SPI before the user selects the command to send to MOSI?
    I am using the DAQ 6356 which has no way to recognize SPI protocol so I used SDW to generate my waveforms.

    Please refer to this forum thread.
    Jeff S.
    National Instruments

  • How do I correctly time while loops using SCPI and VISA/Ethernet communication to send DC current Values to a Power supply?

    I'm rather new to using labview and I having an
    issue with a test Data Aquisition lab I'm trying to setup using a
    Keithley 6221 AC/DC current source and a basic PCI M-series NI-DAQmx. 
    First of all, I'm looking to update the  current value on a power
    supply at a rate of atleast 10Hz and I'm using SCPI commands and VISA
    communication through ethernet to do so.  Attached below is the VI I
    have written. 
    The issue I'm having is this:
        My VI will
    loop through the values fine in software, or so it seems.  I am unable
    to get the Power supply to update sequentially if I don't set my loop
    delay to anything greater than 130ms.  If I try to run the loop faster
    it starts skipping values instead of counting 1,2,3,4,5,1,2,...etc.  it
    goes 1,2,4,5,2,4,1,2 on the display of the power supply and my DAQ unit
    also skips these values so I know that the number just isn't getting
    read to the Power supply in time.  I was wondering if this was due to
    my sloppy programming or if it is a hardware issue, my computer or the
    method of communication to the power supply?  Is this due to the fact
    that I'm using ethernet and VISA communication?  Is there a faster way
    to communicate or is GPIB faster?  Any input at all would be extremely
    helpful.
    On a side note:  Right now I'm using an pre-determined
    array of values that I can update on the fly but in the future this
    with be put into a  closed-loop control system.  The value for the
    power supply output will be determined by the loop and sent that way.
    Attachments:
    basic DC loop 6221 Keithley.vi ‏145 KB

    Also, one of the string constants is NOT set to '\' Codes Display. Here is an alternative method of calculating the index. I removed the DAQ and VISA stuff since I could not run it.
    Lynn
    Attachments:
    basic DC loop 6221 Keithley.2.vi ‏16 KB

  • Does System command pipe VI bufferizes data?

    Hi,
    I have some questions about Pipe VIs on Linux:
    1)In my project I open a system command pipe vi that opens another
    program's shell. Then, using the write file descriptor, I write a
    series of commands in a loop. I could observe that only when I close
    the pipe those commands are really sent to the shell, OR when,
    aparently, something like a  "pipe vi buffer" overflows.
    2) In the same situation, I would like to use both the write and read
    file descriptors. The write pipe vi sends a command to the program's
    shell and them the read pipe vi reads the shell's results. I tried of
    many ways, including forcing serialization (open, then write, then
    read), but it didn't work at all. I could see that the write worked but
    the read can't read the results.
    The most interesting is if I use a ls -l in the open system vi, I can read the directory contents on the read vi...
    What's wrong? Is that a problem of LV or Linux? Or of the another program's shell?
    What can I do to make sure that a command is issued as it is writen to the pipe?
    Thanks in advance for the attention,

    Hi, ratem.
    I've just created a little code snippet (below), and I'd like you to tell me what happens when you run similar code on your machine. I run the code, read from the FIFO in a terminal, and I'm able to see the data I wrote before the pipe is closed. Does your behavior differ with this code?
    Message Edited by sarahk on 04-09-2006 12:36 PM
    Message Edited by sarahk on 04-09-2006 12:36 PM
    Sarah K.
    Search PME
    National Instruments
    Attachments:
    write with while.JPG ‏13 KB

  • How do I input multiple string constants into VISA Write

    I am trying to put in multiple string commands into VISA Write to control a motor arm. However, when I use "concatenate strings" to link together my multiple string constants, only the first command is executed, and neglects the other commands below it. Should I be using something other then "concatenate strings" or do I need to use a delay so that the next command executes when the one before it is finished? Help.

    Concatenate strings should work or just use one string constant with multiple lines. The problem you're having could be that the instrument requires some sort of delay but without details on the instrument, only you or the vendor can answer that. Some instruments will have a queue and others won't. The other possiblity is that you need some kind of termination character between commands. This might be a carriage return for a serial instrument or the ; character for a GPIB one. Check the instrument manual or provide the make and model and maybe someone here has some experience with it.

  • How does VISA serial write work?

    I am using LabView 6.0 and the VISA functions to run a distributed sensor network using RS-485 from a NT 4.0 machine.
    In order to work properly I have to manually control the RTS line which isn't a problem using the property node.
    Here's what I want to know.
    I'm using a sequence structure:
    I'm writing a command using VISA serial write
    Then in the next frame I unassert the RTS.
    Now in this setup does Labview pass the command to the serial port and then jump to the next frame in the sequence, or is there some kind of acknowledgment from the serial port that its done so the Write vi knows to finish, or am I running a the risk of cutting off my communication before I've finished or should I put in a short wait after the write to port
    , or could this cause me to miss the reply?

    Robert:
    With the default settings, VISA Write will not return until the data has been at least posted into the hardware FIFO. To be 100% sure that the data has been transmitted over the wire, you should do these 2 things:
    1) Call VISA Flush I/O Buffer with a mask of 32. This will ensure the data has been at least posted into the hardware FIFO, regardless of which settings are being used.
    2) Wait a tiny amount of time for the FIFO to be emptied. This is based on the number of bytes in the FIFO and the baud rate. For example, with a 64 byte UART FIFO and 9600 baud, you should wait 67 milliseconds.
    Dan Mondrik
    Senior Software Engineer, NI-VISA
    National Instruments

  • Gpib commands via ethernet

    how can i control my device through ethernet by passing SCPI commands or GPIB commands.
    The device is standalone industrial PC has laser sources.I need to control sources. The IP address is 202.10.10.2.

    You can use VISA to control an instrument with an ethernet interface. Open a connection using a resource name of TCPIP::host address and then you should be able to send your SCPI commands with VISA Write just like you would with a GPIB connection. You should also verify that it's on the LAN from MAX. Right click on Devices and Interfaces, select Create New and then select TCP/IP Resource and then follow the directions.

  • ITunes 10.4 Command Controls Don't Work, File Menu Greyed Out

    The "improvements" in 10.4 version of iTunes are, uh, not. Among many other challenges iTunes now randomly decides that its file functions and the attendant command + (key) don't work. You get the "error" noise and the commands are actually greyed out under the "File" dropdown. FAIL. This, in addition to the "upgrade" that makes it necessary to hit "option" to see the nested playlist icon make this one of the worst iTunes updates in a long, long time. Don't think us out of what we're doing, please. I know it's free, but it's also not free (my Apple bills are staggering).
    Formerly reliable commands like Command + L (go to current song) or Command N (new playlist) and even Command I (track info) are now hit and miss. If anybody has a solution (other than "you don't really want those features") I'd love to hear it. Or an explanation for how/why an entire series of commands becomes unavailable for no apparent reason. In the meantime I'm investigating alternatives (and I'm a long-term iTunes stalwart).  Lame.
    In the above screenshot, prior to writing this email (and part of the inspiration for it was that) "go to current song" was also greyed out. Of course I was writing this email and not changing anything but a few seconds ago Control "L" didn't do anything & that item was greyed out. So what happened? What changed? What's wrong? Your guess will hopefully be better than mine...

    While I'm at it, the new/improved iTunes also periodically and for no apparent reason will not allow me to edit smart playlists (or create new ones). I hit Command "I" on a smart playlist and I get the "be-donk" that says "no love." Also greyed out in File menu along with almost everything else (see above). The feature returns after the passage of time but no noticeable conditions have changed - unless I'm missing something really obvious which is why I'm crying out for help...

  • "Consolidate" commands and tasks in ARD

    I (or rather my client) want to schedule a series of commands and tasks in ARD 3.5.1. Specifically-
    1. Wake the client machine;
    2. Install all software updates;
    3. Restart the client machine;
    4. Run permissions fix on the client.
    For now, the only way I can see to do this is to schedule all four as separate commands to be run one after anotrher. Is there a way to consolidate the commands so that only one task needs to run?
    Or is there another way to accomplish the same thing that I'm overlooking?
    Thanks!

    I ended up accomplishing everything I need using the following script (using Dreamweaver in this example instead of Photoshop, which is my next task):
    # Create directory for mount point
    mkdir /Volumes/MyShare
    # Mount network share
    mount -t afp afp://username:[email protected]/MyShare /Volumes/MyShare
    # Copy Dreamweaver folder to /Applications
    cp -R "/Volumes/MyShare/Macromedia/Studio MX/Macromedia Dreamweaver MX" /Applications
    # Copy working registration file
    cp "/Volumes/MyShare/Macromedia/Studio MX/Dreamweaver MX Registration" "/Library/Application Support/Macromedia/"
    # Unmount network volume
    umount /Volumes/MyShare
    Intel iMac 20"   Mac OS X (10.4.9)  

  • Erreur de timeout sur Visa Write

    Bonjour,
    Je suis étudiant en énergétique 4e année et je réalise dans le cadre d'un stage une méthode de mesure de débit à travers une porte à l'aide de capteurs à fil chaud et de deux autres types de capteurs.
    J'utilise dans labview un programme dont le visuel+fichier est en pièce jointe.
    Sur le principe, le programme (assez complexe car le signal est traité par la suite) fonctionne de la manière suivante : j'utilise pour acquérir les signaux donnés par le multimètre agilent 34970A trois ensembles "visa write puis visa read" pour l'acquisition successive de signaux de tension, d'intensité, puis de tension (3 types de capteurs différents) avec timeout de 20 seconde, le tout dans une boucle while pour des acquisitions de plusieurs centaines de points, avec une série de valeurs toute les 5 secondes. 
    Aléatoirement, au bout d'un certain nombre de réalisation de la boucle (non régulier, parfois 1H, parfois 10 minutes, parfois 6h), la boucle s'arrête, et j'obtiens l'erreur suivante :
    L'erreur -1073807339 s'est produite à : VISA Read dans VitesseTemperatureRTDDirection2-essais10bon_moymobil.vi
     VISA:  (Hex 0xBFFF0015) Le délai d'attente (timeout) a expiré avant que l'opération ne soit achevée.
     Pourtant, le temps de réponse de mes capteur est inférieur à la seconde. ce sont des capteurs à fil chaud
    Je pense qu'il peut subsister un problème dans mon programme labview sur la méthode d'acquisition de ce multimètre. L'erreur peut également venir du multimètre ou des capteurs (faux contact)
    J'ai essayé d'être le plus claire possible, néanmoins n'hésitez pas à demander des explications 
    Merci d'avance pour vos précieuses réponses 
    Attachments:
    VitesseTemperatureRTDDirection2- essais10bon_optimize_avecsigne050510.vi ‏155 KB
    erreurprogramme.jpg ‏164 KB

    Pourquoi vous employez le "Read" dans la premiere commande de VISA, et "Init-Fetc" dans le prochain VISA?  Essai utilisant le "Read" tout pars tout.  Si ceci ne fixe pas le probleme, changez du "XON-XOFF" au aucun handshaking.  Temps au temps, les "binary bits" (je ne savez pas les mots en Francais) resemble XOFF.  J'espere que ceci vous aide.
    - tbob
    Inventor of the WORM Global

Maybe you are looking for

  • Please Help.JTable insert styled text

    Hi all java guru, on post http://forum.java.sun.com/thread.jsp?forum=57&thread=485469 i've depicted my scenario in which i have a JTable where i want to add styled text. i've implemented a CustomTableModel that maintains information about text style,

  • How to switch frames using keyboard

    Hi, I'm new to Actionscript. Now using Actionscript 3.0 I have to switch next or previous frame in timeline using keyboard. I wrote ====================================================================================== stage.addEventListener(Keyboard

  • CIDX adapter !DOCTYPE - addition for Preamble and ServiceHeader

    We are using the CIDX adapter in PI 7.1 for sending the OrderCreate 4.0 message to a partner. When the partner received a first message they had the following remark: We are not sending the reference to the DTD for Preamble and ServiceHeader part: Pa

  • Sorting images on iPhone 4 - Why to optimize

    Disclaimer: Tried to find a solution using forum search - no luck. Scenario - too 500 pictures with my iPhone in the last couple weeks. Want to sort them into few albums. Downloaded on my PC, sorted into few sub-directories, started sync in iTunes. i

  • Read external mail through ABAP

    Hi All, i want read external mail ( say yahoo, gamil etc) through ABAP code with attachments. Thanks and regards JK