詢價 / 物料清單 0 登錄 / 註冊

選擇您的位置

用戶形象

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

Hardware design
12月 23, 2020 by Jonathan 977

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

所有評論

user image

Fernando 發表於 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 發表於 December 23, 2020

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

0
  • Jonathan

    Jonathan 發表於 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. .

  • 您需要登錄才能回覆。 登錄 | 註冊

user image

Ryley 發表於 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

寫一個答案

您需要登錄才能回覆。 登錄 | 註冊