From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I make this vi run faster?

Solved!
Go to solution
I made this vi to read from the tds 540 oscillioscope, and it just takes a good amount of time (about 3-4 seconds) to read the scope. I want to make this vi more effecient in the case that i want to downlad and save data for multiple traces in a row. Attached is the vi.
0 Kudos
Message 1 of 24
(3,000 Views)
You didn't include any of the subVIs and those are what's important to look at.
0 Kudos
Message 2 of 24
(2,997 Views)
Inorder for us to help you. You will need to attach the CH 1,2,3,4 VI's.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 3 of 24
(2,995 Views)
Oh Im sorry, here is the sub vi used. It is just repeated four times with the four different channels.
0 Kudos
Message 4 of 24
(2,953 Views)

I don't understand your code. You have a for-loop set to run based on the number of traces, but separate controls for each channel. Use a cluster for the Boolean controls and then use the Cluster to Array function to auto-index your for-loop. Then you can use this to determine which channels have been selected. You're also converting numeric data to dynamic data for a graph (why?), and you don't have anything wired to the Write To Measurement File, so it writes out nothing. You said you may copies of the "Channel 1" VI. Why? Just make one VI with a channel number input. Within the "Channel 1" VI itself you still go through and do a bunch of stuff even if the channel is off. Why?

 

As for the speed,  I can't comment since I don't have the scope, but I'm guessing that the code is wasting time trying to read data from a channel that's off.

0 Kudos
Message 5 of 24
(2,939 Views)

Why not download the driver from here

http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E3B19B3E9533659CE034080020E748...



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 6 of 24
(2,933 Views)
Ok I am new to labview so my thinking might sound a little off, but this is what i was thinking. I used the for loop to read multiple traces. I needed to use the check boxes with this VI.  The array that ges into the graph is also connected to signal in the "write to  measurement file" and when you connect it, it automatically converts it o dynamic data. Im pretty sure it needs to be dynamic data in order to use it. I also need the graph to read multiple waveforms. I tried to use the "channel 1" type vi to read multiple channels but i cant get the code to work, so i just repeated the vi four times to read them.
0 Kudos
Message 7 of 24
(2,932 Views)
I did download that driver. And i just altered the code at the beginning of the VI to meet the specs that i needed.
0 Kudos
Message 8 of 24
(2,931 Views)

A scope application should minimum be like the picture



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 9 of 24
(2,920 Views)
Be like the picture? If your talking about am i getting the traces to show up in labview, I am. I would just liike to know how i could get this to run faster. Someone had mentioned using a cluster for the boolena controls and a cluster to array function to auto-index the for-loop. Could you be more specific on how i would do that? Once again, I am not to familiar with labview.
0 Kudos
Message 10 of 24
(2,919 Views)