JoshuaDAQ Posted January 23, 2012 Share Posted January 23, 2012 Hi, i'm a newbie here and I'm still not too familiar with the forums so I apologise in advance if this has been asked before. I use DAQFactory to record the two analog inputs of LabJack U6(one input is X-axis, the other is Y-axis) , and using these two inputs draw I-V curves. How can I erase the previous I-V curve when I draw a new I-V curve? With best wishes Link to comment Share on other sites More sharing options...
AzeoTech Posted January 24, 2012 Share Posted January 24, 2012 ClearHistory() on both channels. For example: myIChannel.clearHistory() myVChannel.clearHistory() Link to comment Share on other sites More sharing options...
JoshuaDAQ Posted January 25, 2012 Author Share Posted January 25, 2012 Thank you very much ! It works very well. my channel name is "voltage", I type "voltage.clearhistory()", It's Done. And may I creat a button instead of typing this command ? Link to comment Share on other sites More sharing options...
AzeoTech Posted January 26, 2012 Share Posted January 26, 2012 Of course. Select the Quick Sequence Action for the button and enter your script there. Note that you probably should clear history for both the X and Y channels. Link to comment Share on other sites More sharing options...
JoshuaDAQ Posted January 26, 2012 Author Share Posted January 26, 2012 after finishing one I-V curve plotting, can I make it into a function of poping up a dialog asking me "do you want to take another test" ? If I press "yes" , it will go into the other page, and begin the plotting. Link to comment Share on other sites More sharing options...
AzeoTech Posted January 26, 2012 Share Posted January 26, 2012 Sure, just create a page with that inquiry and a button and switch to that page when the test is done. Or, put the question at the bottom of the graph page and make it appear when the test is done. Link to comment Share on other sites More sharing options...
JoshuaDAQ Posted January 26, 2012 Author Share Posted January 26, 2012 Thank you very much, it is really helpful. one more quention: the x-axis is voltage, and y-axis is current. Can I make the y-axis scaling change automatically with the current increase ? Link to comment Share on other sites More sharing options...
AzeoTech Posted January 26, 2012 Share Posted January 26, 2012 Yes, just set the scale from and scale to parameters of the y axis: scale From: min(current) scale To: max(current) Link to comment Share on other sites More sharing options...
JoshuaDAQ Posted January 27, 2012 Author Share Posted January 27, 2012 I use DAQfactory connect to Labjack U6, i want to get the I-V curve of the resistor quickly, but here is the situation : I control the output(DAC0) of the labkack using DAQfactory, and measure the votage and the current went through the resistor. the sequence of the output voltage of lajack is while(output[0] < 5) out = output[0] + 0.1 delay(1.1) endwhile the problem is if the timing is 1s. The curve is smooth, but very slow. If the timing is 0.5, the curve increaseing like stairs, but fast. How can I make the curve increase fast and smoothly Link to comment Share on other sites More sharing options...
AzeoTech Posted January 27, 2012 Share Posted January 27, 2012 Stairs in the Y axis is usually an indication of the quantization of the A to D converter. There are three solutions: 1) increase the resolution of the A to D converter to 16 bits. Its probably defaulting to 12. 2) amplify your signal in hardware 3) adjust the gain on the U6 (which is really just doing the amplification in the LabJack instead of outside it) All are good questions for the LabJack guys as they are hardware related. Link to comment Share on other sites More sharing options...
JoshuaDAQ Posted January 27, 2012 Author Share Posted January 27, 2012 Thank you very much. I had connected my my labjack to the current amplifier. make resolution to 14 means : in the sequence , using("device.labjack.") include("c:\program files\labjack\drivers\labjackud.h") Addrequest(1,LJ_ioPUT_CONFIG,LJ_chAIN_RESOLUTION,14,0,0) apply& compile is this right ? Link to comment Share on other sites More sharing options...
AzeoTech Posted January 27, 2012 Share Posted January 27, 2012 No, you need a goOne() call, or use eGet() instead of AddRequest(). AddRequest() only adds the command to a queue of commands to be executed. They aren't executed until you do GoOne(). Please refer to the LabJack help files for an explanation of their API. DAQFactory scripting for the LabJack is pretty much identical to the script displayed in the LabJack help. Also, you must actually run the sequence after Applying to change the resolution. Link to comment Share on other sites More sharing options...
echoi Posted July 20, 2012 Share Posted July 20, 2012 I reopened a file with previous history and I saved it while it was not in safe mode. it acquired data that is not part of the old data. is there a way to trim off the channel history? Link to comment Share on other sites More sharing options...
AzeoTech Posted July 20, 2012 Share Posted July 20, 2012 What type of file is it? A CSV? Link to comment Share on other sites More sharing options...
echoi Posted July 23, 2012 Share Posted July 23, 2012 CTL file. "save with history" Link to comment Share on other sites More sharing options...
AzeoTech Posted July 23, 2012 Share Posted July 23, 2012 And you want to trim old data or new? I've never tried it directly, but I believe you can copy a channel to a variable, then clear the history on the channel, then using addValue() put what you want back into the channel. You'd have to do it in order from the oldest data to newest. Something like: global myVar = myChannel myChannel.clearHistory() myChannel.addValue(myVar[0,999]) That would trim off everything but the latest 1000 data points. As I said, I haven't tried it, but I believe it will work. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.