LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble using Instrument I/O assistant to write to an instrument in a while loop

I'm trying to the express vi "Instrument I/O Asssistant" in labview 8.0 to write a parameter to an instrument in a while loop.  I use a slider bar value that out puts a value of 0-1000 and input this to my "write input parameter" of the I/O assistant.  If I run the vi in highlight execution, it looks like the new slider value is input into the I/O assistant, but the only value that gets through is the initial value when the vi starts.  It's a very simple vi and I can't seem to find much info on the I/O assistant.
 
Thanks in advance for any help.
0 Kudos
Message 1 of 4
(2,762 Views)
If you place the slider in the while loop it works fine for me. Every time i move the slider it takes the current value of the slider. Place the slider in the while loop and see if that works.

Nitin
0 Kudos
Message 2 of 4
(2,752 Views)

Nitin,

I didn't save my vi before I attached it to my post, so the vi that was attached didn't show the slider in the loop which it was.  Anyway, I thing I found my problem which brings up another question.  I am trying to do a write then a read in the same I/O assisitant.  The first item in the assisitant always succeeds, but the second one never does.  It looks like it's a timing issue where if I perform the write first the read item gets walked over by the response of the write.  Is there a way to put a delay between items?  Am I trying to do to much with the I/O assisitant?  I have attached the current vi.

Thanks,

Dale

0 Kudos
Message 3 of 4
(2,744 Views)
The Instrument I/O Assistant is meant for simple basic communication.  If you need to control the timing of the communication or any other more advanced tasks, then you will have to use VISA directly.  One suggestion would be to use the Instrument I/O Assistant to generate your VISA code, then right click on the Express VI and change to a subVI.  This will allow you to view the block diagram of the generated VISA code.  You can then add delays where you need to get your communication to work.
0 Kudos
Message 4 of 4
(2,728 Views)