DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

recepcion de datos hex, como usar string?

Hola mi nombre es Matias, necesito trabajar con datos recibidos de un pic.
Obtengo dos datos recibidos debo poder recuperar mi valor analogico convertido.

Dato recibido:
03 67
03 67

necesito aplicar esta formula
((03*256+67)*5)/1023=4,06 V

0 Kudos
Message 1 of 10
(6,895 Views)

Hola Matias,

 

LV  tiene la paleta numérica, que se puede encontrar cualquiera de las funciones matemáticas como la suma, subtration, la división y así sucesivamente.

 

LV has the Numeric Pallet, which you can found any mathematic functions like addition, subtration, division and so on.

 

Saludos,

 

Ricardo Ramos
Account Manager
+5511989658513 | ni.com



0 Kudos
Message 2 of 10
(6,890 Views)

Me olvidé de decir ... en la paleta, se puede usar también el Expression Node

 

I forget to say... in the pallet, you can use too the Expression Node

Ricardo Ramos
Account Manager
+5511989658513 | ni.com



0 Kudos
Message 3 of 10
(6,889 Views)

Another point, use the "Hexadecimal String to Number" VI to convert your string into a number

 

Another question, use the "Hexadecimal String to Number" VI to convert your string into a number

Ricardo Ramos
Account Manager
+5511989658513 | ni.com



0 Kudos
Message 4 of 10
(6,887 Views)

Are you using LabVIEW or DASYLab? 

 

This is the DASYLab board.

 

I would use the ah formatting to read each value, and then convert them in the Formula module.

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 5 of 10
(6,884 Views)

Hola gracias por la respuesta, al parecer no puse que el programa que estoy utilizando es el Dasylab.

Espero su respuesta Gracias

0 Kudos
Message 6 of 10
(6,879 Views)

Ah me olvidaba, con el formato b/r puedo recoger solo el primer dato "03", el tema es que la conversion a/d es de 10 bit.

0 Kudos
Message 7 of 10
(6,878 Views)

You will have to read two channels of data, one for each byte.

 

Then, use a formula module to do the conversion.

 

Printscreen0011.jpg

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 8 of 10
(6,872 Views)

Hola, te comento que ya solucione esa parte, mi problema era que el data format que utilizaba era b/r, al fin puse iy y me tomo los dos datos y de ahi puse la formula para obtener el valor de tension, ahora tengo la duda en como puedo hacer para calcular la frecuencia de la señal que grafico.

Intente con el modulo fft. pero no tengo respuesta.

Lo que quiero en realidad es hacer un grafico de la frecuencia de mi señal en funcion del tiempo.

 

Gracias espero tu respuesta

0 Kudos
Message 9 of 10
(6,868 Views)

There are problems with taking a frequency of data collected via the RS232.

 

RS232 input channel is tagged as "Triggered data", with a block size of 1, and a sample frequency of 1000. Because the  serial port is not a hardware timed data acquisition device, the timing is irregular, and the samples are not spaced equidistantly.

 

 

To compute FFT, you need a block of equidistant data that is larger than 1. All FFT computation is done on a block. 

 

I would like to see the data (save to a DASYLab DDF format file using Write Data), to determine if there is a way to reblock and retime the data to work correctly.

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 10 of 10
(6,844 Views)