01-24-2020 03:18 AM
I am collecting data from four cDAq9181. I attach the vi. It compares the current array of booleans with the previous. If they are different, it writes the new one to a text file. It works ok but does not collect the first array of booleans. I have initialized the shift register of the while loop to 0s, but it does not suffice since in many cases the initial array is made of 0s.
how can I change the code to work around this issue? thanks
01-24-2020 06:18 AM
Or the logic that compares the current and previous arrays with i=0. This way if i=0 you will always put the data in the shift register and write it to the text file. You really wouldn't even have to initialize the shift register then because you're initializing it on that first iteration.
01-24-2020 07:55 AM
very good idea! I will give it a try and get back to you in case. Thanks
01-24-2020 08:23 AM
Just initialize the shift register input with an empty array of booleans.