09-15-2017 04:46 AM
Hi all:
Please can you help me with this error? I thought I can connect these two terminals.
Thanks!
Solved! Go to Solution.
09-15-2017 04:49 AM - edited 09-15-2017 04:49 AM
Hi,
the error message you get seems quite clear to me:
Your Data source is 1D Array of i32 and your data sink is a single i32 value.
Best regards
09-15-2017 04:51 AM
Hi GM,
I thought I can connect these two terminals.
Why do you think so?
Your QR function outputs an integer array, while ReshapeArray expects a scalar integer value!
All this is written in the error message…
Btw. why do you want to reshape this waveform array anyway?
09-15-2017 08:38 AM
Hi:
I am using a DAQ from measuring computer (I do not know if this counts, so I tell you). I wanna convert the waveform from the ULx read to a Array. I tried using the function get waveform components. But when I wire the data to the function I get an error.
Can you help me with that?
Thanks.
09-15-2017 08:45 AM - edited 09-15-2017 08:46 AM
Hi GM,
no need to hijack very old threads when you already created your own one!
It would really help when you attach your current VI! It would also help when you describe that error.
In the image above you didn't use any waveform function at all…
09-15-2017 08:54 AM
You started with an array of waveforms. In order to get to the componentes of 1 waveform, use "Index Array" first:
Regards, Jens
09-15-2017 10:07 AM
Hi Jens:
Thanks for the solution.
I was wondering if you could help me also with my file (attached).
It happens that I get different results when I run the code with "highligh execution" on and when not (the written file is different in the two cases), and the average of n samples does not run when I do not highligh the execution.
In addition, I think I have also make a mistake with the size function because it always gives me the same number.
Really thanks,
Gianmario
09-15-2017 01:22 PM
Hi GM,
It happens that I get different results when I run the code with "highligh execution" on and when not (the written file is different in the two cases), and the average of n samples does not run when I do not highligh the execution.
Well, the code itself should give the same result in both cases.
BUT: in highlight mode it executes much slower, giving often a buffer overflow error with DAQ functions. That's probably the reason your loop will stop and the average is calculated!
When running the VI "normal" the code will not give an error and so the loop will not stop (without user action). As you calc the average only after the loop has stopped (THINK DATAFLOW!) you don't see any averages then…
Did you take the free beginner courses to learn about this "THINK DATAFLOW!"?
09-18-2017 04:00 AM
Hi Gerd:
Yes I had. The problem I was mentioning is that: the output file is different regard to running the code with "highligh execution" on or off (please see file attached).
About the average. I want to have an average every N samples. So I thought an idea could be to get the array with all the samples and made an average for this reason I have a while loop which records the sample and after that a code for the average. But I always get a wrong size array. I checked the array before the function and after, so I am sure that the problem is in the function.
I do not enclose the code again, it is the same of the previous message.
Hope I was clear to explain the problem.
Thanks 🙂 ,
Gianmario
09-18-2017 04:12 AM - edited 09-18-2017 04:16 AM
Hi Gianmario,
I don't understand your PPTX! The debugging clearly shows there are just 256 samples in the waveform "#256"), but you don't believe the ArraySize function when it says there are just 256 samples in the array?
I miss one thing in the loop: you don't specify the number of samples to read from your DAQ hardware…