LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with the sending and reception of data from Labview to Matlab.

Hello, I have a problem with my code. I have a function that sends data from Labview to Matlab to perform some calculation on Matlab, but the data that Matlab receives is always zeros. I don't know why, how can I solve this problem? Please help me!!!

0 Kudos
Message 1 of 10
(3,919 Views)
You need to post your code of you want help in debugging it.
0 Kudos
Message 2 of 10
(3,907 Views)

I've posted all the necessary files. Variables tau1 and tau2 send zeros. In the third document it can be seen the data received by matlab.

0 Kudos
Message 3 of 10
(3,885 Views)

Hello Estibaly,

 

Thanks for using NI Discussion Forums, ¿could you create an Error Indicator and connect it to the Error Out Terminal and share the result with us?

Another thins I would like you to do is to create an indicator of the variable and share with us the output value in order to compare it with the MATLAB value.

 

Best regards.

David P.
National Instruments
Applications Engineer
www.ni.com/soporte
0 Kudos
Message 4 of 10
(3,834 Views)

Hello, I did what you say. The Labview indicator has the same value in "tau1" andt "tau2" but in Matlab it is very small, near to zero. This happens also with another variable "tempsReel" which is an integer like the other. I did a little modification in the Labview and matlab code, I posted it with this message.

 

Thank you so much.

Estibaly Hernández.

Download All
0 Kudos
Message 5 of 10
(3,820 Views)

What is the value of "tau1" and "tau2" on LabVIEW?

What are the data type of "tau1" and "tau2" on LabVIEW and MATLAB?

 

Best regards.

David P.
National Instruments
Applications Engineer
www.ni.com/soporte
0 Kudos
Message 6 of 10
(3,799 Views)

Hello, the value of tau1=2 and tau2=4. the type is interger in the two code.

Thank you

0 Kudos
Message 7 of 10
(3,782 Views)

Hello, it's a Signed Integer or an Unsigned Integer? How many bits has the Integer? How have you declared it on MATLAB?

David P.
National Instruments
Applications Engineer
www.ni.com/soporte
0 Kudos
Message 8 of 10
(3,775 Views)

It's a signed integer with 64 bits. I declared like this tau1=int64(tau1).

Thank you.

0 Kudos
Message 9 of 10
(3,741 Views)
But your image shows that the LabVIEW values are being coerced to integers in the matlab script so your definitions do not match.
0 Kudos
Message 10 of 10
(3,731 Views)