05-16-2017 02:55 AM
I have the following problem:
I am reading out some data of 4 force sensors with the DAQ-Assistant. Now I recognised that all of the sensors transmit data with different offset.
And that's what I want: a structure that detects the offset to zero by pushing on a button and then it should substract that one value from my signal for the whole rest of the measurement.
My problem therefore is, that collecting the data from the sensors runs in a while loop. Now when I substract zero from the data at the beginning and want to replace the zero by pushing a button, the next loop of course starts again with substracting zero, but the offset value should be substracted for the rest of the measurement. I didn't got it to realise that the loop stops, replaces the zero and then runs again with the determined offset.
Thank you all, yesterday you could help me so unbelievable fast.
Note: If someone wants so show me a working structure, please upload screenshots, or .vi for Labview 2013, its a really old pc in the laboratory I work with.
05-16-2017 03:31 AM
Hello,
You could use sequence structures and wait functions. In the first structure, you initialize the array with zeros, build an array of elements that you will use in the second structure.
PS: If your PC is connected to the internet, you could use this screen shot program for example. Like that it would be much easier to understand your concept.
Greetings and Regards,
James.
05-16-2017 05:04 AM
or use the built in "Editor -> Create VI Snippet from Selection"
05-16-2017 10:16 AM
Let's assume you are collecting (sampling) 4 channels of data continuously in "chunks", for example, 1000 samples at a time at 1KHz. So every second you get 1000 data points from each channel, and you want to subtract 4 "offsets" respectively from each channel. Because the data all come "at once" in a chunk, it makes (logical) sense to use the same offset for all 1000 points, even if you said "change it" halfway through the 1 second sampling period.
One way to do this is with a Queued State Machine, with (at least) the following States:
The beauty of this is that it lets you "interleave" requests to change the Offset with on-going requests to (continuously) sample data. Of course, when you do change the Offset, you should see a "jump" in your data (reflecting the difference in the two offsets). You'll be able to recognize this, of course, because it will occur at multiples of the Sample size, and can affect multiple channels.
A variant of the Queued State Machine that incorporates getting data "into" the State Machine is the Queued Message Handler. You can find Demo Templates for these in the Sample Projects and Templates that appear when you first start LabVIEW.
Bob Schor
10-17-2017 01:58 AM
It’s amazing that windows 10 snipping tool can capture screen in irregular mode.