DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Value Trigger and pass

Solved!
Go to solution

Hi DASYLab community,

 

Past few days I've been getting acquainted with DASYLab and I think I am starting to get a rough idea of what I can and cannot do. Recently I began working on a project where I am collecting accelerometer data based on a bunch of set conditions. So far I can easily pass the data to the write module with the required manipulation, find the maximum./minimum values over the run time and send them to a separate run module (not 100% on this one actually). Where I am running into problems is the following:

 

1. scanning actively, but only recording values that are outside or inside a certain range of values

 

2. actively scanning 3 sensors and comparing if either of the two (slave sensors) are within 5% of the third sensor (master) at any given time.

 

Originally, I thought I could achieve this with start/stop triggers until I figured that they only outputted high or low. whoopsie. Now I am trying to achieve the same results using an action module. As far as scanning for the condition, it works great, but I am having trouble writing it to file. I wanted to pass it through a digital meter which is connected with my write module, but I cannot seem to get that work correctly. Any advice on what I can do to remedy this issue or maybe a better method to achieve my goals? If additional info is required, please let me know.

 

Cheers,

Stephen Abraham

Cheers,
Stephen Abraham
0 Kudos
Message 1 of 8
(5,112 Views)
Solution
Accepted by topic author woudie

I'm glad that you've figured a lot out!

 

1. Use a Combi Trigger or a Pre-Post trigger to determine whether the signal is in or out of range. 

     Use the control output of the trigger to control a Relay to hold or release data. 

     If you are working with multiple signals, and want to control them together, use the Arithmetic - all channels to do an AND or OR operation before the Relay. 

 

2. you'll need to add some math - for the master sensor, do an arithmetic with two inputs, branch the master sensor into both. For the lower bound,  multiply by 0.95, for the upper bound, multiply by 1.05.  Connect the outputs to a Write Global Variable module and write to variables 1 and 2. 

 

Set up a Combi Trigger or Pre-Post Trigger to use the global variables as the range (use ${VAR_1} or ${VAR_2} ). Use the control output to signal that the values are out of range. You could use the Comparator also. 

2017-05-30_8-24-21.png

 

 

 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
Message 2 of 8
(5,068 Views)

Hi CJ,

 

Thank you for the advice! I ended up figuring out with your advice that using the start/stop trigger was the wrong one for my purpose and ended up switching over to a combi trigger for comparing the master with the slaves and checking if the values went out of range! I also ended up using a functioning interpreter instead, but it seemed to work out as well! 

 

One more question if you don't mind me asking. Another thing my program is going to have to accomplish is recording the elapsed time between each max and min value. In order to do that, I feel that I would use a time base module to run parallel with my min/max module and use a relay+trigger to activate it, is that correct to assume? If not, can you recommend a better approach?

 

Cheers,

Stephen

Cheers,
Stephen Abraham
0 Kudos
Message 3 of 8
(5,045 Views)

If you are using the Statistical Values module, you can do a Max Position and Min Position to extract the time stamp of the maximum and minimum in seconds. You should be able to subtract one from the other to get the time. 

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 4 of 8
(5,042 Views)

Is there a way to set a hysteresis for the statistical values module? My current max/min is set to identify extrema's that differ by atleast 0.05g's. 

Cheers,
Stephen Abraham
0 Kudos
Message 5 of 8
(5,039 Views)
Solution
Accepted by topic author woudie

Are you using the Min/Max module? 

If so, then use the Time Base module to extract the sample time from each extrema.

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

Yes I am! Could you run me through how I can go about doing that?

Cheers,
Stephen Abraham
0 Kudos
Message 7 of 8
(5,034 Views)

Opps, nevermind, I was being silly and not thinking there for a moment.... Thank you for all the help!!

Cheers,
Stephen Abraham
0 Kudos
Message 8 of 8
(5,031 Views)