11-27-2007 10:34 AM
Looking at what you are doing, you are directly concatenating the strings and writing to gpib, i wonder if you are writing it correctly. check the syntax for the instrument. as you concatenate.
11-27-2007 10:54 AM
11-27-2007 11:37 AM
11-27-2007 11:52 AM
DO NOT RUN YOUR VI IN CONTINUOUS MODE!
As I stated earlier, that would be silly. Continuous mode should only be used in certain debug situations and your VI will have numerous problems. As you switch the buttons, you have the possibility of sending either an empty string and then trying to do a read or you might actually send both strings and then do a read. Both are guaranteed to cause a problem. When you have a constant, there is no possibility of sending something incorrectly with each iteration. If you have been doing this all along, that's probably the cause of all your problems. If you do exactly as I said and just click the run button, it should work. If there is a reason that you need to send the command over and over again, then you should be putting a while loop around the GPIB Write and Read.
The error you get indicates you do not have NI-VISA installed.
11-27-2007 11:53 AM
Dennis Knutson wrote:
At some point, you should also make the following modification. With this change, you don't have to make sure that one of the Booleans is always true.
Hi Dennis:
It seems very weird. the modification example you give me is ok.
you know, when I switch the command1 to command2, it works. But how can I stop it.
why if I use 1st command at case' true', and 2nd command at case' false', it works.
But if I use 1st command at case' true', and "no command" at case' false ' it does not work. you know, like the original example I give you.
Thanks for you help
Wei
11-27-2007 12:25 PM
Hi Dennis:
Thanks for your explaination with such endurance.
Yes, you are right, I am really sorry I misunderstanding your means before.
step running is actually no problem. But I wonder if I want to implement real-time data sampling from Agilent analyzer, how should I do? (Generating a loop in my program? a infite loop looks same with the continuously running?), you know, I have to continuously send a command to sample the data.
11-27-2007 12:49 PM