LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Please look at my VISA writes

Hi could you look at my program at the upper case structure and tell me whether or not I can do that? will the VISA wrie work? I want a situation where I can write a whole variety of commands from VISA. I realize the program is incomplete, I just didn't want to procede if the programming was incorrect.
Thank-you, Ivanka
0 Kudos
Message 1 of 5
(2,925 Views)
Yes, in general, you can do that. Some of the cases have two or more writes (sensor set up, for example). You have nothing in the program which forces one to occur before the other. If the order does not matter, there is no problem. If order is important, it might be better to put each in a separate case.

Lynn
0 Kudos
Message 2 of 5
(2,925 Views)
The whole dataflow design of your program will cause problems. As it is now, the while loop is not connected to anything so that may actually start before you have a chance to configure the instrument. Because you don't have the VISA write stuff in a while loop, you'll only be able to do one configuration and that's whatever you set the control to before you actuallly start the program. Once it's started, you won't be able to send any more writes. You've got a couple of waits that may be executed before or after the while loop or case structure runs.

I think you'd be much better off if you used an event structure or state machine. With an event structure, you could send configuration updates whenever the control changes and add a Boolean called start ac
quisition that controls when you start doing the read.
0 Kudos
Message 3 of 5
(2,925 Views)
Dennis,
I will put the entire case structure into a while loop. I just wanted to know if the write functions would work. Lynn confirmed that they would.
Thank-you,
Ivanka
0 Kudos
Message 4 of 5
(2,925 Views)
Thanks Lynn,
Order does not matter.
Have a good day!
Ivanka
0 Kudos
Message 5 of 5
(2,925 Views)