LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

forループ 小数

Solved!
Go to solution

Hiddg_1-1664201796366.png

このforループに0,0.01,0.02,0.03…4の値をそれぞれtに代入してほしいのですがforループはやはり整数しか扱えないのでしょうか

tに代入するだけなら

Hiddg_2-1664202875482.png

このようにできるのですが波形を表示させる際に

スクリーンショット (15).png

横軸がforループで用いた0から400になってしまうのですが横軸を0,0.01,0.02,0.03…4にする方法などはありますか?

説明が下手で申し訳ございませんが少しでも気づいたことなどがあれば教えてください。

 

0 Kudos
Message 1 of 6
(1,158 Views)

You can set x0 and dx of the x axis. No need for any data manipulation.

 

(Also note that all controls and most of the early math should be before the loop.)

0 Kudos
Message 2 of 6
(1,142 Views)
Solution
Accepted by topic author Hiddg

Simplified example:

 

altenbach_0-1664207933573.png

 

0 Kudos
Message 3 of 6
(1,132 Views)
Thank you from the bottom of my heart!!!!
0 Kudos
Message 4 of 6
(1,082 Views)

As has been said here, you can also avoid that property node.

 

 

altenbach_0-1664290679599.png

 

 

Also, if dx never changes at runtime, you can also set it directly in the graph properties dialog:

(Only do that if you wire the array directly. don't do it if you do the cluster or waveform option above)

 

altenbach_0-1664291032495.png

 

 

Message 5 of 6
(1,044 Views)

thank you!!!!

it was successfully resolved!!

0 Kudos
Message 6 of 6
(1,037 Views)