DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

using an event condition to open data file

I have used DASYLab to read information via the RS232 input module and read 6 channels of information real time. Whilst the program is running, I would like to be able to look at one of the channels and based on deviation from a set point, open a data file (ASCII), read out the data and display it on the screen real time (digitally) along side the actual data (plot) for that channel. Thanks

0 Kudos
Message 1 of 9
(7,193 Views)

Yes, you can do that.

 

You need DASYLab Full or Pro, and the files that you plan to read need to be symmetrical -- the same number of channels, the same file type, and the same general timing characteristics. 

 

The Read module is set up to use a global string to specify the file name.  It cannot use original date/time. 

 

I created six files that only differed by amplitude, each with 100 samples in it. 

I have a Coded Switch to select the file. 

 

It's connected to an Action. When the Coded Switch changes, the Action copies the file name to the Global String that the Read Data module uses. Then, when that Global string changes, the Read module is reset, and it reads. 

 

Note that it will always read once at the start of measurement. 

 

Attached is an example with the files, the worksheet that created the files, and the worksheet that will read the files. Look at the Action and look at the global strings. Note that in the Read worksheet, String 1 is a formula - click on definition to see the formula.

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 9
(7,182 Views)

Many thanks CJ, I will have a look at your coding and give it a go.

0 Kudos
Message 3 of 9
(7,178 Views)

First problem, and it is my fault entirely, is I didn't say what version of DASYLab I was using. I am actually using V10 so I can't open your files.

0 Kudos
Message 4 of 9
(7,176 Views)

Here are the files stored as .DSA.

Copy both .DSA and .DMX to the same folder to open.

Then do a File Save As... to store as .DSB.

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 5 of 9
(7,111 Views)

Thanks CJ. I managed to download and install on my home PC DASYLab 12 so was able to look at your code. With a bit of tweaking it will do exactly what I require so many thanks. Finally, I would like to run the code at a specific time so as not to have it running from the start. I am essentially looking at the point 1 channel of pressure starts to drop. When this happens I would then compare it with the data in the ASCII file. Can this be done?

Many thanks once again.

0 Kudos
Message 6 of 9
(7,053 Views)

Unless I am missing something ${DATA_FOLDER} system variable doesn't appear to be valid in V10. Is it called something else?

Thanks

0 Kudos
Message 7 of 9
(7,043 Views)

I need to review your request, but I think that it's an Action module with an Action controlled relay, so that both the reset event /action and the close relay action happen at the same time. 

 

For the global string... no, it did not exist in V10. 

 

 

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 8 of 9
(7,039 Views)

So I guess I will have to wait until I have V12 installed at work to use the code you attached.

Many thanks again for your help.

 

 

0 Kudos
Message 9 of 9
(7,036 Views)