06-08-2015 04:20 AM
Hello,
I have a program to do a Viscosity/Temperature measurement using DasyLab 12
I'm burning my brain to try to enable the measurment only if the temperature is under 26°C during 10s.
Click "start", then control the temperature, if during 10s the temperature stay under 26°C, then authorise to click on the button "start measurment"
If not, restart the controle.
Thanks in advance !
Ivan
Solved! Go to Solution.
06-08-2015 06:46 AM
Ivan,
What I would do is to run DASYLab all the time but trigger the data storage when you desire.
If you put a relay before the write files, and you select "Remove" as blocked data, DASYLab will allow the write file only to work when you activate the relay.
DASYLab, to my knowledge, can not start or stop by even, it can only stop or restart.
06-08-2015 07:08 AM - edited 06-08-2015 07:11 AM
Howdy, perhaps this example worksheet is useful for you.
The trigger checks if the (simulated) temp data is above/below the threshold.
The counter counts the time the trigger outputs ttl-high ( == temp is below threshold).
The counter resets itself when the trigger changes its state (trigger condition == true/false).
The action toggles a switch, to simulate some kind of allowed/not allowed mechanism.
The user_start button is actually the button that starts the measurement by user interaction.
When the permit_state button is in "locked" state, the user can click until his fingers start to bleed - nothing else will happen.
Once the temp is below 26°C for 10s, the permit state switched to "released", and the relay unblocks the data stream, so that the user's clicks can reach the do_something action module.
The set_texts action changes the labels of the user_start button.
06-08-2015 08:25 AM
Thank you TomRizzo and hw70 !
hw70, I will test your solution in my program and let you know if it work well.
Ivan
06-09-2015 01:51 AM
Hello hw70,
Your program seems to work well !
I have just a problem, it's impossible for me to write " TXT_BTN0_USERSTART " at Number in action box " set_text "
When I click OK, the Number change with " 1 "
Do you have a solution ?
06-09-2015 02:22 AM
Just enter the number of the string. If that string has a name, DASYLab will replace the digit automatically.
06-09-2015 02:40 AM
Thanks a lot for your help !
Ivan,