LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I use filters when programming my Keithley SourceMeter in LabVIEW, creating STOP buttons

Two problems:

1. I have written some code to sample resistance using a Keithley 2400 SourceMeter. I used the instrument drivers downloaded from this site. I can program my SourceMeter to use a moving average filter over a count of 20, but I'm not able to do this programmatically.

What I'd like to do is set the SourceMeter running and calculating the moving average, then use LabVIEW to sample the calculated average, not use LabVIEW to calculate the resistance everytime it is called, which is what it does at the moment.

Is there a VI that can be added on to the VI that I already use?

Is there a way to program with strings that will achieve what I want (I already do this with my Kepco power supply)?

2.I seem to be having problems wiring a stop button to stop the program from running. What I need is to be able to set the Kepco power supply to 0 when the button is pressed (aborting obviously won't do this)?

Only while loops seem to have Stop buttons, and these will iterate continuously until the stop button is pressed, this is not really what I want.



Any help would be appreciated or pointers to a VI that I can use.

Sophie


0 Kudos
Message 1 of 4
(3,085 Views)
What version of LV re U using ?
 
8.5 has a stop for FOR loop also.
 
Can you repost the VI saved for 7.1 ?
- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 2 of 4
(3,080 Views)

More ques...

~Sophie~ wrote:
Is there a VI that can be added on to the VI that I already use?

Is there a way to program with strings that will achieve what I want (I already do this with my Kepco power supply)?

You can search the help or the Example Finder to get the Vis you want regarding Averaging/Moving Avg [ I assume ].

There are so many ways to program with strings to achieve what you want. Smiley Happy It is that, first you should tell us what you need to do.

~Sophie~ wrote:

2.I seem to be having problems wiring a stop button to stop the program from running. What I need is to be able to set the Kepco power supply to 0 when the button is pressed (aborting obviously won't do this)?

Only while loops seem to have Stop buttons, and these will iterate continuously until the stop button is pressed, this is not really what I want.

Regarding this while loop, I ve answered in my previous post. A loop itself means "to iterate"; so, you CANNOT expect it NOT to iterate.

If you wish so, equate the loop count to '0' & pass the output of the '=' to the conditional terminal [Stop if True], thats it. Smiley Wink

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 3 of 4
(3,080 Views)
Hi Sophie,

for your first question:
You could try those K2400 commands (You can find all these commands in the manual Smiley Wink😞
SENS:AVER:TCON REP (type of averaging: repeating)
SENS:AVER:COUN 10 (averaging count)
SENS:AVER ON (switch averaging on)

for your 2nd question:
Iterate your loop as long as you wish. When the user presses the stop button the loop stops and you can send the next command to the Kepco. You can use the error cluster to ensure dataflow (i.e. execution order)...

Message Edited by GerdW on 09-25-2007 01:55 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(3,072 Views)