07-21-2016 10:34 PM
hi all,
Currently i am trying to sweep the voltage and allow the sweep resource voltage pass to next vi.
I am using for loop to sweep the voltage source, however i cannot pass the voltage resource for each of iteration out to vi.
Can anyone help to advice ?
Below is my code.
07-22-2016 12:37 AM
07-22-2016 12:55 AM
Opening Session and Initial supply settings should be done before "for loop". In each iteration you need to set only voltage level. No need to reset the instrument every time. Closing the session needs to be there after completion of for loop. Instead of Aborting function in for loop, you need to use conditional terminal.
What you are trying to do with next vi?
07-22-2016 02:46 AM
First Try to follow LabVIEW Coding Guidliness.
Hope Opening a Port Once is good enough to communicate with a device.So try to Open and Configure once and you can Read and Write to device at N times and Once the Conversation is over you can close the Com port.
If you need to pass the acquired Values after acqusuition to next VI Which you are mentioning, Just Index all the values and then Create as a indicator and Get the value to next VI.
If you want to get each value during acqisition use Functional Global Variable to Transfer data.
But still more information Needed.
07-24-2016 08:07 PM
hi mikeporter,
basically, i want to do the voltage increment and for each of the voltage value i can use it for next testing block, that why i need able to pass the voltage resource out for each of the iteration with certain delay time.
regards,
yeehwa
07-24-2016 09:06 PM
hi Nanthakumar,
Thanks for the idea, i now can manage to loop the voltage, then read out the sweep voltage value from oscilloscope each of the iteration.
07-24-2016 09:11 PM
hi PalanivelT,
actually, i did try to use global variable before. however, i failed to update the latest voltage resource for my next test. example:
blockA: sweep voltage from 15V-18V. for each of the voltage 15V, 16V, 17V, 18V need to pass to nect blockB to do measurement by using oscilloscope.
08-16-2019 08:35 AM
could you send the vi with working program
08-16-2019 09:09 AM
You should really go through the tutorials at the top of this page. It is still unclear what you are wanting to "pass to next vi", but there are multiple ways to pass data out of a for loop depending on what you need. If you really are doing a "next vi" then you need to wire the data out of the loop. The FOR loop will default to auto-index, but if you just want a last value you can change this.
08-16-2019 09:59 AM
Looks like you are using a SMU (make & model?) to sweep voltage and do a measurement by sending SCPI commands. There are LabVIEW drivers for almost all models of SMU available, and they have examples that would help you get started. Look on the instrument driver network - http://www.ni.com/downloads/instrument-drivers/
If you prefer to continue down the path you are on with your code, then you just need to use the loop indexing (wire the reading to the right side of the FOR loop) and you will get an array of values you can use after the loop has completed. This array can then be passed to the "Next" VI in the code.
Hope that helps.
Craig