07-10-2009 08:01 AM
Hi, guys
I was tring to write simple serial write VIs. I use the Basic Serial Write and Read VI example and delete the reading part and the "delay before read (ms)" part. The VI is attached with this post.
The VIs worked well, it did send string to my instrument, but the execute time seems bit too long. After the string is sent and the instrument responds, the Run button appear running for about 30 sec. When I enable the Highlight Excution, everything appears normal, the whole VI execute once and stop running and the total execution time take no more than 3 sec. The long execution time is againt my original purpose to delete other part other than writing.
I am new using LabVIEW. Thank so much for any help.
07-10-2009 08:44 AM
When you use execution highlighting it is adding delay so it looks like you might need to add some delay time.
Try adding some delay in your routine before and after your Write VI
07-10-2009 08:48 AM
I cannot duplicate your problem. What version of NI-VISA do you have?
If you want serial writes to execute quickly, you should not be calling the initialize and close every time. Those functions should only be called once. Try running the VISA Write by itself. You should also eliminate the case structure. It serves no purpose.