Solicitud de oferta / lista de materiales 0 Iniciar sesión / Registro

Selecciona tu ubicación

imagen de usuario

How to display the waveform in real time when calling a subroutine?

Hardware design
diciembre 23, 2020 by Jonathan 1029

Try to call an acquisition subroutine, and use the limited acquisition state to see the waveform after the program ends.


But once the continuous acquisition is used, the waveform on the main program does not move, but the waveform on the subroutine is constantly changing. What should I do?

捕获.JPG

todos los comentarios

user image

Fernando Publicado en December 23, 2020

After you open it, open both the main program and the front panel of the subprogram to know how to do it.

0
user image

Annika Publicado en December 23, 2020

This main program does not always read the waveform of the subprogram, right?

0
  • Jonathan

    Jonathan Publicado en December 23, 2020

    During the continuous acquisition, the oscilloscope of the subroutine is always changing, but the oscilloscope of the main program has no data. It may be because my subroutine has been looping, but I have not solved it with global variables. .

  • Necesitas iniciar sesión para responder. Iniciar sesión | Registro

user image

Ryley Publicado en December 23, 2020

1. There should be a while loop in your subroutine, and the data cannot be passed out if the loop does not end

2. The subroutine has built-in global variables. To put the global variables down in the loop and keep assigning values, keep assigning the values of the global variables to the oscilloscope in the main program


Suggestion: build a queue, the subroutine is used as the producer to generate data, and the main program is used as the consumer to read the queue data and display it on the oscilloscope.

0

Escribe una respuesta

Necesitas iniciar sesión para responder. Iniciar sesión | Registro