Graphing Time Axis units


goldfronts1

Recommended Posts

I am trying to plot current versus time using the DAQ Factory Express and LabJack.

I want to record the current at a specific time the data was recorded. Not the system time.

Like 5 amps was recorded at 5 minutes, 10 amps was recorded at 10 minutes, so on and so on.

Right now I am getting very large values of time and I am not sure what units its in.

I select properties on the plot and for the Time axis there is a check box called time width and the values are 0 to 60.

Any suggestions will help. See the attached sample plot

Thanks

post-8150-1314987740_thumb.jpg

Link to comment
Share on other sites

You don't want to plot vs time, you want to plot vs deltaTime. First you need to know what you are delta'ing from. So you need a global variable to store the system time of the start point (i.e. 0 time). To set this, create a button with a Quick Sequence action:

global startTime = systime()

Then, in your graph, set the X expression to:

myChannel.time - startTime

where myChannel is the name of your channel. That will do seconds. Divide the whole thing by 60 to get minutes Then go to the Axes tab, select the bottom axis and change it from Date/Time to Lin (linear). Set the scaling as:

ScaleFrom: 0

ScaleTo: 600

600 is 10 minutes (600 seconds). If you do the X expression in minutes, you'll then want the ScaleTo to also be in minutes.

Link to comment
Share on other sites

Ok sorry I found how to create a button I just needed to right click on the screen. Anway, what do you mean "where myChannel is the name of your channel"?. Do you mean that this should be whatever channel I have set up to record the current? Also, with this button must I click every time I need to start collecting data?

Thanks

Link to comment
Share on other sites

I looked through the guided tour but did not find anything about division in the expression for time. What do you mean by "divide the whole thing by 60 to get minutes"? Can this be done somewhere in the expression? I'm confused sorry. Can you show me an example of this and exactly where I input this?

Thanks for your help

Link to comment
Share on other sites

Just set the starttime to systime():

startTime = systime()

in the Quick Sequence action of the button. Stopping the time you can't do using this method, but the bottom axis scaling should handle that. For example, if its set to 5 minutes, its going to only show the first 5 minutes of data.

Link to comment
Share on other sites

  • 2 months later...

The units are seconds since 1970. This is a standard windows / unix time format. Excel uses decimal days since 1900 and is currently a number in the 40,000 range. If you want minutes, just divide your values by 60. Then subtract out the first value and you'll get minutes into the experiment.

Link to comment
Share on other sites

  • 3 years later...

Hi,

Im trying to ramp up my DaqFac Express proficiency!

I have it drawing a graph of incoming data (voltage from potentiometer) in workspace, so far so good.

How can I save the graph, including the data which has marched across screen and out of view?

(I thought this would be a better option for me instead of learning to log csv's and then use Excel)

Thanks

Andy

Link to comment
Share on other sites

Probably the simplest way is to do File - Save As with History and then save as a different .ctl file name.  That will save your entire document including all the history that has accumulated so far in the channels.  But really if the data is important, you should be using a logging set to log in CSV even if you use the method I just mentioned to save the graph.  

Link to comment
Share on other sites

Archived

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