02-10-2011 09:38 AM
I have a really large program that controls multiple instruments and I repetitively use the Instrument I/O assistant without any problems, except for a few instances. Attached is the portion that changes the horizontal scaling of the oscilloscope. When I open the Instrument I/O assistant and run it from within its GUI it works fine, the scaling is set to what I have preset. Unfortunately, when I run the VI I get a different result and it is the same result every time. My preset in the I/O assistant and what is going into the I/O assistant are the same values but the scaling that is set for my preset is 500 nS/div and the scaling set from running the VI is 25 pS/div which is the smallest scale the scope offers. Any ideas as to what could be wrong?
Solved! Go to Solution.
02-10-2011 09:51 AM - edited 02-10-2011 09:52 AM
Maybe IO assistant is writing out all the commands faster than your GPIB device can handle it.
Instead of using IO assistant, why don't you use the VISA read and write functions directly that way you can put small delays between the writes?
02-10-2011 12:59 PM
Well that was my thought as well, but you can add delays to each step inside the I/O assistant and it doesn't matter how much of a delay I set it to it still does the same thing. I would like to avoid the I/O assistant if that will fix my problem. Do you have some sample coding on how to read and write to a GPIB device using the VISA functions? I believe I tried that a while back but I was having issues interpreting one of the commands and wasn't able to get it to work.
02-10-2011 01:23 PM
I don't have any examples, but if you right click on the Instrument IO and select Open Front Panel, it will turn the Express VI into a regular subVI you can open and see how the code is actually running inside.
02-10-2011 01:49 PM
That's awesome, I actually helped another guy I work with break an I/O assistant apart like that but I couldn't remember how we got there. It looks like they use a number to fractional string conversion and after you reach 5E-7 it doesn't convert properly. I changed it to number to exponential string and it works just fine. Thanks for the help.
02-10-2011 02:04 PM
That makes sense. The default precision for Number to Fractional String is 6. So 5e-7 is too small for that.