erase the previous traces


JoshuaDAQ

Recommended Posts

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

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

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

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

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

  • 5 months later...

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

Archived

This topic is now archived and is closed to further replies.