Jump to content
  • 0

Write data at user defined interval


Great Lakes Cal

Question

I have a simple datalogging file with an USB-TC to record temperature. i would like the user to be able to enter a time interval in the run time version of the worksheet that will be used for the data logging rate. i dont want to average values. just want to log the current value every 30 or 60 seconds or whatever the user defines. i am currently using a TTL pulse generator connected to a Combi Trigger connected to a relay that blocks or passes data to the write module. this works great except it does not look like i can use a global variable to set the time span value of the TTL pulse generator. so i'm looking for a different method for the user to define a log rate and have one value from each channel of the ETC written to the file at that defined log rate.

i also tried using a separate module and i was able to get just one second of data or data every 30 seconds. but the data comes into excel from teh csv file with a Delta of 0.1 so for every second of data it writes, there are 10 values, 1 every 0.1 second. how would you change that Delta to 30 seconds or 60 seconds or some other user defined valule

TUS Data Logger.DSB

Edited by Great Lakes Cal
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hello,

You could use the Time Base module under the Special Modules category. Set it to output a pulse once per minute. Then use a Counter module to count the pulses. Follow it with an Arithmetic module to add one to the count. Follow it with a Combi trigger module: Start: Threshold value exceeded with a threshold determined by a global variable. Set the Stop trigger condition to Direct. Connect the trigger module output to a relay to gate the samples. For this to work, you also need to use an Action module to reset the counter. Tie it to the trigger output as well. The Arithmetic module is because the trigger module fires when the count is greater than the global variable value. I've attached a DASYLab 2020.1 worksheet showing what I mean. If you don't have the FULL version of the software, you could rework the example using a Formula module that uses the modulus operator to count to the global var value repeatedly. It would eliminate the Action module.

Best regards,

John

SampleInterval.DSB

Link to comment
Share on other sites

  • 0

Thanks John. that is genius. i would have never thought of that. i also added a write module to writ the data to a file. is there a way to make that list display scrollable when you put it in a layout? i used the Link Graph option in my layout and tagged the list to it. but when the list gets longer than the window, you cant see any more listed data. also in the layout view, i cant find a way to copy the list to the clipboard. i see that option in the worksheet view when the list window is expanded. but not in the layout view. thanks for the help

TUS Data Logger.DSB

Edited by Great Lakes Cal
Link to comment
Share on other sites

  • 0

The layout is not able to display the scrollbar. The default list length is 64, which can be changed under Options. After 64 values have been shown, the list scrolls up as new numbers come in. You can also add a button/action module combo to copy the list to the clipboard, reset the list, or print the list. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...