From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Discusiones sobre Productos NI

cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

Salto de linea de un string

¡Resuelto!
Ir a solución

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
Mensaje 1 de 5
1.971 Vistas

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 LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 kudos
Mensaje 2 de 5
1.953 Vistas

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. 

Descargar todos
0 kudos
Mensaje 3 de 5
1.941 Vistas
Solución
Aceptado por GokuJubilao

Hi Goku,

 

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

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 kudos
Mensaje 4 de 5
1.930 Vistas

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
Mensaje 5 de 5
1.915 Vistas