10-28-2013 10:39 AM
Here the program 😃
Saludos
10-28-2013 09:45 PM
Hi Beachard!
I send you back again your VI, please note that what I did was to take out the VISA Configure Serial Port and the VISA Close out of the while loop (the same way as in the example I posted before). I also implemented a delay in the data reception part, just to prevent errors like the one you mentioned in your previous post (error -1073807253).
I hope this information works for you!
Regards,
Luis Castaneda
National Instruments
Ingeniería de Aplicaciones
10-29-2013 07:17 PM
Hi Luis, thank you
Now, I have another little question
With the Write to measurement file, I create a daily file, I want to now If is possible to restar at cero in the "X_Value" colum, or if I can put it on the time
Thank you
Regards
11-03-2013 02:57 PM
Hi guys, hi Luis
Excuse me again
I do the same thing you told me, but other error appears
Please help me guys
Thank you all
11-04-2013 11:54 AM
Hello Bechard,
I analyzed again your whole code and I see that you are not implementing a standard software architecture, please check the following link in order to implement a better solution for your application:
http://www.ni.com/white-paper/5237/en
In the other hand, a quick way to know the source of your issue would be to wire the Error Out coming from the flat sequence into the Error In of the Scan From String VI (the one coming from the VISA Read VI) and also be sure to stop this while loop if an error occurs in the Scan From String VI.
I noticed as well that there is also another Scan From String in the event structure, please wire the Error Out from the Property Node into the Error In of that VI.
Overall I suggest you to redesign your application because having a lot of while loops running at the same time without maintaining flow control is general a not a good idea, you can have race conduitions and other unexpected behaviors.
I hope this information works for you!
Regards,
Luis Castañeda
National Instruments
Ingeniería de Aplicaciones
11-04-2013 12:42 PM
Hola Luis, he visto que hablas español y creo sería más fácil para mí entenderte y explicarte
Lo de rediseñar el programa no puedo hacerlo por ahora, pero si lo he pensado
Y el problema que es debido al Scan from string, es el que me perturba por ahora, y me gustaría saber si se pudiera arreglar sin tener que rediseñar el programa, o si se pudieran extraer los valores numéricos del VISA de otra manera
Gracias
11-04-2013 05:28 PM
Hola Bechard,
Con todo gusto nos podemos comunicar en español, el problema pueden ser los datos que nos está arrojando el VISA read ya que probablemente no sean los correctos o esté leyendo basura del puerto. Te sugiero que saques esa función y la pruebes en un VI nuevo para ver que efectivamente estás leyendo el dato deseado.
En los ejemplos de LabVIEW (Find Examples…) vienen ejemplos de cómo leer datos a través del puerto serial, una vez que esté segura esa parte intégrala con el resto de tu programa en la forma que te comentaba (antes de entrar al ciclo: configurar, dentro del ciclo leer y fuera del ciclo cerrar).
También te sugiero que conectes los cables de Error In y Error Out de los VIs de VISA y del Scan From String para tener control de flujo de datos y sobre todo para hacer el manejo de errores de forma adecuada para que de esta manera podamos detectar de mejor forma los mensajes de error.
Espero que esta información te sea de utilidad!
Saludos,
Luis Castañeda
National Instruments
Ingeniería de Aplicaciones
11-05-2013 05:55 AM
Probé con los ejemplos y no lee ningún dato, al parecer no está mandando nada de datos, será eso??
Si quito el Scan from string, hay algún otro bloque que me ayude a observar los valores que obtengo?
11-05-2013 09:36 AM
Hola Bechard,
Ese puede ser uno de los problemas, hay que asegurarnos de estar leyendo los datos deseados antes de implementar cualquier lógica de lectura. Podrías probar con alguna herramienta de lectura de puerto serial para ver si estas recibiendo datos? Una de las herramientas que puedes usar para este fin es el HyperTerminal de Windows o el PuTTY.
Una vez de que te cerciores de que estas recibiendo los datos por el HyperTerminal o el PuTTY ejecuta alguno de los ejemplos de LabVIEW con la misma configuración (Baud Rate, Stop Bits, etc) para leer el puerto.
Posteriormente se podría implementar ya el manejo de los datos recibidos dentro de LabVIEW con alguna de las funciones de la paleta de String.
Saludos!
Luis Castañeda
National Instruments
Ingeniería de Aplicaciones
11-05-2013 09:12 PM
Ok, gracias, probaré con eso