07-23-2020 09:02 PM
Hello Everyone,
I'm at a total loss at the moment with this one. I'm currently coding for a Pressure Transducer Calibration program and I need help pairing Pressure and Voltage data. If you look at my attachment "Front Panel", you can follow my line to where I want to insert a 2D array. (Note: That array will be from the "2nd" test series of arrays)
You may also look at my "End Goal" to see where I'll be implementing this. I really appreciate this forum as it has answered many problems people face.
Solved! Go to Solution.
07-23-2020 09:48 PM
Your code makes absolutely no sense.
Please take a step back and explain in simple terms:
07-23-2020 10:40 PM
Thank you for the reply, I'll go through your bullet list to address why I did somethings. (to clear it up)
See below for original data: (Note: 2 Test series; black box indicates one set and correspond the "0" from the blue 2nd test series.)
See below for "Theoretical" final data structure. (See above "Front Panel" attachment from original post to see what I'm getting)
07-24-2020 12:01 AM
There are millions of simple ways to do this. Best would be to build the final data structure directly in the first array, of course.
But let's assume that the output of the first array stack has the give structure and we need to convert it to the final data structure. Here is one possibility, but I am sure there are even easier ways.
(It is a really bad idea to have multiple data with the same value, so I added the voltage to 500 for the second value.)
07-24-2020 12:09 AM
@LawnMower3000 wrote:
- Even though it may be bad practice, I need to leave the inner loops to "process" the whole array; changing my count terminal (N) would change a lot in my code.
I never said anything about the count terminal. Compare the two code fragments below:
07-24-2020 01:37 AM
This is awesome @altenbach!
So I didn't mention this before but "Voltage Data" can change array size depending on how many Sensors (channels) are being calibrated during a full calibration run. Being that, the initial array will give the structure and that "500" (Pressure value) will match the array size (using that array size function implemented).
I apologize for assuming you meant to change Format into Sting to Number to Fractional String; not the same thing.
Taking out that Count Terminal (N) for simulating "2 test series", Can you suggest a way to keep the previous iteration series of data? (making this a subVI, making input terminals for Pressure/Voltage data) Would a feedback loop work? Shift Register in a while loop? Going to be recording 10 test series up/10 series down.
07-24-2020 01:50 AM
Yes, it should be quite easy to make it scalable for any number of inputs. Again, I would build the final data structure right in the first loop.