Jump to content

Timing output every elements of a array for loop


Recommended Posts

graph.png.f97c713183d90794c17b8350a25d3613.pngscap.png.42330209e1209298baecd3ad37fe83ee.png

I want to implement a function as follows: first set the Max and Min voltage values, then set the number of steps in the middle of the Max and Min steps and the dwell time of each step, and finally set the total number of cycles
The problem is: the value of each step must be output separately, there is a problem here, please help, thank you!

Link to comment

There's a little bit of Rube Goldberg action going on here, but I think I follow what you are trying to do.  I'd suggest precalculating what all the values are and put that in a subVI.  Then call that subVI and index out the current step that you are on keeping track of it in something like a while loop and a shift register.  Attached is a simple example.  Have you taken any free LabVIEW training online?  Here is some on the LabVIEW Wiki.

Ramp Pattern.zip

  • Thanks 1
Link to comment
16 hours ago, SteveSun said:

I want to implement a function as follows: first set the Max and Min voltage values, then set the number of steps in the middle of the Max and Min steps and the dwell time of each step, and finally set the total number of cycles
The problem is: the value of each step must be output separately, there is a problem here, please help, thank you!

I think you need to replace your rotate array with another for loop with your wait inside. The inner for loop will autoindex your array and output the values one by one. If you post a VI or a snippet, we might be able to better show you what we mean.

Edited by infinitenothing
Link to comment
17 hours ago, SteveSun said:

I want to implement a function as follows: first set the Max and Min voltage values, then set the number of steps in the middle of the Max and Min steps and the dwell time of each step, and finally set the total number of cycles
The problem is: the value of each step must be output separately, there is a problem here, please help, thank you! 

What are you trying to output to? A graph? A daq card?

If its in one of the pictures, only 2 came through on my end, the rest show up as blank squares.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.