LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error: connected two terminals of different types

Solved!
Go to solution

Hi all:

 

Please can you help me with this error? I thought I can connect these two terminals. 

 

Thanks!

0 Kudos
Message 1 of 16
(5,988 Views)

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

ʍolɟɐʇɐp ʞuıɥʇ
0 Kudos
Message 2 of 16
(5,984 Views)

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 16
(5,980 Views)

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.

0 Kudos
Message 4 of 16
(5,947 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 16
(5,943 Views)
Solution
Accepted by topic author GM1710

You started with an array of waveforms. In order to get to the componentes of 1 waveform, use "Index Array" first:

grafik.png

 

 

 

 

 

 

 

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 6 of 16
(5,937 Views)

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

0 Kudos
Message 7 of 16
(5,925 Views)

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!"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 16
(5,910 Views)

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

 

 

0 Kudos
Message 9 of 16
(5,861 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 16
(5,855 Views)