DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Y/t graph data - print - save

I want to record pressure curves for production control.  Up to the Y/t-graph it works fine.  After having recorded the pressure curve I want to press STOP and have the possibility to print out the Y/T-graph (with some text, name...) which is in a layout and also to save the data to a file (file type not fixed yet, tried it with ASCII file). One file per screen.

 

My problems:

 

Printing only works when measuring is running (means when START has been pressed). It doesnt matter what the graph shows.  After pressing STOP no printing.

 

Saving also only works when measuring is running, i.e. afer pressing START. Multiple pressing of Save writes multiple graphs in one file. After pressing STOP no saving.

Additionally, when saving in an ASCII-file, the time stamp per data is not the same as on the graph, example:

10,5860;0,8167;
10,5862;0,8100;
10,5864;0,8081;
10,5866;0,7898;
10,5868;0,7478;
10,5870;0,7039;

but they should always start with zero and go up to 50 ms.

 

Hope somebody can help or knows examples. Any help appreciated. Thanks.

Egon

 

 0001.jpg

 

 

The Layout:

0002.jpg

0 Kudos
Message 1 of 7
(6,876 Views)

Yes, the measurement needs to be running to easily print.

 

You can add some logic to open the relay (stop the data flow), so that the measurement is running, but the chart is not changing. Data is still being acquired, but not used.

 

I'm not sure how you want to do it... a switch and a logical AND can control the Relay, so that you must press the switch and have the Combi Trigger conditions met for the Relay to close. Then, regardless of the Combi Trigger, you can stop the data flow by clicking the switch off.

 

With the data flow stopped, the various print and change file actions should work. Any action on the file module will not be acted on until the next data block is processed by the module. I usually use the same event that opens the relay and stops the data flow (a falling edge) to have the Action tell the Write module to either do Next File (multifile operation) or Close and re-open file (normal operation). 

 

 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 2 of 7
(6,847 Views)

For the data file problem, the issue is going to be the Relay. You may be thinking that the data starts at zero, but the actual measurement time is later. 

 

Can you post the worksheet? 

 

 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 3 of 7
(6,846 Views)

> Can you post the worksheet?

 

Find it attached.

0 Kudos
Message 4 of 7
(6,828 Views)

I overworked the worksheet and it's works like this now:

 

Press START to let the measuring start.

Worksheet now waits for values from pressure sensor above triggerlevel.

When triggerlevel is arrived, measurements for 0.5 seconds are captured and shown in the graph.

After waiting a delay of 1 second, the actions start.  (without this delay it does not work OK)

Action00 --> print layout  (for documentation)

Action02 --> stop measuring

Action --> 04 save layout as JPEG (also for documentation, in case the printout gets lost)

 

So far I am quite satisfied how it works, but there ist still the time stamp in the ASCII-file.

I am not sure, i.e. didn't find it yet, if there is possibility to normalise the time values befor they ate saved.

 

 

0 Kudos
Message 5 of 7
(6,827 Views)

Here is a technique for resetting the time and storing only that time.

 

DASYLab's timestamp cannot be reset, since the program relies on it being a value that increases monotonically while the measurement is running. 

 

To avoid having to stop/restart to reset the clock, you can use a technique shown in the attached worksheet.

 

After the relay, add a Timebase (Extract time from data channel) module. Branch the data wire to the input of the timebase. Configure the timebase for "x-base" and turn OFF the reset. This will now generate a value that starts at 0 and counts up in seconds. For the first block through the relay, it will start at 0. 

 

Store this new data channel in your file, and, if you like, under ASCII options, turn off the time channel. Use this time data channel as the time column in the file. You can also use it to display the data on an X/Y chart, where the x-axis is this time channel. 

 

You need one or two Actions now -- the first is on the FALLING EDGE of the Relay control input - so connect the Action to the wire that goes into the X of the Relay (the output of your trigger). Receiver is the Timebase, Event is Falling Edge, Action is Reset. So this will reset the Time Base to start at zero for the next group of data.  

 

My second action tells the Write Data module to go to next file. I have it configured for Multifile, and each file now starts at 0 seconds. Same event, Falling Edge, receiver is the Write Data module, and the action is Next File. 

 

I hope that this helps. 

 

Note that the zip file includes two files, *.DSA and *.DMX. Copy both to the same folder to open with DASYLab. It should work with any recent version of the software, but was created with V12.

 

 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 6 of 7
(6,822 Views)

cj, thanks for the solution, it works fine!!

 

If you would like it, I could send you the worksheet.

 

Now I am trying to read the ASCII file back. I get the data shown on a x/y-graph but on a x/t-graph it doesnt work. I prefer a x/t-graph as I also want to show a reference curve. Data in the list box are OK.

 

- DerGau

 

Had to add  .txt  to the .dsk file as .dsk file are not accepted.

 

 

ReadBack.jpgr a x/t-grah as I

Download All
0 Kudos
Message 7 of 7
(6,791 Views)