06-16-2009 10:33 AM
Your subVI is set to read 101E3 characters from the scope. Parsing a string that large may take some time.
Does the scope have a binary mode? It might be faster.
How long does your program take? How fast do you want it to be? Do you know if the time-consuming part is the VISA Read or the parsing?
Lynn
06-16-2009 10:45 AM
06-16-2009 10:47 AM
You are reading 50,000 datapoints and it looks like each is 2 bytes long. Taking nearly a second to retrieve that much data does not seem very long for GPIB communication. You can time your VI to see how long it actually takes to read that much data. You could also do the query in MAX. I don't know by how much time you want to reduce the transfer but I believe that to get a significant reduction, you would have to move to a different bus or reduce the number of samples. The fastest data transfer is going to come with a scope card that is internal to the pc.
06-16-2009 01:46 PM
06-16-2009 02:00 PM
You've done nothing in the channel code to select or not select anything except possibly an instrument error. Why do you not have the code inside a case statement?
And as it's been mentioned, the for loop is quite silly. If you want four channels, you don't select to run the for loop 4 times. No loop at all is required if you do the subVIs correctly.
06-16-2009 02:21 PM
06-16-2009 02:29 PM
Well, as I said, the major problem is that your boolean does not do anything. You should have a case structure around the acquisition code and either run it or not. As it is, no matter what the state of the Boolean, you are always requesting a trace.
There are a couple of ways that you can create a generic subVI. One is to make the channel number an input to the subVI and use it as a variable. Don't the functions in the driver use it that way?
06-16-2009 02:36 PM
06-16-2009 02:46 PM
I took the time to modify your VI. I did this very quickly so it may not be perfect. I made your 4 subvis into one vi so all you have to do is input a boolean to tell it whether or not to check the scope for the channel and the channel name. I also modified the main vi that calls the four vis. This may not help your timing but at least it is a start.
Posted in LV 8.6
06-16-2009 03:15 PM