Current Draw Event Capture | LabJack
 

Current Draw Event Capture

5 posts / 0 new
Last post
kchristensen
kchristensen's picture
Current Draw Event Capture

I have a small wireless network device that has some issues regarding current draw that I'm trying to optimize. The device goes through a wake/sleep cycle on a controlled known interval and I want to check for any concurrency issues that would cause deviation from this cycle the device might experience after being in operation for days, weeks, and months. I've used the U6 previously just to capture small segments of currend draw to optimize the device behavior but in order to capture the detail I need I'm running a 10kHz sampling rate. At approx. 4 hours of data capture that can generate tens of gigs of data and becomes cumbersome if I want to record for any longer then that.

The idea to solve the issue of recording over a longer period while maintaining resolution was to use the U6 to capture any events occuring outside of the expected behavior. Basically if the current draw becomes too large I want to trigger the labjack to start recording the data at that point, but not before, and only for the duration the event occurrs for. I'm a little rusty on my software programming skills (firmware and electrical design engineer) so I wanted to see if my idea was feasible before getting too far in and if there were any recommendations on methods to go about this. I'm reading up on the labjack API documentation right now and I've prepped an install of Visual Studio Express as my C compiler/IDE (I'm on a windows system).

LabJack Support
labjack support's picture
"if the current draw becomes

"if the current draw becomes too large I want to trigger the labjack to start recording the data at that point"

Keep in mind that the U6 does not record data.  Software acquires data through the U6, and software then records the data by logging it to file.  So what you want to do is have the U6 stream continuously all the time and have software processing the data in real time as desired.  Sounds quite reasonable and normal.

LabJack Support
labjack support's picture
On the T7 you can use a

On the T7 you can use a couple types of triggering to start a stream:

1.  Tell the T7 to watch for a state change on a digital input.

2.  Use a Lua script to watch for whatever condition you want to watch for and the script can then start the stream when desired.

Both of these are more limited, though, than just streaming all the time and letting software decide what to do with the data.  For one thing, software can keep some data before and during the trigger, not just after.

kchristensen
kchristensen's picture
Thanks for the responses.

Thanks for the responses.

I mispoke, I understand that the labjack doesn't record data, that it requires software to do so. Just curious if there is some sort of hardware buffer on the device?

Finally, in the LJStremUD software, there's a field, Scaled, based on the Scaling Equation field. Is there a way to turn off recording of the Scaled values when recording? It would save me some size and time if I didn't require the use of that value in my data capture. Right now it tends to bloat the file size and I have to do some extra work to strip it out.

LabJack Support
labjack support's picture
The U6 does have a small

The U6 does have a small hardware buffer for stream mode.  It is just used to hold a little data while waiting for the host to read, and does not impact what you have described:

https://labjack.com/support/datasheets/u6/operation/stream-mode

https://labjack.com/support/datasheets/u6/high-level-driver/example-pseu...

Sorry, but LJStreamUD does not have that option.  It always writes the scaled data columns, even if scaling is not doing anything.