06-03-2020 11:45 AM
What is the proper way to insert subarrays into a 2-d array? The attached example is a simplified version of my vi I am having difficulty, in the process of building a 2x4 array that is further processed. My actual application has both a DAQmx device and a bench-top DMM reading the same series of voltages and currents with the purpose of deriving calibration constants for the DAQmx for voltage measurement. In the example I’ve replaced the DAQ and the DMM with 2 function VIs F1 and F2 that generate a slightly different outputs in the producer process, and the results are to be inserted into “Array” in the consumer process. Running it you will see that ‘Array’, which is initialized with 1 will display the results momentarily then revert back to a value of 1 for each column of the array. I want the new inserted values to remain for each column rather than reverting back to the initial value but they immediately go back to 1. It seems to me that ‘Replace Array Subset’ should replace, and not temporarily! What am I doing wrong here?
Solved! Go to Solution.
06-03-2020 11:51 AM - edited 06-03-2020 11:52 AM
You forgot to put a shift register on your outermost while loop!
(or use a feedback node within the innermost loop)
PS: There is no need to write to a local variable of "Array" when you are writing to the terminal of "Array" at the same time!
06-11-2021 11:12 AM