sts123 Posted 22 hours ago Report Posted 22 hours ago Hi I want to create a logic to trigger an event with Case Structure block with Greater Than block, where the "x" value for the Greater Than is input coming from one of the channels value. I used Get Waveform Components to extract the "Y" value from waveform and wanted to use this as an input into the "x" for Greater thank block, however Case Structure does not accept this type. Any thoughts? Quote
cordm Posted 20 hours ago Report Posted 20 hours ago You are trying to wire an array to the case selector. Extract the maximum value from the Y array using Array Max & Min. You might also want to take the absolute value of the Y array. Quote
sts123 Posted 4 hours ago Author Report Posted 4 hours ago Not sure if this is the right way of doing it. R_R_9_MTDS_Split_Rec_trig.vi Quote
cordm Posted 54 minutes ago Report Posted 54 minutes ago That is just the first value of the Y array, not its maximum. I assume you want to start the Hi_Rate_Trig task after reaching the threshold, right? Your VI won't do that, because the case structure executes once at the start when the boolean is still false. Get rid of the local variables and use data flow instead. Some more points: either wire a number of samples to read or a duration to the DAQmx Read VIs. That makes your waveforms the same length which makes postprocessing easier. Check what works with your resampling duration For continuous sampling mode, it is usually not necessary to wire the samples per channel terminal. labels keep the block diagram and front panel readable See if the attached VI does what you want. R_R_9_MTDS_Split_Rec_trig_CM.vi Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.