From 11:00 PM CST Friday, Feb 14th - 6:30 PM CST Saturday, Feb 15th, 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: 

keithley 6514 and 6220 help!

ok, thanks for the help! would i set the timeout setting in the block diagram of the block read vi?

also does the loop look right to you to read out the data collected?

thanks again, you are awesome.
0 Kudos
Message 11 of 18
(1,586 Views)
The Block Read VI does not have a terminal for setting the timeout. The help file refers to a SetTimeOut function for GPIB 488.2 VIs. It says the default is 10 seconds, which should be plenty long enough. However, it is possible that one of the other VIs changes that.

Your loop is probably OK. I like to put the error cluster into a shift register so that the Block Read does not continue to try to execute if it generated an unresolved error on the previous iteration. It can also be useful to stop the loop if an error occurs. If you expect large amounts of data there are more efficient ways to store it into arrays, but that should not be an isue for your application.

Lynn
0 Kudos
Message 12 of 18
(1,585 Views)
Ok so everything seems to be in order except for one thing... when i stop the current it wont pass out all the data to the wave or the data display.  ive done a probe on the wiring to the index and it matches the readings on the electrometer which is good, but it just wont pass it out when its done. it just passes out one value any idea why this is happening?
0 Kudos
Message 13 of 18
(1,582 Views)
I did not pull up your VI again so I am working from memory (Forget Only Memory???). On each iteration of the loop some data is read. To have access to all the data outside the loop one of several approaches can be used. The choice depends on how the data is to be used.

1. Use indexing to build an array. Pop up on the output tunnel and select "Enable Indexing." The output then becomes an array of whatever datatype is connected to the tunnel. This is OK for small amounts of data, but can cause significant slowdowns due to memory re-allocations as the amount of data in the array gets large (>100s of kB .. GB).
2. Initialize an array as large or larger than the amount of data you will acquire in one run. Connect it to the left terminal of a shift register (from outside the loop). Inside the loop use Replace Array Subset to insert the new data into the array. You must do suitable bookeeping to track the index for the next data element.
3. Enqueue the data on each iteration of the loop. In a parallel loop dequeue the data and display/process/save it as needed.
4. Use functional globals (VI with loop which executes one time and saves the data in an unitialized shift register) in place of queues in 3.

Approaches 1 and 2 do not make the data available to the rest of the program until the acquisition is complete (when the loop is stopped). 3 and 4 allow usage or saving of data while the acquisition continues.

Lynn
0 Kudos
Message 14 of 18
(1,579 Views)
hmmm i did do the indexing function and its not passing it out... what could be wrong?
0 Kudos
Message 15 of 18
(1,574 Views)
I looked at your VI. The problem is not that the data is not brought out but that you are only displaying a the first element of the arrays. The two Index Array functions which connect to the Test Data and Waveform Graph displays do not have any of the indexing inputs wired.

Do you want to display one reading at a time or all of the data simultaneously or some other combination?

If you only want to display one reading at a time, wire a control which selects the reading number to the first index inputs of both Index Array functions. You can put the selector and the displays in a while loop (with a stop button and a Wait (ms) node set to wait about 200 ms). If you want all or a subset of the data, how you get it depends on how you want the data formatted.

If you have not already done so, I highly recommend that you go through the tutorials. They help you get through a lot of the basics quickly. Training classes are good, too, but not always available on your schedule or budget.

Lynn
0 Kudos
Message 16 of 18
(1,569 Views)