12-01-2018 12:58 PM
Hello,
I am creating a program that will actuate a product on and off for many cycles and am measuring sensor values over time using DAQ Assistant and other express VIs to acquire and log data to a text file. This text file contains a column for time and columns for sensor data.
I am also interested in the number of times a sensor value passes a certain threshold so I created code to detect this, which then increments a "cycle count" indicator in my program.
Is there a way to log this "cycle count" indicator along with my data log text file in another column that is synchronous in time?
Any feedback is appreciated. Thanks,
Solved! Go to Solution.
12-01-2018 02:03 PM - edited 12-01-2018 02:06 PM
(This is a LabVIEW programming question unrelated to "multifunction DAQ" and I will move moved it to the LabVIEW forum.)
To get better help, feel free to attach a simplified version of your code.
12-01-2018 03:49 PM
I have attached my code. Thanks,
12-01-2018 04:09 PM - edited 12-01-2018 04:11 PM
You could just merge the count with the dynamic data going to the "write to measurement file" express VI but might want to also output the count as an autoindexing array out of the FOR loop. This way it has the same number of points as the other channels.
Part of the problem is your use of express VIs and dynamic data, making the code too opaque. It might be easier using lower level functions. (Sorry, I don't have any DAQ tools installed here).
Some other problems:
12-01-2018 10:04 PM
thank you for your advice!!
Can you please clarify your last comment:
Is there a way you can explain through code?
Thanks!
12-02-2018 06:30 AM
@ANON12345 wrote:
there a way you can explain through code?
There are many variations, depending on how accurate the timing needs to be, but here's a comparison.