RFQ / BOM 0 Entrar / Registro

Selecione seu local

imagem do usuário

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

Hardware design
dezembro 23, 2020 by Jonathan 971

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 os comentários

user image

Fernando postado em 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 postado em December 23, 2020

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

0
  • Jonathan

    Jonathan postado em 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. .

  • Você precisa fazer login para responder. Entrar | Registro

user image

Ryley postado em 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

Escreva uma resposta

Você precisa fazer login para responder. Entrar | Registro