Jump to content
  • 0

Creating Multiple Write Files in DASYlab


LaurenE

Question

I am building a DASYlab file to collect data from several sources. Also in this file I will be controlling a valve which opens and closes with a switch in DASYlab. The problem I am running into is the following:

When I start the measurement, I do not want to start data collection, I just want to monitor the data until I am ready to collect data. Thus, I added a relay before my write file and can use a switch to start or stop transmitting data without stopping my measurements. However, I want to be able to create a new data file each time I turn on the switch, but in its current state, when I turn off and turn on the switch, it simply continues appending data to the same file, and only changes to a new file when I stop and restart the measurement. This would be fine, but because my file also contains a switch controlling a valve that my system operates on, I cannot start and stop the measurement repeatedly without also closing the valve (which is a fail-close valve). 

I am not sure if I am missing something simple that would allow me to make a new file each time I use a switch to start and stop data relay. I attempted making a global variable that increments when the switch is stopped and inputting that global variable into the file name so it would create a new file with a new name, but that did not work for me. I would appreciate any insight into solving this problem. I am relatively new to DASYlabs and was never formally trained, so I am hoping I am just missing a simple solution. 

Thank you. 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello @LaurenE.

In the attached DASYLab 2022 worksheet, I used a TTL Pulse Generator module to simulate your switch to the Relay module and also branch over to an Action module.  When the Action module receives a rising edge from the TTL Pulse Generator module, the Write module creates a new data file; see below.

image.png

 

image.png

 

image.png

 

image.png

 

Regards,

Fausto

save_new_file_v1.DSB

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...