I was just born in this Labview world and I´m quite lost. I´ll explain my situation:
Solved! Go to Solution.
If you just need something quick to get the job done, you could use nested for loops. Although, you are correct in that a state machine would be better.
Move X, Y, and Z will each be an individual state, with the measurement being yet another. The positions (controlled in absolute instead of relative) can be passed to each state inside a queue. I say to use absolute since it makes returning to home easier (don't have to keep track of how far you've moved). Since i've not used the T-cubes before, i'm not sure if this is possible but it should be.
You'll want to store your data in an array (2D array) which can be used to make a graph or save (txt and csv files are easy to create for transfering data elsewhere)
Thank you pjr1121! Finally I got it. Next step is how to make measurement in every stop using a 2400 Keithley Sourcemeter, but this will be another post 😉
Attached you can find the .vi (I´m sure is not that professional, but it works!! )
There are quite a few posts on these forums about the Keithley 2400 so there is plenty of material to look through. Also, their manual is extremely well documented
Thanks again!! 😉 I must fight with Labview, but I´ll be able to get what I need
I´ll check the examples and try to understand them!!
I got motors movement and IV measurement. Although is not a really clean code it works for the purpose it is wanted (attached).
My doubt now is: I need to save all the measurement data in a file (text file for example). When I run the program I got a text file with just one measurement, how could I get all the measurements? using a loop? I´ve been thinking but I do not know how to implement this when using a state machine. Any ideas?
Thanks in advance!
finally I got (more or less) what I wanted (the IV in the previous post). However, I did this VI using times to wait before and after the measurement for example. Does anyone know how to improve this kind of thing? The idea would be that instead of having a time that I introduce manually, the VI should know when start the next step in my state machine (being sure that the measurement was properly taken and save).
I´ve been thinking in time loops, but I wouldn´t like to change the state machine shape.
Thanks in advance
Times to wait BEFORE a measurement is started is something you have to do manually since it's up to the user.
As far as how long to wait for the measurement to complete, the manual has examples of using registers and buffers to find out when the measurement is complete using a linear sweep (this is how I do it). The idea is to pre-set the buffer equal to the number of datapoints (say 100 over your IV range), instruct what to measure (current, voltage, both), and poll the registers to find out when the buffer is full (say every 100-500 ms). Let the keithley 2400 set the voltages for you over the specified range and return the data set when completed.
As far as knowing when the movement is complete, you'll have to see if there is a way to detect that with your equipment (otherwise stick with the pre-programed delay). IF these are illuminated IV measurements, you could do the following. Source ZERO volts and measure current. check periodically after the movement commands are sent. Once you measure a current, the Jsc for the cell, you have contact.
For data storage, use shift registers on the state machine itself. Clear the register when starting a scan, and insert each measurement as it is taken (2D array, or array of clusters). Another possibility is to use a separate while loop to save the data (a consumer) with the data being passed in a Queue and appended to file after each scan (this will help if you are concerned about failures resulting in lost data). After each measurement, enqueue the data into a queue handled by this consumer. (you'll need to keep track of which file to append data to).
I had built a similar system before, but instead of xyz motors, i used multiple pins with a multiplexer built out of relays.