LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous

Solved!
Go to solution

I got the code from https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Keithley-2450-Continuous-current-measurement...

and I modified it.

 

The modified coding is running successfully but It cannot update the current on the graph (of course, The Smu instrument panel confirms the changing current value)

It maintains the initial current value until the end of the set time.

I have to see update current on the graph. 

 

Is there anyone who can help me?
Thank you for reading.

Download All
0 Kudos
Message 1 of 8
(2,299 Views)

Are you seeing the updated values in string Data out?

 

Find out exactly where in your code you stop seeing expected results. 

Doug
Enthusiast for LabVIEW, DAQmx, and Sound and Vibration
0 Kudos
Message 2 of 8
(2,221 Views)

Hi,

 

I checked the string(data out), 

but It maintains the same value.

It is the initial value...

 

I think It cannot feedback the next current value, but I don't know how..

 

thanks

EunB

0 Kudos
Message 3 of 8
(2,213 Views)

Your changes to my original code make no sense. 

 

You do 3 operations in the loop..

- Enable the Output ON (so this outside the loop like in my example!),

- then you take a reading

- then you try to read multiple data points.  This will fail because you never supply the point index and thus it defaults to 0 and so you always get the same value = the first reading.

 

It's not clear what you are trying to accomplish here that my code didn't already do.  Please, describe what you are trying to accomplish, that my initial version was not doing, then I can help you clean up the code.  Please explain clearly so we can help.

 

Craig

0 Kudos
Message 4 of 8
(2,207 Views)

Hi,Craig

 

Thank you for answering the question!

First of all, I hope to read the current value according to the measurement interval. So I was trying to implement your original code on the computer.

But as you can see from the attached file, there was an error regarding the read and the code was not working. I checked the error(Video, name"Error 1,2") that there was no information in the buffer and added a diagram called "Make Reading and Store in buffer". And there was an error in the single point (Video,name "3") so I changed it to multiple points and there was no error. So I've modified it so that there won't be an error like this.

So my priority is to perform the function of your code without errors.
And additionally, I would like to receive information about current and time in Excel file.

If there's anything you don't understand, please ask me!

Thank you for reading.

EunB

Download All
0 Kudos
Message 5 of 8
(2,194 Views)
Solution
Accepted by topic author dfwfaef

In video 3 you have 0s delay and timeout.

In video "Original Error" you have 1ms delay and timeout.

 

The OP in the post where you got the code simply wanted to know how to setup the instrument as an Ammeter to periodically read current.  I wrote the code as a simple example, not a solution that can be used in all cases.  I wired the timeout to the delay time (probably because I pulled the code from somewhere where I use the K2450 timestamp).

 

You are getting those errors because you specify 0 or 3ms (1msx3) as the timeout parameter for the measurement.  The instrument needs a lot longer than 3ms to get the command, setup the measurement, read data, and transfer it to the computer!  The code probably works just fine if you specify 10000ms (10s) or 500ms (0.5s).

 

But what you really want is code that works  for your needs.  So, again I will ask you to be specific,

- Describe what are you trying to measure?  (1pA transient, 1A dc??)

- What are your measurement timing requirements?

   - Read data every 1ps, 1ms?  And for how long= 1s? 10s? 1hr? 10 days? 100 years?

- Voltage and current ranges?

 

I would write very different code in each of those situations.    Your requirements are probably different and if you describe them you will get better help.

 

From what I see of your attempted use, you want to use measurement  timers and buffers...but I'm guessing.

 

Craig

Message 6 of 8
(2,127 Views)


Hi, cstorey

 

Thank you so much for your continued interest and asking!
I changed the block diagram of reading while touching it all by myself, and it was solved!
Thanks to your code, I was able to take a step back.
Thanks a lot.

0 Kudos
Message 7 of 8
(2,070 Views)

Can you please send me the code that it works for you

 

0 Kudos
Message 8 of 8
(1,713 Views)