Discusiones sobre Productos NI

cancel
Showing results for 
Search instead for 
Did you mean: 

Salto de linea de un string

Solved!
Go to solution
Highlighted

Buenas. Estoy leyendo unas columnas de un excel con muchas filas a través de un array. He dividido cada columna en subarrays para tratar cada columna por separado pero necesito convertir ese subarray en un número para que lo lea un equipo de un laboratorio. He probado a pasar el subarray a un string donde me ha leido todos los valores de mi subarray, y eso lo he convertido a número utilizando la función Frac/Exp String To Number, en el que solo me lee el primero de todos los valores que necesito leer. Dejo fotos de mi programa (foto 1) lo que sale del array (foto 2) lo que sale de convertir a string (foto 3) y lo que sale de convertir a número (foto 4). Agradecería ayuda.

foto2.PNG

foto3.PNG

foto4.PNG

foto1.PNG

    

diferentes tipos de saltos de línea pero no funciona.

0 Kudos
Message 1 of 5
(151 Views)
Highlighted

Hi Goku,

 

you should write your questions in English when you post in the English section of the forum…

 


@GokuJubilao wrote:

I am reading some columns of an excel with many rows through an array. I have divided each column into subarrays to treat each column separately but I need to convert that subarray into a number for a team in a lab to read. I have tried to pass the subarray to a string where it has read all the values of my subarray, and that I have converted it to a number using the function Frac / Exp String To Number, in which it only reads me the first of all the values that I need to read. I leave photos of my program (photo 1) what comes out of the array (photo 2) what comes out of converting to string (photo 3) and what comes out of converting to number (photo 4).


You already get a numeric array from those RGT function on the left of your images: why do you need to convert that array into a string instead of using plain array functions?

 

Btw. we cannot debug images using LabVIEW, so it is recommended to attach real code instead of some images of parts of code!

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 5
(133 Views)
Highlighted

Hello. This is my first project programming in labview and I am learning. I need to convert the array into a number in order to read the numbers and convert this numbers into string so the  VISA functions can read it. I tried to convert array into number but it didn't work.  I'll try to explain my problem. My power supply must read all the values of the colum in the array, but the VISA just read number so my solution was to convert array into string and it just read the first value when i convert string into number. 

Download All
0 Kudos
Message 3 of 5
(121 Views)
Highlighted
Solution
Accepted by topic author GokuJubilao

Hi Goku,

 

I still don't know why you need to convert to string and back to numeric data:

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 4 of 5
(110 Views)
Highlighted

It worked. I thought I had to convert array into string because i didn't find too much information abaut that but you could solve my problem. Thank you very much. Best regards.

0 Kudos
Message 5 of 5
(95 Views)