goldfronts1 Posted September 2, 2011 Share Posted September 2, 2011 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 Link to comment Share on other sites More sharing options...
AzeoTech Posted September 2, 2011 Share Posted September 2, 2011 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 More sharing options...
goldfronts1 Posted September 2, 2011 Author Share Posted September 2, 2011 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 More sharing options...
goldfronts1 Posted September 2, 2011 Author Share Posted September 2, 2011 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. Thanks Link to comment Share on other sites More sharing options...
AzeoTech Posted September 3, 2011 Share Posted September 3, 2011 Yes, yes and yes. And please go through the Guided Tour as that will cover some of this. Link to comment Share on other sites More sharing options...
goldfronts1 Posted September 4, 2011 Author Share Posted September 4, 2011 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 More sharing options...
goldfronts1 Posted September 4, 2011 Author Share Posted September 4, 2011 Is this what you mean to do to get minutes: (Current.time - startTime) / 60 ScaleFrom: 0 ScaleTo: 5 (minutes) Thanks Link to comment Share on other sites More sharing options...
AzeoTech Posted September 4, 2011 Share Posted September 4, 2011 That is correct. Link to comment Share on other sites More sharing options...
goldfronts1 Posted September 7, 2011 Author Share Posted September 7, 2011 How do you make the button start and stop the time? Thanks Link to comment Share on other sites More sharing options...
AzeoTech Posted September 7, 2011 Share Posted September 7, 2011 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 More sharing options...
goldfronts1 Posted December 1, 2011 Author Share Posted December 1, 2011 So I wanted to find out how I can convert this data time that I already recorded to minutes using excel or something? I already recorded this data plot and was unsure what the units were in coming from DAQ. Thanks Link to comment Share on other sites More sharing options...
AzeoTech Posted December 2, 2011 Share Posted December 2, 2011 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 More sharing options...
goldfronts1 Posted December 3, 2011 Author Share Posted December 3, 2011 What do you mean subtract out the first value? Thanks Link to comment Share on other sites More sharing options...
AzeoTech Posted December 4, 2011 Share Posted December 4, 2011 Subtract off the time of the first data point from every data point's time and you'll get a delta T time stamp, where 0 is the first data point and it goes up from there. Link to comment Share on other sites More sharing options...
Andable Posted October 1, 2015 Share Posted October 1, 2015 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 More sharing options...
AzeoTech Posted October 5, 2015 Share Posted October 5, 2015 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.