LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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.
0 Kudos
Message 1 of 3
(3,187 Views)
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.
Message 2 of 3
(3,187 Views)
If it's an older GPIB instrument, it may require the END indicator after each command. You may want to have a wrapper VI that takes an array of strings, then calls VISA Write with each string. This will implicitly send the END indicator with each individual command.

Dan Mondrik
National Instruments
Message 3 of 3
(3,187 Views)